Open Source · 2026 · Colombia
Grietas Vivas
A PWA that helps people run a preliminary triage of cracks after an earthquake, from a phone and without a connection.

- Type
- Open Source
- Year
- 2026
- Country
- Colombia
- Status
- Live
The project
After an earthquake, many people do not know whether their home is safe, and structural engineers cannot keep up with the requests. Grietas Vivas was built in response to the emergency in Cali: a progressive web app that runs in the browser, with nothing to install from an app store. The person photographs the crack and the app records GPS, device orientation and a server-certified timestamp. They then answer four questions about the affected element, whether the crack runs from side to side, whether it grew, and a scale reference. An AI analyzes the image and a rules engine based on NSR-10 and FEMA 306 adjusts the risk level, because the model can be wrong. The result can be downloaded as an immutable PDF with a SHA-256 hash, which works as verifiable evidence for authorities or insurers. It is offline-first for areas with intermittent connectivity. It is a preliminary triage: it does not replace a professional inspection.
Architecture
Offline-first Next.js PWA with a Service Worker. Pending captures (up to 50) are stored in IndexedDB and synced in chronological order, with retries and exponential backoff, when the connection returns. Without a network, a deterministic emergency engine based on NSR-10 and FEMA 306 takes over. The backend uses Next.js Server Actions with Zod validation and Supabase (PostgreSQL with RLS, Auth, Storage and pgvector for a calibration bank). A decoupled AI adapter lets people use their own key (Anthropic, OpenAI, Gemini, OpenRouter or MiniMax) or a public fallback mode with automatic failover between providers. EXIF data is stripped before the image is sent. PDFs are generated by a Supabase Edge Function with the SHA-256 hash embedded, and there is a public map of affected areas and a visual guide to crack types. Tested with Vitest and fast-check.