# ElimuSphere Kenya
One app for every step of a Kenyan household's CBC/CBE journey - PP1 through Senior School. ElimuSphere brings Mwalimu AI tutoring, KICD-aligned lessons, CBAF-scored assessments, M-Pesa fee payments, and real-time parent reports into a single offline-friendly Progressive Web App, with purpose-built experiences for Learners, Teachers, Parents, Schools, and Admins.
## Tech stack
- **Frontend:** React 18 + Vite, React Router v7, Tailwind CSS v4, Framer Motion (`motion`), Recharts, Lucide icons
- **Backend:** Node.js + Express, served via Vite middleware in dev and as static files in production
- **Auth:** JWT access tokens + bcrypt password hashing, role-based route protection
- **AI layer:** Google Gemini (`@google/genai`), structured as three cooperating agents - Tutor/Explainer, Assessment, and Insight
- **Payments:** M-Pesa Daraja (STK Push), shaped around the real Safaricom API contract with a simulated sandbox fallback
- **PWA:** Real web app manifest, installable icons, and an app-shell service worker for offline support
## Getting started
```bash
npm install
npm run dev
```
The app runs at `
localhost`. No configuration is required to explore the product - AI and M-Pesa endpoints run in clearly-labeled simulated mode until you add real credentials (see below).
### Demo accounts
| Role | Email | Password |
|---------|---------------------------------|---------------|
| Learner | jomo.mwangi@elimusphere.ke | password123 |
| Teacher | nancy.wanjiku@elimusphere.ke | password123 |
| Parent | parent.mwangi@elimusphere.ke | password123 |
You can also sign up fresh as a Learner, Teacher, Parent, or School Administrator from `/signup`.
## Enabling real integrations
Copy `.env.example` to `.env` and fill in:
- **`JWT_SECRET`** - any long random string (always set this for production)
- **`GEMINI_API_KEY`** - enables Mwalimu AI tutoring, lesson generation, and parent insight lett …