🏗️ System Architecture & Design
The project follows a scalable MVC (Model-View-Controller) architecture to ensure clean code separation and maintainability. A high-level overview of the Client-Server-Database logic handles user registration and daily video check-ins gracefully.
EmpVision/
│
├── .streamlit/
│ └── config.toml
│
├── app/
│ ├── __init__.py
│ ├── core/ # ⚙️ Config & Database connection
│ │ ├── config.py
│ │ └── database.py
│ ├── models/ # 🗄️ Database Schemas (SQLAlchemy)
│ │ └── employee.py
│ ├── services/ # 🧠 AI Logic (Face Recognition & Detection)
│ │ └── face_logic.py
│ ├── controllers/ # 🎮 API Route Handlers
│ │ └── auth_controller.py
│ └── main.py # 🚀 Application Entry Point (FastAPI)
│
├── frontend.py # 🎨 Streamlit Dashboard (The UI)
├── .env # 🔒 Environment Variables
├── environment.yml # 📦 Conda Dependencies
└── README.md # 📖 Documentation
🚀 Usage & Installation
1. Prerequisites & Environment
Uses strict Conda dependency management (environment.yml) running natively or via WSL 2. PostgreSQL is configured for robust concurrent data persistence.
2. Backend Engine (Terminal 1)
FastAPI acts as the deep-learning orchestrator handling video streams via uvicorn app.main:app --reload.
3. Frontend Dashboard (Terminal 2)
The visual UI launches via streamlit run frontend.py, enabling immediate cross-origin configuration mapped dynamically to the API.
4. Remote Edge Access
Supports instant LAN or WAN mirroring via Ngrok tunnels, streaming the reactive dashboard directly to mobile devices without latency delays.
🗺️ Strategic Roadmap (v2.0)
From a foundational prototype to a production-ready intelligence network.