AI-powered attendance platform for classrooms. The system detects faces from classroom photos, recognizes registered students, and stores attendance records with reports and analytics.
- Multi-face classroom recognition with InsightFace (RetinaFace + ArcFace)
- Student lifecycle management (create, upload photos, generate embeddings, delete with cleanup)
- Attendance marking, daily reports, and CSV export
- Modern glassmorphism React dashboard with dark mode and analytics views
- Debug image support for recognition result verification
The frontend uses a polished glassmorphism design with:
- Dashboard — Live stats (total students, active classes, AI readiness), quick-action cards, getting-started checklist
- Students — Search/filter, avatar initials, progress indicators for photo/embedding readiness, auto-dismissing toasts, skeleton loading
- Mark Attendance — Enhanced upload zone with animations, confidence bar visualizations, step-by-step processing indicators, summary stats
- Reports — Summary stat cards (total, present, absent, attendance rate), status dot indicators, skeleton loading, alternating row tints
- Analytics — Class selector dropdown, real data from API, gradient bar charts, donut chart with legend, summary stats (avg attendance, best day, active days)
- Sidebar — Active indicator bar, user profile section, page description subtitles, notification bell
| Dashboard | Students | Mark Attendance |
|---|---|---|
| Live stats, quick actions, checklist | Search, avatars, progress bars | Upload zone, confidence bars |
| Reports | Analytics |
|---|---|
| Summary cards, status dots, export | Gradient charts, legend, real data |
| Layer | Technology |
|---|---|
| Backend | FastAPI, SQLAlchemy (async), Alembic, PostgreSQL |
| Frontend | React 19, TypeScript 6, Vite 8, Tailwind CSS v4, Zustand 5, Recharts |
| AI/ML | InsightFace, OpenCV, NumPy, ONNX Runtime |
| Infra | Docker, Docker Compose |
app/
├── api/ # FastAPI routes
├── services/ # Business logic and orchestration
├── ai/ # Detection/recognition pipeline wrappers
├── models/ # SQLAlchemy models
├── schemas/ # Pydantic schemas
├── core/ # Config and app settings
└── main.py # FastAPI entrypoint
frontend/
└── src/
├── api/ # Axios client + service layer
├── components/ # Layout (DashboardLayout) and common (ThemeToggle)
├── pages/ # Students, MarkAttendance, Reports, Analytics
├── store/ # Zustand theme store
└── index.css # Tailwind config + glassmorphism component classes
- Docker Desktop
- Node.js 20+ and npm
- Git
- Clone repository:
git clone https://github.com/JishnudipSaha/Smart-Attendance-System.git cd Smart-Attendance-System - Create
.env(you can copy from.env.example):APP_NAME="Smart Attendance System" DATABASE_URL=postgresql+asyncpg://postgres:password@db:5432/attendance_db SECRET_KEY=change-this-secret
- Start backend and database:
docker-compose up -d --build docker-compose exec backend alembic upgrade head - Start frontend:
cd frontend npm install npm run dev
- Frontend:
http://localhost:5173 - Backend API docs:
http://localhost:8000/docs - Health:
http://localhost:8000/health
| Purpose | Method | Endpoint |
|---|---|---|
| Register student | POST |
/students/ |
| Upload student photos | POST |
/students/{id}/upload-images |
| Generate embeddings | POST |
/ai/students/{id}/generate-embeddings |
| Recognize classroom | POST |
/recognition/classroom |
| Mark attendance | POST |
/attendance/mark |
| Attendance report | GET |
/attendance/report |
| Export report CSV | GET |
/attendance/export/csv |
Run from frontend/:
npm run dev # Start dev server
npm run build # Production build (tsc + vite)
npm run lint # Run ESLint
npm run preview # Preview production build- Student images and debug outputs are served under
/static. test_api.pyandtest_classroom.jpgare available in repo root for quick API smoke tests.- The glassmorphism design system uses custom CSS component classes (
.ui-card,.glass-panel,.ui-button-primary, etc.) defined inindex.css. - Tailwind CSS v4 note: custom component classes cannot be
@apply'd within@layer components— styles must be inlined.
Graphify outputs are available under graphify-out/:
graphify-out/graph.json- GraphRAG-ready structured graph datagraphify-out/graph.html- Interactive graph visualizationgraphify-out/GRAPH_REPORT.md- Plain-language architecture and dependency report
This project is intended for educational and personal use.