-
-
ZeroBar: one text message at a time. Live Web SMS Simulator on Vercel and open-source repo built spec-first with Kiro.
-
ZeroBar architecture: plain SMS routes via Android Gateway and FastAPI to weather/BMKG APIs or RAG-grounded Groq (<= 300 GSM-7 chars).
-
Real phone hardware test with Wi-Fi and mobile data turned off: HELP, WEATHER, and emergency replies delivered with 0.00 MB data used.
-
Browser Web SMS Simulator and live telemetry inspector showing grounded RAG routing, latency, segment counts, and 99.99% bandwidth saved.
-
Post-recording upgrade: !zb SETLOC saves a hashed default city so a bare !zb WEATHER returns local forecasts in 1 SMS segment.
Inspiration
When an earthquake or flood hits, mobile data is often the first thing to fail. Towers get congested, data plans run out, and apps stop loading. Yet a plain text message usually still gets through. SMS rides on the cellular signaling channel of 2G/4G/5G networks, where the carrier supports it, and needs no data plan at all.
We asked: what if the oldest, humblest channel on every phone could carry modern AI help? That is the Resurrection idea behind ZeroBar.
What it does
ZeroBar is an SMS gateway. You text it, and it texts back a short, plain answer.
!zb WEATHER Jakartareturns a live forecast in one SMS.!zb ALERTreturns the latest BMKG earthquake bulletin, translated to English.!zb HELPreturns the command list.!zb SETLOC Jakartasaves your default city, so a bare!zb WEATHERworks next time.- Any other text, like
Earthquake indoors, gets grounded safety steps from our emergency guide.
Weather replies add deterministic advisories when the forecast calls for them: (!) Extreme Heat, (!) Cold Alert, and a 6-hour (!) Flood/Heavy Rain Risk warning.
Every reply is GSM-7 plain text, capped at $L \le 300$ characters (at most 2 concatenated SMS segments of $153$ septets each). A typical reply is roughly $100\text{--}300\text{ B}$ instead of loading a $2.4\text{ MB}$ webpage—yielding a bandwidth reduction of:
$$\text{Bandwidth Saved} = \left(1 - \frac{250\text{ B}}{2.4 \times 10^6\text{ B}}\right) \times 100\% \approx 99.99\%$$
Judges can try it right away in the browser Web SMS Simulator, with a live telemetry panel showing the route, latency, character count, segments, bytes, and data saved. Real phones connect through an Android SMS gateway app that forwards texts to the same endpoint.
How we built it
We built ZeroBar spec-first with Kiro.
- Steering rules (
.kiro/steering/product-constraints.md, always on): GSM-7 ASCII only, a hard $300$-character cap, keyword commands that never touch the LLM, RAG grounded in a single source file, one unified/api/sms/incomingendpoint, and honest 2G/4G/5G framing. Kiro applied these rules to every piece of code it wrote. - Spec-driven workflow (
.kiro/specs/zerobar-core/): EARS-format requirements, a design doc, and 17 tasks, each linked to the requirements it satisfies. We built and approved the work one task at a time. - Hooks (
.kiro/hooks/test-on-save.kiro.hook): the full test suite runs whenever a backend Python file is saved.
The backend is FastAPI. A deterministic router reads the first word of each SMS. Weather goes to Open-Meteo (with a wttr.in fallback), seismic alerts go to the BMKG feed, and everything else goes to a BM25 retrieval engine over emergency_guides.md. With a Groq key the top chunks are summarized by an LLM; with no key, a deterministic extractive summary answers instead, so judges need zero setup. Every reply then passes through a GSM-7 sanitizer and word-safe truncator.
The frontend is React, Vite, TypeScript, and Tailwind CSS, deployed on Vercel. The backend runs on Render.
We have 224 passing unit tests, including Hypothesis property-based tests proving that any input at all (random Unicode, emoji, $1000$-character strings) always yields a valid GSM-7 reply with length $L \le 300$.
Challenges we ran into
- GSM-7 is stricter than ASCII. Characters like
[,],{,}, and~belong to the GSM-7 extension table and consume $2$ septets each, breaking single-segment math ($160$ septets). Our initial advisory tag[!]was stripped by the sanitizer, so we switched to(!). - Advisories versus the 300-character cap. A forecast plus extreme weather alerts can exceed $300$ characters. We added compact fallback forms for each advisory that swap in dynamically before truncating.
- Open-Meteo from cloud hosts. Live calls from Render occasionally timed out or hit rate limits. We added automatic retries on timeouts,
429, and5xx, logged every status code, and fell back towttr.inin the exact same SMS format. - Hallucinated hotlines. An LLM can invent emergency phone numbers. Any LLM reply containing digits not present in the retrieved guide text is rejected and replaced by the extractive summary.
- Privacy for saved locations. We never store raw phone numbers.
!zb SETLOCkeys each sender by a salted SHA-256 hash: $H = \text{SHA256}(\text{salt} \parallel \text{phone})$.
Accomplishments that we're proud of
- A working AI emergency and weather assistant requiring $0\text{ KB}$ of mobile data on the user's side.
- Roughly $99.99\%$ bandwidth saved per reply compared to a $2.4\text{ MB}$ webpage.
- Deterministic keyword commands (
WEATHER,ALERT,HELP,SETLOC) that spend zero LLM tokens. - A zero-hallucination design: emergency guidance comes strictly from one reviewed source file.
- Zero setup for judges: no API key required thanks to the deterministic extractive fallback.
- 224 passing unit tests, including property-based proofs of our core SMS guarantees.
What we learned
- Hard constraints written once as Kiro steering rules kept every later change honest, from the first formatter to the last weather advisory.
- Small specs with one task per step made code review fast and kept scope tight.
- Property-based testing uncovers edge cases that hand-written tests miss, such as emoji-only messages or a single $500$-character unbroken word.
- Old channels still matter—the most resilient interface in an emergency is often the simplest one.
What's next for ZeroBar
- Two-way delivery through additional Android gateway apps, tested with real SIM cards in the field.
- Proactive push alerts: automatically texting subscribers when BMKG issues a major earthquake or tsunami warning near their saved city.
- Multi-language support while strictly preserving GSM-7 septet budgets.
- Expanded emergency guides reviewed alongside local disaster response agencies.
- Persistent storage so logs and saved cities survive server restarts.
Post-Recording Update Note
These upgrades were added before submission after the demo video was recorded, so they do not appear in the video:
- Unit tests grew from 159 to 224, all passing.
- Extreme temperature advisories:
(!) Extreme Heat($T \ge 32^\circ\text{C}$ or feels-like $\ge 33^\circ\text{C}$) and(!) Cold Alert($T \le 12^\circ\text{C}$ or feels-like $\le 10^\circ\text{C}$). - Flood risk alerts:
(!) Flood/Heavy Rain Riskwhen the next $6\text{ hours}$ forecast any hour with $\ge 15\text{ mm/h}$ of rain, or $2+$ hours with heavy-rain WMO weather codes. !zb SETLOC <city>: save a default city once, then send a bare!zb WEATHER. Senders are stored exclusively as salted SHA-256 hashes (ZEROBAR_HASH_SALT).