Skip to content
Muj-csvPublic

About

When the towers fall, the barangay passes it on. Pasabi (Filipino: a message you ask someone to pass along) Peer-carried Alerts, Synthesized And Barangay-Indexed

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Pasabi

When the towers fall, the barangay passes it on.

Pasabi (Filipino: a message you ask someone to pass along) Peer-carried Alerts, Synthesized And Barangay-Indexed

Status Platform Challenge

Draft README. Pasabi is being built for the Global Innovation Build Challenge V2 (2026). Features marked planned aren't finished yet, and this document will change as the project does.


Overview

When a typhoon knocks out power, cell towers go dark with it. For days, sometimes weeks, a barangay's disaster-response team only knows what people walk in and tell them, usually as a pile of duplicate, scattered reports.

Pasabi turns the phones already in the community into the network. Residents and volunteers record short, structured observations ("flood water entering the road", "3 households need water"). Phones pass those observations to each other by QR code, one phone's screen to the other's camera, with no signal or internet needed. Every phone groups related observations into incidents, counts how many independent people reported each one, and ranks them with a transparent urgency score.

At the barangay hall or evacuation centre, a station device shows the whole picture on a situation board. When any device reaches the internet, everything uploads and responders see the same picture, including what changed since the last sync.

Pasabi doesn't pass along messages. It builds a shared picture: observation → incident → corroboration → situation picture.

Features

Feature Status
Structured observation form (works fully offline, English + Filipino) Done
Phone-to-phone exchange by QR code: paged, most urgent first, with a receipt (works in airplane mode, any two phones with cameras) Built; not yet tested on iPhones
Installable offline app: add to the iPhone Home Screen, opens and saves with no signal (PWA rewrite, React + Vite, in web/) Built (W1–W4): every resident and station screen from the design package, offline shell and IndexedDB store; not yet tested on iPhones
AI-drafted report from voice or text, always confirmed by the person; the form still works offline without it Planned (W6, stretch)
Phone-to-phone exchange over Bluetooth Removed (2026-10-01, D-041): a web app can't use Bluetooth between phones, so QR is the only path
On-device incident engine: grouping, corroboration, urgency with explanation Done
Station mode: situation board, acknowledge / resolve, "what changed" Done
Honest status for the reporter: saved on this phone → passed to another phone → reached a station → uploaded, and never "responders received it" Done (set by QR receipts; radio sync hook ready for later)
What is known and what is not yet reported nearby, per incident ("Trapped: no report yet", never "no one trapped") on the detail screen and dashboard Done
Coverage per area on the board and dashboard (high, limited, no recent reports), and expected puroks with no reports shown as "no reports — this does not mean it is safe" Done
Evidence on every incident: reports vs sources, how fresh it is, a timeline of reports and actions (board, detail, dashboard) Done
Incident Passport: one incident as a portable document (what, where, evidence, uncertainty, unknowns, timeline) that reads on its own, prints to PDF, exports JSON / CSV / API payload, and shares by QR so another PASAbi phone rebuilds the incident itself Done (P2)
Information gaps per area: no observations, stale, one phone only, uncertain, and "not seen when checked", on the station ledger Done (P3)
Purok Sweep: a station checks one area category by category (Seen / Not seen / Couldn't check) and the result feeds the gaps Done (P4)
Upload states said exactly: prepared → attempted → failed or accepted by the server, never "responders notified" Done (P5)
Privacy: coarse location in exports by default, "Clear this phone", threat model (docs/THREAT_MODEL.md) Done (P6)
Readiness check for a station before a disaster (offline, storage, areas, permissions, QR self-test) Done (P7)
Field-test log: every phone times its own QR transfers (finished or not) and exports them as JSON, for measuring reliability and speed on real devices Done (P1); the field runs themselves still to do
Upload to the cloud when a device has internet Done (manual trigger; automatic on network change is later)
Responder web dashboard (ranked list, category filter, since-last-sync) Done (map deferred)
Signed observations (tamper resistance) Planned, supporting
Android background carry service Planned, supporting
SMS / satellite uplink, photos, cross-platform mesh Later

How it works

flowchart LR
  subgraph Barangay["Barangay: no cell service"]
    R1((Resident)) <-- QR code --> V((Volunteer))
    V <--> S1[(Station: barangay hall)]
    R2((Resident)) <--> S2[(Station: evacuation centre)]
  end
  S1 -- when online --> DB[(Cloud database)]
  DB --> D[Responder dashboard]
Loading
  1. Observe. Anyone records what they see: category, people affected, a short note. Location and time are attached automatically.
  2. Carry. Devices swap the observations each other is missing, most urgent first, whenever they meet.
  3. Corroborate. Every device groups observations of the same kind, place and time into one incident and counts independent reporters. Incidents are computed, not sent, so every device holding the same observations shows the same picture.
  4. Act. Stations see a ranked situation board, with a "why ranked here" explanation for every incident, and can acknowledge or resolve incidents.
  5. Hand off. When any device reaches the internet, observations upload and the dashboard rebuilds the same picture for municipal responders.

Ranking uses fixed, documented rules (category, number of independent reporters, people affected, how recent, whether acknowledged). No AI decides who gets help first.

Tech stack

Layer Technology
App TypeScript, React Native (Expo), Expo Router, React Native Web
Offline transport QR codes, screen to camera (no radio)
Local store AsyncStorage
Cloud Supabase (Postgres + row-level security)
Dashboard The same app's web build, running the same incident engine
Hosting Vercel (web build) · EAS (native builds)
CI GitHub Actions

One codebase targets iOS, Android and the web. The incident engine is written once and runs identically on all three.

Getting started

Requirements

  • Node.js 20+
  • Expo CLI / EAS CLI
  • At least 2–3 physical phones on the same platform. Peer-to-peer transport doesn't work in simulators, and iOS and Android can't mesh with each other (see Known limitations).
  • For iOS builds: an Apple Developer account, and a Mac or EAS cloud builds
  • A Supabase project (free tier) for upload and the dashboard

Run it

git clone https://github.com/<org>/pasabi.git
cd pasabi
npm install
npm test                 # engine, store policy, sync protocol — 56 tests
npx expo start --web     # web preview (mock transport, no real sync)
npx expo start           # native dev build

Set up the database

  1. Create a Supabase project.
  2. In the SQL editor, run db/schema.sql, then db/rls.sql.
  3. Copy .env.example to .env and fill in your project URL and the anon key.

The anon key is public by design and ships in the bundle. That is safe only because of db/rls.sql, which lets it insert and upsert observations and read one view, and nothing else. Never put the service_role key in this repo — it bypasses row-level security entirely, and CI fails the build if it finds one in the bundle.

Try it without any phones Open /sim in the web build. It runs the real sync protocol over a mock transport and shows three simulated devices converging to identical incident lists. It proves the protocol; it proves nothing about Bluetooth or Wi-Fi.

Try it with phones

  1. Install the dev build on 3 phones of the same platform, turn on airplane mode, then turn Bluetooth and Wi-Fi back on.
  2. Set one device to Station mode and give it a PIN.
  3. Create overlapping observations on the other two, e.g. two FLOOD reports near the same spot.
  4. Bring the devices near the station, with Pasabi open on screen, and watch one corroborated incident appear.
  5. Follow the field test run sheet and write the numbers down as they happen.

Sharing the app offline Once the storm has passed, a phone that has Pasabi can pass it to one that doesn't, without internet:

  • Android: share the APK directly over Nearby Share, Bluetooth, or a memory card.
  • iOS: there is no offline sideloading path. An iPhone needs App Store or TestFlight access, which needs connectivity. Plan to enrol iOS devices before typhoon season, not after.

Project structure

packages/core/         Rules, incident engine, store policy, sync protocol, test vectors
packages/transport/    Transport interface + iOS, Android and mock implementations
src/app/               Expo Router routes (also builds to web)
src/storage/           Local observation store and upload
db/                    Database schema and access rules
docs/                  PRD, architecture, implementation plan, decisions, build phases

Documentation

Known limitations

  • iOS carries only while the app is open. iOS has no equivalent of Android's foreground service, so an iPhone exchanges observations while Pasabi is on screen, not passively in a pocket. Station devices stay plugged in and foregrounded; volunteers open the app when they arrive somewhere. Android restores passive background carrying.
  • iOS and Android can't mesh with each other. Multipeer Connectivity is Apple-only and Nearby Connections is Android-only. A mixed barangay runs two separate networks that reconcile once either reaches the internet. Standardise on one platform per deployment.
  • The web build can't sync. Browsers have no peer-to-peer radio access, so the web version is for previewing the UI, running the /sim protocol demo, and reading the responder dashboard.
  • Upload is a manual action. There's an "Upload now" button and it retries on failure, but nothing yet watches for a network change and uploads by itself.
  • The dashboard has no map yet. Ranked list, category filter and "since last sync" are there; the map was cut for time and is the first thing to add back.
  • Needs enough devices. Pasabi works best when station devices and volunteers are set up before typhoon season.
  • Corroboration counts devices, not people. One person with several phones could inflate it. Stations can resolve false incidents.
  • Grouping thresholds are initial values. Distance and time windows need tuning with real barangays, and reports strung along a road can chain into one oversized incident — the board shows each incident's spatial extent so an operator can spot it.
  • Not a replacement for official emergency channels. It bridges the gap until they're reachable.

Related work

Pasabi builds on ideas from offline messaging and delay-tolerant networking:

  • Offline messaging: Bridgefy, Briar, BitChat
  • Store-carry-forward emergency relays: e.g. MeshAid
  • Connectivity-based structured reporting: MapaKalamidad.ph / CogniCity

What Pasabi adds is grouping and corroborating reports on the devices, offline, so a barangay gets a situation picture instead of a message feed.

Roadmap

  • MVP for the Global Innovation Build Challenge V2 (see implementation plan)
  • Field test with a real barangay disaster-response team
  • Android background carry service
  • SMS / satellite uplink for phones with satellite messaging
  • Export to existing reporting platforms
  • Cross-platform (iOS ↔ Android) mesh

Team

Name GitHub Role
Ian Patrick Flores @Muj-csv Team lead
Jace Matthew Catriz @anonymouslugaw Member
Fiona Guiao @pyonaa Member
Mary Princess Angel Dizon @mpadizon Member
Joey Cuison @joeycuison333-stack Member
Eiko Yaiki @gomezeiko Member
Mark Jemiel Guevarra GitHub pending Member

License

To be decided before submission.

Acknowledgments

Built for the Global Innovation Build Challenge V2.

About

When the towers fall, the barangay passes it on. Pasabi (Filipino: a message you ask someone to pass along) Peer-carried Alerts, Synthesized And Barangay-Indexed

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages