Skip to content
Nur Amin
← All projects
P-03Generus2026

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
Stack
  • 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

Generus logo with the desktop home page in a browser and the same page on a phone, showing an ongoing gathering with 142 of 528 recorded.
FIG. 01One app for phones and laptops: sidebar on desktop, bottom tabs on mobile. Mockups redrawn with sample data; the app UI is in Indonesian.
Three phones scanning QR cards for the same gathering — recorded, already recorded, and late — above a four-step flow from reading the card to syncing with ON CONFLICT DO NOTHING.
FIG. 02Several officers, no signal needed: scans are matched on the device and the first record wins.
A unit tree with ltree paths where a village and its four groups are highlighted, next to the generus_select RLS policy, an aggregate recap for the curriculum team, and six role cards.
FIG. 03Who sees what is one indexed ltree condition, enforced by row-level security on every table.
Desktop attendance page for a village gathering: status totals, a checklist with H/T/I/S/A buttons per person, and side panels for per-group progress, scan officers, the delegation window and automatic locking.
FIG. 04Checklist attendance, a delegated window for group admins, then automatic locking via pg_cron.
The October 2026 curriculum period with Qur’an and kitab targets and a memorisation item in Arabic, next to per-member reading progress by verse and a materials checklist.
FIG. 05Monthly targets per level, with reading progress tracked to the verse or page.

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

  1. 01Region tree, accounts and six roles — from superadmin to read-only kyai — each bound to one unit and everything below it.
  2. 02Member records with Excel import, bulk level promotion, and status changes that keep history intact.
  3. 03Printable portrait ID cards carrying a random QR token rather than personal data.
  4. 04One-off and weekly agendas that cascade to the units beneath them.
  5. 05Offline-first QR scanning with several officers per agenda, plus name search as a fallback.
  6. 06Delegated completion window for group admins, then automatic locking via pg_cron.
  7. 07Curriculum library, period targets copied forward each month, and kitab progress tracked by verse or page.
  8. 08Cross-unit achievement recap, dashboard and monthly report.
  9. 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