How aadhi-shangar/face-recognition-attendance-system works
This is a browser-based employee attendance system: an administrator manages enrolled users, while employees use a camera kiosk for face recognition and daily check-in. The principal runtime path is browser capture → API recognition → biometric matching → duplicate-aware attendance recording; separate branches provide authentication, employee management, dashboard analytics, and attendance history/export. The diagram uses README architecture statements and source-index references where available; unsampled frontend and router internals are not claimed beyond documented routes and capabilities.
Main entry points: api.js HTTP client · main.py FastAPI application · recognition_service.py Recognition service · attendance_service.py Attendance service
Components 29
Browser frontend
- HTTP client
frontend/js/api.js - Login UI
frontend/js/auth.js - Employee directory
frontend/js/users.js - Camera enrollment
frontend/js/register-user.js - Recognition kiosk
frontend/js/recognition.js - Attendance history
frontend/js/attendance.js - Analytics dashboard
frontend/js/dashboard.js
API and workflows
- FastAPI application
app/main.py - Authentication routes
app/routers/auth.py - Employee routes
app/routers/users.py - Recognition routes
app/routers/recognition.py - Attendance routes
app/routers/attendance.py - Dashboard routes
app/routers/dashboard.py - Authentication service
app/services/auth_service.py - Employee service
app/services/user_service.py - Recognition service
app/services/recognition_service.py - Attendance service
app/services/attendance_service.py
Biometric processing
- Face detection
app/vision/face_detector.py - Face encoding
app/vision/encoder.py - Embedding matching
app/vision/face_recognizer.py
Persistence and security
- Biometric file storage
app/utils/file_handler.py - JWT and password security
app/utils/security.py - Runtime settings
app/config.py - Database sessions and schema
app/database.py - Administrator records
app/models/admin.py - Employee records
app/models/user.py - Attendance records
app/models/attendance.py
Other components
- Administrator
- Employee kiosk user
Connections 40
- Administrator → Login UI: signs in
- Administrator → Employee directory: manages employees
- Employee kiosk user → Recognition kiosk: presents face
- Login UI → HTTP client: sends login
- Employee directory → HTTP client: requests CRUD
- Camera enrollment → HTTP client: submits image
- Recognition kiosk → HTTP client: submits frame
- Attendance history → HTTP client: requests history
- Analytics dashboard → HTTP client: requests metrics
- HTTP client → FastAPI application: sends HTTP
- FastAPI application → Authentication routes: registers routes
app/main.py - FastAPI application → Employee routes: registers routes
app/main.py - FastAPI application → Recognition routes: registers routes
app/main.py - FastAPI application → Attendance routes: registers routes
app/main.py - FastAPI application → Dashboard routes: registers routes
app/main.py - Authentication routes → Authentication service: authenticates
app/routers/auth.py - Employee routes → Employee service: delegates CRUD
app/routers/users.py - Recognition routes → Attendance service: marks check-in
app/routers/recognition.py - Attendance routes → Attendance service: queries logs
app/routers/attendance.py - Dashboard routes → Attendance service: loads metrics
app/routers/dashboard.py - Attendance service → Recognition service: recognizes frame
app/services/attendance_service.py - Recognition service → Face detection: detects faces
app/services/recognition_service.py - Recognition service → Face encoding: encodes face
app/services/recognition_service.py - Recognition service → Embedding matching: compares embeddings
app/services/recognition_service.py - Recognition service → Biometric file storage: loads encodings
app/services/recognition_service.py - Employee service → Face detection: validates enrollment
app/services/user_service.py - Employee service → Face encoding: creates embedding
app/services/user_service.py - Employee service → Biometric file storage: stores biometrics
app/services/user_service.py - Face encoding → Face detection: uses locations
app/vision/encoder.py - Authentication service → JWT and password security: hashes and signs
app/services/auth_service.py - Authentication service → Administrator records: queries and seeds
app/services/auth_service.py - Authentication routes → Administrator records: resolves admin
app/routers/auth.py - Authentication routes → JWT and password security: validates token
- Database sessions and schema → Runtime settings: reads configuration
app/database.py - Database sessions and schema → Administrator records: creates schema
app/database.py - Database sessions and schema → Employee records: creates schema
app/database.py - Database sessions and schema → Attendance records: creates schema
app/database.py - Attendance service → Employee records: queries employee
app/services/attendance_service.py - Attendance service → Attendance records: checks and records
app/services/attendance_service.py - Recognition service → Employee records: loads gallery users
app/services/recognition_service.py