vjkuilkk
# CampusIQ Africa
Offline-first Progressive Web App for administering Schools and Universities (General, Technical/Vocational, Higher Ed) across Africa. Single combined service (React PWA frontend + Express API backend) deployed on Railway, with Google Sheets as the live data backend. Multilingual: French / English / Spanish / Arabic (full RTL).
## Why this architecture
- **One Railway service** — the Express server serves both the JSON API (`/api/*`) and the built React app (`/`), so there's nothing extra to host or wire together.
- **Google Sheets as the database** — every "table" is a tab in one spreadsheet. Zero database ops, your school admins can audit/export raw data anytime, and a non-technical ministry official can open the same spreadsheet in a browser.
- **Offline-first PWA** — a service worker caches the app shell + last-seen data; an IndexedDB queue captures every create/update made while offline (e.g. a teacher taking attendance in a village with no signal) and auto-syncs to `/api/sync` the moment connectivity returns.
## Key features
- **Multi-tenant**: any number of institutions (schools/universities) in one deployment, each scoped by `institution_id`. A `SuperAdmin` role sees everything; `InstitutionAdmin`/`Teacher`/`Parent` roles are scoped to their own institution.
- **Modules**: Students, Staff, Classes & Programs, Attendance, Grades & Assessments, Fees & Finance, Admissions, Certificates/Documents, Announcements, Analytics.
- **Early-warning analytics**: a transparent, rule-based "at-risk student" detector (low attendance and/or low grades) — explainable, no ML infrastructure needed for v1, upgradeable later.
- **Offline sync indicator**: a live pulse showing online/offline state and pending changes, with one-tap manual sync.
- **i18n with RTL**: FR/EN/SP/AR, instant language switching, Arabic flips the whole layout to right-to-left.
- **Audit log**: every create/update/delete is recorded (who, what, when, online or offline-synced, device). …