A scalable, reliable, and secure face attendance system built with FastAPI (Backend) and OpenCV/Face_Recognition (Client). Designed for multi-camera environments and centralized data management.
- Centralized Backend: A robust REST API powered by FastAPI handling all user data and logs.
- Scalable Architecture: Client-Server model allows multiple camera units ("Eyes") to sync with one central server ("Brain").
- Real-time Synchronization: Camera units automatically fetch updated employee data on startup.
- Spam Prevention: Intelligent client-side caching prevents duplicate attendance logs.
- Database: SQLite integration (easily upgradeable to PostgreSQL) using SQLAlchemy.
- Backend: Python 3.9, FastAPI, Uvicorn
- Database: Supabase (PostgreSQL)
- Storage: Supabase Storage (S3-compatible)
- AI/ML:
dlib,face_recognition,OpenCV(Headless) - Infrastructure: Docker, Docker Compose, Render (Cloud)
├── backend/ # FastAPI Application (Dockerized)
│ ├── app/ # Source Code
│ └── Dockerfile # Production Docker Config
├── frontend/ # React/Vite Application
├── documentation/ # Architecture & Flows
├── docker-compose.yml # Local Orchestration
├── push_to_dockerhub.bat # Deployment Script
├── verify_deployment.py # Health Check Script
- System Architecture: High-level overview of the system, including the problem statement and real-life impact.
- Workflow: Step-by-step breakdown of user registration, attendance marking, and monitoring flows.
- ER Diagram: Visual representation of the database schema and relationships.
- Infrastructure Flow: detailed data flow between the client, server, and cloud services.
- Tech Stack: In-depth look at the technologies used in the frontend, backend, and AI components.
The easiest way to run the entire stack (Backend + Frontend):
docker-compose up -d --buildThis will start:
- Backend at
http://localhost:8000 - Frontend at
http://localhost:5173
Run the included Python script to ensure everything is connected:
python verify_deployment.pyWe build images locally to avoid memory issues on free cloud tiers. Run the script and follow the prompts:
.\push_to_dockerhub.batThe render.yaml file configures the service to pull your image from Docker Hub.
- Connect your repo to Render Blueprints.
- Add Environment Variables:
SUPABASE_URL,SUPABASE_KEY. - That's it!
Contributions are welcome! Please fork the repository and submit a pull request.
MIT License