How karthikbhukya2005/faceattend-ai works
FaceAttend AI combines a role-aware attendance web portal with a FastAPI backend. The main workflow runs from sign-in or camera capture through the frontend API client to backend authentication, facial recognition and attendance handling, with relational records supporting dashboards and analytics. A separate assistant workflow combines document ingestion, embeddings, retrieval, live attendance context, and response generation. The README documents capabilities whose individual implementations were not sampled; those are represented at subsystem level where the tree supports a path.
Main entry points: App.tsx Protected app routes · main.py FastAPI application · api.ts HTTP API client · retrieval_service.py Semantic retrieval
Components 34
Web portal
- Protected app routes
frontend/src/App.tsx - Sign-in
frontend/src/pages/Login.tsx - Camera capture
frontend/src/components/WebcamCapture.tsx - Face attendance
frontend/src/pages/FaceAttendance.tsx - Attendance portal
frontend/src/pages/Attendance.tsx - Dashboards
frontend/src/pages/Dashboard.tsx - User management
frontend/src/pages/Users.tsx - Analytics view
frontend/src/pages/Analytics.tsx - Assistant UI
frontend/src/components/ChatWindow.tsx - Session storage
frontend/src/services/auth.ts - HTTP API client
frontend/src/services/api.ts
Backend API
- FastAPI application
backend/app/main.py - Authentication API
backend/app/api/auth.py - Attendance API
backend/app/api/attendance.py - Face API
backend/app/api/face.py - Users API
backend/app/api/users.py - Analytics API
backend/app/api/analytics.py - AI API
backend/app/api/ai.py
Attendance domain
- Face recognition
backend/app/services/face_recognition_service.py - Attendance rules
backend/app/services/attendance_service.py - Analytics service
backend/app/services/analytics_service.py
AI knowledge assistant
- Document ingestion
backend/app/services/document_ingestion_service.py - Text chunking
backend/app/services/chunking_service.py - Embedding generation
backend/app/services/embedding_service.py - Semantic retrieval
backend/app/services/retrieval_service.py - RAG orchestration
backend/app/services/rag_service.py - Answer generation
backend/app/services/llm_service.py
Identity and records
- JWT and roles
backend/app/core/security.py - Relational database
backend/app/db/database.py - User records
backend/app/models/user.py - Attendance records
backend/app/models/attendance.py - Audit logs
backend/app/models/audit_log.py - Department records
backend/app/models/department.py
Other components
- Admin or student
Connections 48
- Admin or student → Protected app routes: uses portal
README.md - Protected app routes → Sign-in: routes to
frontend/src/App.tsx - Protected app routes → Face attendance: routes to
frontend/src/App.tsx - Protected app routes → Attendance portal: routes to
frontend/src/App.tsx - Protected app routes → Dashboards: routes to
frontend/src/App.tsx - Protected app routes → User management: routes to
frontend/src/App.tsx - Protected app routes → Analytics view: routes to
frontend/src/App.tsx - Protected app routes → Assistant UI: routes to
frontend/src/App.tsx - Protected app routes → Session storage: checks session
frontend/src/App.tsx - Sign-in → HTTP API client: submits credentials
- Face attendance → Camera capture: captures frames
frontend/src/pages/FaceAttendance.tsx - Face attendance → HTTP API client: requests recognition
frontend/src/pages/FaceAttendance.tsx - Attendance portal → HTTP API client: requests records
frontend/src/pages/Attendance.tsx - Dashboards → HTTP API client: requests summaries
frontend/src/pages/Dashboard.tsx - User management → HTTP API client: manages users
frontend/src/pages/Users.tsx - Analytics view → HTTP API client: requests analytics
- Assistant UI → HTTP API client: sends chat
frontend/src/components/ChatWindow.tsx - HTTP API client → FastAPI application: calls API
README.md - FastAPI application → Authentication API: mounts router
backend/app/main.py - FastAPI application → Attendance API: mounts router
backend/app/main.py - FastAPI application → Face API: mounts router
backend/app/main.py - FastAPI application → Users API: mounts router
backend/app/main.py - FastAPI application → Analytics API: mounts router
backend/app/main.py - FastAPI application → AI API: mounts router
backend/app/main.py - Authentication API → JWT and roles: validates identity
backend/app/api/auth.py - Face API → Face recognition: recognizes faces
- Attendance API → Attendance rules: processes attendance
- Analytics API → Analytics service: computes metrics
- AI API → RAG orchestration: handles chat
backend/app/api/ai.py - AI API → Document ingestion: accepts uploads
backend/app/api/ai.py - Document ingestion → Text chunking: chunks text
backend/app/services/document_ingestion_service.py - Semantic retrieval → Embedding generation: embeds documents
backend/app/services/retrieval_service.py - Semantic retrieval → Document ingestion: loads chunks
backend/app/services/retrieval_service.py - RAG orchestration → Semantic retrieval: retrieves context
backend/app/services/rag_service.py - RAG orchestration → Answer generation: generates answer
backend/app/services/rag_service.py - Answer generation → User records: queries identity
backend/app/services/llm_service.py - Answer generation → Attendance records: queries attendance
backend/app/services/llm_service.py - Semantic retrieval → User records: indexes user context
backend/app/services/retrieval_service.py - Semantic retrieval → Attendance records: indexes attendance context
backend/app/services/retrieval_service.py - Semantic retrieval → Department records: indexes departments
backend/app/services/retrieval_service.py - JWT and roles → User records: loads account
backend/app/core/security.py - Authentication API → Relational database: uses sessions
backend/app/api/auth.py - Attendance API → Attendance records: reads and writes
backend/app/api/attendance.py - Attendance API → Audit logs: records changes
backend/app/api/attendance.py - Relational database → User records: maps table
backend/app/models/user.py - Relational database → Attendance records: maps table
backend/app/models/attendance.py - Relational database → Audit logs: maps table
backend/app/models/audit_log.py - Relational database → Department records: maps table
backend/app/models/department.py