gre-materiales

2025 own product · PWA In production
All projects

PWA for consulting 2,661 hazardous materials (ERG 2024). Real-time search, OCR scanner, offline mode.

The problem

Emergency response teams in Peru need to look up hazardous materials under pressure — fires, spills, accidents. The ERG 2024 guide has 2,661 materials. The physical book takes 30-60 seconds per lookup. No offline app in Spanish existed.

The solution

Built a PWA that loads all 2,661 materials into IndexedDB on first use. Real-time search filters by name, UN number, and synonyms in under 100ms. An OCR scanner (Tesseract.js) reads codes from physical labels and resolves the material automatically. Works 100% offline.

Impact

  • Search in < 100ms across 2,661 materials with no internet connection
  • OCR replaces 30-60 sec of manual lookup with < 3 seconds
  • 100% offline — critical in areas without cell coverage
$ ./gre-materiales --search

  ┌──────────────────────────────────────┐
  │ 🔍  buscar por nombre o número UN    │
  │ > UN 1203_                           │
  ├──────────────────────────────────────┤
  │ UN 1203  Gasolina / Petrol           │
  │          Clase 3 · INFLAMABLE ⚠     │
  │          Guía 128 · Evacuar 100m     │
  ├──────────────────────────────────────┤
  │ [📷 Escanear OCR]   [offline ✓]     │
  └──────────────────────────────────────┘

  ✓ 2,661 materiales cargados localmente

Stack

Next.js 16 SSG
Pre-renders all pages; fast initial load without client JS
Tesseract.js
Fully client-side OCR — no server, no latency, works offline
IndexedDB + PWA
2,661 records loaded locally on first use; instant search without network
PostgreSQL
Source of truth for the multi-tenant SaaS model; deferred sync
  • Next.js 16
  • TypeScript
  • PostgreSQL
  • PWA
  • Tesseract.js

Keyboard shortcuts

H
Home
A
About
P
Projects
C
Contact
G
GitHub
?
Show shortcuts