WorkCivic Tech
OpenNow
A free SMS line for Santa Clara County: text a ZIP or cross street, get the 3 nearest services open right now.
Built · Sep 2026 · Solo: built it from a written PRD, directing Claude Code
- test functions
- 218
- characters per reply, EN · ES/VI
- 306 · 134 chars
- languages
- 3
Try it
OpenNow’s own hours logic, running in your browser. Drag the clock toward closing time and watch when the line stops sending people there.
Open right now?
Synthetic schedule
- Row 1: 9am to 5pm Weekly
- Row 2: 9am to 4:30pm Weekly
- No exception on this date
Open Two rows cover 4:15pm. The later close, 5pm, is the one in effect.
1. Sample Community Pantry, 100 Example St. Pantry, closes 5pm. 0.4 mi
TL;DR
- People without a data plan still have SMS. OpenNow answers one question by text: where can I get food, a shower or a place to sit, near here, right now.
- Text a ZIP code or a cross street in English, Spanish or Vietnamese and get back the three nearest services that are actually open, with a MORE command for the next three.
- Built, tested and passing CI, but not deployed: it runs on seed data, and the README lists what a real pilot would still need.
The problem
Service directories for unhoused residents are websites and PDFs, and their hours go stale. A list that says a pantry is open until 5 is no help at 4:45 if it stops serving at 4:30, and a person with a prepaid phone and no data can’t load the page anyway.
What I built
A Twilio webhook in FastAPI. The router parses the text, detects the language, geocodes a ZIP or an intersection, and asks Postgres + PostGIS for the nearest services in the requested categories that are open at that moment. Shelter requests are not answered here: they hand off to the county’s Here4You hotline, on purpose.
Around that core:
- Paging and alerts. A session-based MORE command, double opt-in food alerts, and providers can text CLOSED TODAY for their own listing.
- An admin app in Next.js with Supabase Auth, row-level security and an automatic audit log on every edit.
- An anonymous follow-up text after a visit, which the scheduler gives up on after two days rather than retrying forever.
Key decisions
- Decision: phone numbers are stored only as keyed hashes (HMAC-SHA256). Why: the people texting are the last ones who should end up in a leaked table. Trade-off: the system can’t look anyone up by number, so every feature that needs to reply later has to carry its own encrypted copy and delete it after use.
- Decision: a hard character budget per language. Why: a reply that spills into a third SMS segment costs more and arrives out of order on some phones. English fits 306 characters in two segments; Spanish and Vietnamese need Unicode encoding, which cuts the budget to 134. Trade-off: names and addresses are trimmed step by step until all three results fit.
The hard part
“Open now” is harder than it sounds. A service can have two schedule rows that overlap, a holiday exception that closes it, and hours that technically run until 5 when nobody should be sent there at 4:58. OpenNow takes the latest closing time among the windows that cover the current moment, applies date exceptions on top, and treats anything closing within 30 minutes as closed. “Is it open” and “when does it close” both derive from that one calculation, so they can never disagree. Property-based tests with Hypothesis throw generated schedules at it.
The second problem is empty results. If nothing within the first radius is open, the search widens step by step instead of replying “nothing found” to someone who could walk a little farther.
Results
- 218 test functions; CI passes on main. Tests that need a live Postgres are skipped without one.
- Every P0 and P1 requirement in its PRD is implemented, plus the post-visit follow-up from P2, including the trilingual templates and the provider CLOSED TODAY flow.
- Not deployed: it runs on seed data, and the scheduled-job workflows are switched off.
What I’d do next
- Load and verify a real county listing set, with a process for providers to keep their hours current.
- Run a small pilot with one service provider before any public number goes live.
Every number, with its source
The file, run or record each figure comes from.
| Metric | Value | Source |
|---|---|---|
| Test functions in the suite | 218 | mit37/opennow/tests/ |
| CI on main | Passing | github.com/mit37/opennow/actions/runs/36080540754 |
| Reply budget per language, so an answer fits in two SMS segments (English · Spanish, Vietnamese) | 306 · 134 chars | mit37/opennow/app/templates.py:9 |
| Languages, detected from the text itself | 3 | mit37/opennow/app/templates.py:9 |