Offline-first school meal distribution tracking for Zambia — a digitalhands.in initiative
Hunger Free World replaces paper meal registers at Zambian schools with an offline-capable digital system. Every meal served to every student is recorded — even without internet — and synced to a Zambia-hosted server when connectivity returns.
Phase 1: 2 schools in Lusaka district, ~500 students Scale target: 500+ schools across Zambia, then Africa and UAE
graph TD
A[Student presents card/QR/NFC] --> B[Kiosk app scans]
B --> C{Online?}
C -->|Yes| D[Record to local SQLite + sync]
C -->|No| E[Record to local SQLite only]
E --> F[Sync when reconnected]
D --> G[Zambia PostgreSQL server]
F --> G
G --> H[Reports / Dashboard]
| Layer | Technology |
|---|---|
| Frontend | Next.js 14+ · PWA · Tailwind CSS |
| Local DB | sql.js (WASM SQLite) — zero-server, offline |
| Server DB | PostgreSQL 16 — Zambia-hosted |
| ORM | Drizzle ORM |
| API | Hono.js |
| Auth | Auth.js (NextAuth v5) |
| Android | Capacitor |
| Scanning | html5-qrcode + Web NFC API |
| Notifications | ntfy.sh |
| CDN/Tunnels | Cloudflare Free |
- Node 22+
- pnpm 9+
- PostgreSQL (local for dev, Zambia-hosted for prod)
# Clone
git clone https://github.com/digitalhands-in/hunger-free-world
cd hunger-free-world
# Install
pnpm install
# Configure
cp .env.example .env.local
# Edit .env.local with your database credentials
# Database
pnpm db:generate # Generate Drizzle migrations
pnpm db:migrate # Apply migrations
pnpm db:seed # Load dev data (2 schools, 50 students)
# Dev servers
pnpm dev # Starts web (port 3000) + api (port 3001)Navigate to /kiosk/scan for the full-screen meal scanning interface. Works offline.
hunger-free-world/
├── apps/
│ ├── web/ # Next.js 14 PWA
│ └── api/ # Hono.js REST API
├── packages/
│ ├── db/ # Drizzle ORM schema + migrations
│ └── shared/ # Types, validators, constants
├── docs/
│ ├── compliance/ # Zambia DPA docs, consent forms
│ └── architecture/ # System design docs
└── scripts/ # Pi/VPS setup, backup automation
This project handles children's personal data in Zambia and is built to comply with the Zambia Data Protection Act 2021:
- §70 Data Localisation: All PII stored on servers physically in Zambia
- §17 Children's Data: Parental consent required, recorded, and immutable
- §20 Data Controller Registration: ODPC registration checklist in
docs/compliance/ - Audit Logging: Every write operation logged with before/after snapshots
See docs/compliance/ for DPIA template, consent forms, and ODPC registration guide.
See CONTRIBUTING.md. PRs require a compliance impact section.
See SECURITY.md. Report vulnerabilities to security@digitalhands.in.
AGPL-3.0 © 2025 digitalhands.in
Network use requires open-sourcing modifications. No unauthorised SaaS deployments.