Empowering Schools Through Intelligent Digital Transformation
AI-powered Educational Intelligence Platform for low-resource schools — with role-based dashboards for Principals, Teachers, Parents, and Students.
| Layer | Tech |
|---|---|
| Frontend | Next.js 15, React 19, TypeScript, Tailwind CSS 4, shadcn/ui, Framer Motion, React Query, Recharts |
| Backend | FastAPI, Pydantic, JWT, SlowAPI rate limiting |
| Database | PostgreSQL (Supabase) — schema in supabase/migrations |
| Auth | JWT + Supabase Auth ready |
| AI | Google Gemini (grounded fallbacks when key missing) |
| Deploy | Vercel (frontend) · Render (backend) |
Demo mode serves a full Pakistani school dataset (500 students, 30 teachers, 500 parents, 10 classes, 8 subjects) without requiring Postgres.
cd backend
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activate
pip install -r requirements.txt
copy .env.example .env # or: cp .env.example .env
uvicorn app.main:app --reload --port 8000API docs: http://localhost:8000/docs
cd frontend
copy .env.example .env.local # or: cp .env.example .env.local
npm install
npm run dev| Role | Password | |
|---|---|---|
| Admin | admin@schoolsphere.ai | demo1234 |
| Teacher | teacher@schoolsphere.ai | demo1234 |
| Parent | parent@schoolsphere.ai | demo1234 |
| Student | student@schoolsphere.ai | demo1234 |
SchoolSphere-AI/
├── frontend/ # Next.js SaaS UI
│ └── src/
│ ├── app/ # Landing, auth, role dashboards
│ ├── components/ # UI, charts, landing, layout
│ └── lib/ # api, auth, utils
├── backend/
│ └── app/
│ ├── api/v1/ # REST routes
│ ├── core/ # config, security, rate limit
│ ├── models/ # SQLAlchemy ORM
│ ├── services/ # demo data + Gemini AI
│ └── db/ # sessions
├── supabase/migrations/ # PostgreSQL schema
└── docs/
All AI endpoints live under /api/v1/ai/* and are grounded in school metrics (never invent roster data):
- Report card comments
- Parent progress summary
- Student performance analyzer
- Early warning system
- Dropout risk prediction
- Principal AI copilot
- Teacher performance summary
- Monthly school report
- Lesson planner
- Question paper generator
- Quiz analyzer
- Study planner
- Career guidance
- PTM assistant
- School health score
- Explain charts
- Recommendations
- Improvement roadmap
- Equity dashboard
- SDG dashboard
Set GEMINI_API_KEY in backend/.env for live Gemini responses. Without it, deterministic grounded fallbacks still work.
- Create a Supabase project
- Run
supabase/migrations/001_initial_schema.sqlin the SQL editor - Set
DEMO_MODE=falseand configure:
DATABASE_URL=postgresql+asyncpg://...
SUPABASE_URL=...
SUPABASE_ANON_KEY=...
SUPABASE_SERVICE_ROLE_KEY=...
SUPABASE_JWT_SECRET=...
JWT_SECRET=...
GEMINI_API_KEY=...
CORS_ORIGINS=https://your-frontend.vercel.app- Frontend env:
NEXT_PUBLIC_API_URL=https://your-api.onrender.com/api/v1
NEXT_PUBLIC_SUPABASE_URL=...
NEXT_PUBLIC_SUPABASE_ANON_KEY=...- Root directory:
frontend - Build:
npm run build - Env:
NEXT_PUBLIC_API_URL
- Root:
backend - Start:
uvicorn app.main:app --host 0.0.0.0 --port $PORT - Env: copy from
.env.example
See render.yaml and frontend/vercel.json.
MIT — portfolio / educational use.