尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證正在載入完整 README。 以下為已儲存的摘錄。
Barangay-level typhoon early warning and evacuation coordination — that keeps working when the network doesn't.
Salba (save) + Bayan (town, nation).
Status: live. The MVP is deployed and running for Barangay #5 Callaguip, Batac City, Ilocos Norte.
Open the app → · Deliverables →
The resident's map: the barangay outline, the walking route to the nearest evacuation centre, the next turn, and the cache state in the strip at the top. Open it on a phone, turn airplane mode on, reload — it still draws.檢視完整 README ↗Barangay-level typhoon early warning and evacuation coordination — that keeps working when the network doesn't.
Salba (save) + Bayan (town, nation).
Status: live. The MVP is deployed and running for Barangay Nilombot, Mapandan, Pangasinan. Open the app → · Deliverables →
The resident's map: the barangay outline, the walking route to the nearest evacuation centre, the next turn, and the cache state in the strip at the top. Open it on a phone, turn airplane mode on, reload — it still draws.
| Final MVP | https://salba-bayan.vercel.app |
| Pitch deck | stage-5/SalbaBayan-Pitch-Deck.pdf — 11 slides |
| User manual | stage-5/SalbaBayan-User-Manual.pdf — 12 pages, for residents, volunteers and officials |
| Requirements & design | stage-2/ — the PRD and the wireframes this was built from |
The Philippines takes roughly 20 tropical cyclones a year. Two things break at exactly the wrong moment:
On top of that, dedicated IoT water-level sensors cost too much to deploy at barangay scale, and a resident in immediate danger has no fast way to summon help and be found.
A Progressive Web App that replaces expensive infrastructure with structure:
Deliberately no machine learning, no peer-to-peer networking, no custom cryptography, no IoT hardware. Every piece is a mainstream library or a managed service, so a two-person team can build and maintain it.
SalbaBayan is not built to survive a total, indefinite communications blackout — that would need a peer-to-peer mesh, which is out of scope. It is built for the realistic case: intermittent connectivity, where the client keeps working through the gaps and reconciles when a connection returns.
And it never pretends. Wherever the screen is showing something it could not re-check, it says so: CACHED 2 HOURS AGO, 2 WAITING TO SEND, NOT SENT YET — residents have not been told. A cache that forges freshness is worse than no cache.
ONLINE Supabase (Postgres · Auth · Realtime · Row Level Security)
│ HTTPS reads/writes + Realtime subscriptions
Next.js client (Vercel-hosted PWA)
│ │
Service Worker cache Dexie / IndexedDB write queue
(app shell, routes, (reports, SOS, headcounts,
the barangay snapshot, check-ins, advisory changes)
street map, translations) │ auto-flush on reconnect
back to Supabase
OFFLINE: reads come from the cached snapshot, writes queue locally, and the UI
stays fully usable — including the map, which falls back to the barangay's own
drawn street grid when the tile server cannot be reached. No feature depends on
another device being nearby; every device talks only to Supabase.
Local-first for writes, cloud-first for truth. The UI never blocks on the network, but there is exactly one source of truth. Because devices never sync directly with each other, no conflict resolution is needed beyond retrying the queued write.
Residents
Volunteers
Officials
Everywhere
| Layer | Technology |
|---|---|
| Frontend | Next.js 16 (App Router) · React 19 · Tailwind CSS v4 |
| Backend | Supabase — Postgres, anonymous Auth, Realtime, Row Level Security |
| Hosting | Vercel |
| Offline | Serwist (Service Worker) · Dexie.js (IndexedDB write queue) |
| Maps | MapLibre GL JS · OpenFreeMap (OpenStreetMap data) · an offline street grid generated from OSM |
| Routing | Dijkstra over the barangay's own street graph, on the phone |
| Bulletins | PAGASA's tropical cyclone bulletin, parsed server-side in a route handler |
| QR | qrcode (generation) · jsqr (scanning) |
Roles (resident / volunteer / official) are enforced by Postgres Row Level Security at the database layer, not just in the UI. A device cannot promote itself; an official grants roles by device code.
npm install
cp .env.example .env.local # fill in from the Supabase dashboard
npm run dev
Both Supabase values are publishable rather than secret — the security boundary is Row Level Security, not key secrecy.
npm run verify
verify is the gate: lint, the write-path and queue guards, the advisory, routing, language, geometry, headcount, check-in, readiness, rescue, hazard, translation and bulletin suites, a production build, and then 41 row-level-security checks fired against the live database with real anonymous sessions. 432 checks in total, and it is what every change has to pass.
The database is rebuildable from this repository: supabase/migrations/ holds the schema, the policies and every UI string, and a guard fails the build if the app asks for wording no migration seeds.
| Path | Contents |
|---|---|
src/ | The application — App Router pages, components, and lib/ where the rules live |
supabase/migrations/ | Schema, RLS policies, and every translated string |
scripts/ | The verification suites, the map generator, and the OSM extract |
stage-2/ | The PRD and the eight wireframes this was built from |
stage-5/ | The pitch deck and the user manual, with their sources |
docs/ | Working notes — the task log, the runbook, and the barangay handoff |
Stated up front — these are accepted trade-offs, not oversights.
Base map © OpenStreetMap contributors, served via OpenFreeMap. Bulletin data from PAGASA (DOST). Neither endorses this project.
RCGOAT
Track: Climate Resilience and Hydrometeorological Disaster Management