Generus — Youth Attendance & Curriculum Tracking
A PWA for a three-level youth programme — district, village, group — covering attendance, monthly curriculum targets and reading progress, with access scoped in the database itself.
- My role
- Sole developer — product spec, data model, app and deployment.
- Field
- Web Development
- Next.js
- TypeScript
- PostgreSQL
- Supabase
- Drizzle ORM
- Dexie
- Tailwind CSS
- Vitest
Overview
Attendance, monthly curriculum targets and Qur’an reading progress used to live in notebooks, spreadsheets and group chats, so nobody above group level could see what was happening below them. Generus puts all three in one installable web app, used by admins on phones and by the curriculum team on laptops.
The hard requirement was the 300-person village gathering. Members carry a printed QR card; three or four officers scan at the door with their own phones, each scan confirmed locally in under a second and queued in IndexedDB. Duplicates are dropped, lateness is derived from the agenda’s cut-off, and the queue syncs idempotently when the signal returns.
Who sees what is enforced in Postgres, not just in the UI. Every unit carries an ltree path, so “this unit and everything under it” is one indexed condition, and row-level security applies it to every table. The curriculum team gets aggregate achievement figures through security-definer functions without ever reading an individual member’s row.
In pictures





Function
- Scale
- 1 district, 10 villages, 60 groups, ~5,000 members
- Attendance
- Checklist for small sessions, multi-officer QR scanning for large ones
- Access
- Postgres RLS over an ltree unit hierarchy, six roles
What it does
- 01Region tree, accounts and six roles — from superadmin to read-only kyai — each bound to one unit and everything below it.
- 02Member records with Excel import, bulk level promotion, and status changes that keep history intact.
- 03Printable portrait ID cards carrying a random QR token rather than personal data.
- 04One-off and weekly agendas that cascade to the units beneath them.
- 05Offline-first QR scanning with several officers per agenda, plus name search as a fallback.
- 06Delegated completion window for group admins, then automatic locking via pg_cron.
- 07Curriculum library, period targets copied forward each month, and kitab progress tracked by verse or page.
- 08Cross-unit achievement recap, dashboard and monthly report.
- 09Curriculum modules switchable per deployment for a staged rollout.
Technical notes
- Platform choice
- PWA first — iPhone users and laptop dashboards on one codebase; a native Android app came later
- QR on iOS
- BarcodeDetector with a zxing WASM fallback
- Tests
- 137 tests; migrations and RLS run against PGlite, no Docker