Survival LLM
A free AI assistant and survival library (1.5 million offline articles) that runs on your own computer, with no internet. Shows the source of every answer. Mac and Windows.
翻译准备中
尚未检测到更新。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