Skip to content

shivamhuyrr/face-attendance-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enterprise Face Attendance System

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.

🚀 Key Features

  • 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.

🛠️ Tech Stack

  • 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)

📂 Project Structure

├── 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

📚 Detailed Documentation

  • 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.

⚡ Quick Start

1. Local Development (Docker)

The easiest way to run the entire stack (Backend + Frontend):

docker-compose up -d --build

This will start:

  • Backend at http://localhost:8000
  • Frontend at http://localhost:5173

2. Verify Health

Run the included Python script to ensure everything is connected:

python verify_deployment.py

☁️ Deployment

1. Push to Docker Hub

We build images locally to avoid memory issues on free cloud tiers. Run the script and follow the prompts:

.\push_to_dockerhub.bat

2. Deploy to Render

The 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!

🤝 Contribution

Contributions are welcome! Please fork the repository and submit a pull request.

📄 License

MIT License

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors