Digital authorization platform for flexible, verifiable student pickup in Kenyan boarding schools. Replaces handwritten letters and unverifiable phone calls with time-bound QR/OTP tokens, a pre-approved "Pickup Circle," USSD/SMS fallback for feature-phone users, and a full audit trail for administrators.
Boarding schools only release students to pre-listed guardians, but real life doesn't cooperate β sick parents, diaspora work, emergencies, trusted relatives stepping in. Today that's handled with forged-prone paper letters, teachers' personal WhatsApp, and unverifiable phone calls. No audit trail exists. Post-Endarasha, the Ministry of Education is pushing schools toward exactly this kind of accountability.
| Actor | Interface |
|---|---|
| Parent / Guardian | Mobile app (+ USSD/SMS fallback) |
| Authorized Picker | Mobile app / SMS OTP |
| Class Teacher / Gate Security | Tablet "scan & verify" app |
| School Administrator | Web dashboard |
| Ministry of Education (future) | Export/reporting API |
βββββββββββββββββββββββββββββ TIER 1: CLIENTS βββββββββββββββββββββββββββββ
β Parent/Picker Teacher/Gate Admin Web USSD/SMS β
β Mobile App Tablet App Dashboard (feature phones) β
β (React Native) (React Native) (React SPA) via gateway β
ββββββββββββββββ¬ββββββββββββββββ¬ββββββββββββββββ¬ββββββββββββββββ¬βββββββββββ
HTTPS/TLS 1.3 (all client traffic, no exceptions)
ββββββββββββββββΌββββββββββββββββΌββββββββββββββββΌββββββββββββββββΌββββββββββ
β TIER 2: APPLICATION SERVER β
β API Gateway β Auth Rate-Limit WAF β
β ββ Auth Service (OTP issuance, JWT, session mgmt, RBAC) β
β ββ Pickup Circle Service (guardian registration, ID verification) β
β ββ Authorization Service (pickup requests, time-window validation) β
β ββ Token Service (QR + OTP generation, single-use, signed) β
β ββ Gate Verification Svc (offline-capable token validation) β
β ββ Notification Service (SMS/USSD gateway, push notifications) β
β ββ Emergency Override Svc (admin-issued, fully logged) β
β ββ Audit/Reporting Service (tamper-evident event log, PDF/CSV export) β
ββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
encrypted connection, least-privilege DB user
ββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββ
β TIER 3: DATA LAYER β
β Primary DB (Postgres) D1 Users Β· D2 Auth Records Β· D3 Tokens β
β Audit Store (append-only) D4 Gate Verification Log β
β Object Storage (encrypted) ID photos, signed letters β
β Cache (Redis) active token lookups for offline sync β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Strict tier separation: clients never touch the database directly; every write goes through the application server's service layer, which is the only tier holding DB credentials.
This system touches child safety, national ID numbers, and location/timing of minors β treat it like a security-critical system, not a CRUD app.
- Identity verification: National ID + selfie match at Pickup Circle enrollment; admin approval required before a picker is "live."
- Tokens are single-use, short-lived, and cryptographically signed (JWT/HMAC) β not guessable, not reusable after redemption.
- Zero plaintext secrets: OTPs delivered via SMS only, never logged in plaintext server-side; hashed at rest if persisted at all.
- Transport security: TLS everywhere; certificate pinning on mobile clients.
- RBAC, enforced server-side per role (parent / picker / teacher / admin) β never trust a client-side role flag.
- Rate limiting & abuse protection on OTP requests, gate verification attempts, and USSD sessions (closing-day concurrency is a known load spike and a known attack window).
- Tamper-evident audit log: append-only, every pickup event and every emergency override immutably timestamped with the acting admin's identity β this is the system's core value proposition, not an afterthought.
- PII minimization & encryption at rest: National ID numbers and ID photos encrypted at rest (KMS-managed keys), access scoped and logged.
- Emergency override accountability: every override requires a logged reason, is time-boxed (30 min), and notifies the parent in parallel β no silent overrides.
- Offline gate verification: gate app must validate previously-synced tokens without live connectivity, without weakening signature checks (pre-fetch signed token batches, verify signature locally).
- Secrets management: no secrets in source control β env vars / secrets manager only.
- Regular dependency and OWASP Top 10 review, especially injection and broken-auth classes given the multiple entry points (app, web, USSD, SMS).
| Layer | Choice | Why |
|---|---|---|
| Mobile (parent/picker/teacher) | React Native | Single codebase, offline-first support |
| Admin web | React + TypeScript | Dashboard, reporting, export |
| API server | Node.js (NestJS) or Python (FastAPI) | Strong auth/middleware ecosystem |
| Database | PostgreSQL | Relational integrity for auth chains |
| Cache/session | Redis | Token lookups, rate limiting |
| SMS/USSD gateway | Africa's Talking or Twilio | Kenya-native SMS/USSD support |
| Push notifications | Firebase Cloud Messaging | Cross-platform |
| Auth | JWT + short-lived refresh tokens | Stateless, revocable |
| Infra | Docker + CI/CD (GitHub Actions) | Reproducible deploys |
- Auth & Pickup Circle β registration, OTP login, National ID verification, admin approval queue.
- Authorization + Token Service β pickup request β QR/OTP generation β delivery.
- Gate Verification app β scan/enter, AUTHORIZED/DECLINED screen, offline validation, release logging.
- Notification layer β parent push/SMS confirmation on collection.
- Emergency Override β admin flow with mandatory reason + time-box.
- USSD/SMS fallback β feature-phone authorization path.
- Audit & Reporting dashboard β filterable logs, PDF/CSV export.
- Security hardening pass β pen-test, rate-limit tuning, load test for closing-day concurrency.
- Pilot β 2β3 schools, one term, real closing-day event.
Modern, high-contrast, mobile-first. Large touch targets and minimal text for the gate app (elderly/low-literacy users must be able to interpret AUTHORIZED/DECLINED at a glance β green/red is load-bearing, not decorative). Swahili + English throughout. Parent app should echo the M-Pesa OTP mental model users already trust.
safepass/
βββ apps/
β βββ mobile-parent-picker/
β βββ mobile-gate/
β βββ admin-dashboard/
βββ services/
β βββ auth-service/
β βββ pickup-circle-service/
β βββ authorization-service/
β βββ token-service/
β βββ gate-verification-service/
β βββ notification-service/
β βββ audit-service/
βββ infra/
β βββ docker/
β βββ ci/
βββ docs/
β βββ SafePass_INTE451_Report.docx
βββ README.md