How manisha-v/face-recognition-based-employee-attendance-logger works
Project Type and Purpose
• This is a full-stack, monolithic web application for employee attendance using face recognition.
• Built with Python/Flask (backend), SQLite (persistence), HTML/CSS/JS (frontend), and ML libraries (OpenCV, dlib, face_recognition, deepface).
Top-Level Architecture Components
a. Client (Browser)
• Renders HTML templates
• Runs CSS/JS (index, chatbot, stats, login, signup, etc.)
b. Web Server (Flask App – app.py)
• Routes & Controllers for authentication, registration, face capture, attendance marking, report generation
• Integrates face-recognition service
c. Face Recognition Module
• Uses OpenCV (camera capture), dlib, face_recognition, deepface
• Training pipeline (static/TrainingImages → encoded models)
• Recognition pipeline (live camera frames → identity matches)
d. Data Storage
• SQLite database (EmployeeDB.db) for user credentials, attendance logs
• File system:
– static/TrainingImages (face templates)
– static/records.csv, todayAttendance.csv (exported reports)
e. Static Content Server
• Serves CSS, JS, audio, JSON helpers, and images
Relationships & Data Flow
• User ↔ Browser UI: HTTP GET/POST for login/signup, OTP flow, reset password, & attendance pages
• Browser → Flask: sends form data, image captures (via JS)
• Flask → Face Recognition Module: processes images, returns identity result
• Flask → SQLite: reads/writes user info & attendance records
• Flask → File System: stores new face images, generates CSV reports
• Browser ← Flask: returns rendered templates with dynamic data (stats, records)
Architectural Patterns & Principles
• MVC-style separation:
• Models: SQLite schemas & CSV files
• Views: HTML templates + static assets
• Controllers: Flask routes in app.py
• Monolithic service: single deployable Python process
• Layered design:
• Presentation (templates/static)
• Application logic (Flask + face-rec modules)
• Data persistency (SQLite + local files)
• Extensibility points: Face recognition component can be swapped or scaled separately
Technologies & Frameworks
• Backend: Python 3.8.13, Flask
• Database: SQLite
• ML Libraries: OpenCV, dlib, face_recognition, deepface
• Frontend: HTML, CSS, JavaScript
• Environment & Deployment: conda (msenv.yml), single-server process