A production-ready web-based face recognition attendance system with React frontend and Flask backend.
- Modern Web Interface: React TypeScript with Material-UI components
- Real-time Face Recognition: Live camera feed for attendance marking
- Advanced Person Management: Add, manage, and view people in the system
- Comprehensive Attendance Tracking: Filter, search, and download attendance records
- Statistics Dashboard: Real-time analytics and reporting
- Settings Panel: Live system monitoring and configuration
- Production Ready: Docker support and deployment configurations
face-attendance-web/
βββ frontend/ # React TypeScript application
β βββ src/
β β βββ components/
β β β βββ AttendanceCapture.tsx # Camera attendance marking
β β β βββ AddPerson.tsx # Add new people
β β β βββ AttendanceView.tsx # Advanced attendance viewing
β β β βββ Settings.tsx # System configuration
β β β βββ Reports.tsx # Analytics and reporting
β β βββ App.tsx
β βββ Dockerfile # Frontend container
β βββ package.json
βββ backend/ # Flask Python API
β βββ app.py # Main application
β βββ requirements.txt # Python dependencies
β βββ Dockerfile # Backend container
β βββ .env.production # Production config
βββ docker-compose.yml # Full stack deployment
βββ DEPLOYMENT.md # Deployment guide
βββ build-production.sh # Build script
# Clone and run with Docker
git clone <your-repo-url>
cd face-attendance-web
docker-compose up --build
# Access the application
# Frontend: http://localhost:3000
# Backend: http://localhost:5002cd backend
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
python app.pycd frontend
npm install
npm start- Access the main attendance capture interface
- Position face in camera view
- System automatically recognizes and marks attendance
- Real-time feedback and confirmation
- Navigate to "Add Person" section
- Enter person details
- Capture multiple photos for better recognition
- System trains model automatically
- Advanced filtering by person, date, confidence
- Real-time statistics dashboard
- Export to Excel with custom date ranges
- Visual analytics and trends
- Live system status monitoring
- Configuration management
- Face database statistics
- Backup and restore functionality
Complete REST API with the following endpoints:
GET /api/health- System health checkPOST /api/load-faces- Load and train face recognizerGET /api/known-faces- Get registered peoplePOST /api/add-face- Register new personPOST /api/recognize-face- Face recognitionPOST /api/mark-attendance- Mark attendance
GET /api/attendance- Retrieve attendance recordsGET /api/attendance/download- Export to ExcelGET /api/stats- System statisticsPOST /api/backup- Create data backup
GET /api/settings- Get system settingsPOST /api/settings- Update configurationGET /api/system-status- Real-time system status
- React 18 with TypeScript
- Material-UI v5 for modern components
- React Router for navigation
- Axios for API communication
- React Webcam for camera integration
- Flask 3.0 Python web framework
- OpenCV 4.12 for computer vision
- pandas for data processing
- python-dotenv for configuration
- ImageKit for cloud storage (optional)
- Docker & Docker Compose for containerization
- Production-ready configurations
- Environment-based configs
- Health checks and monitoring
- Update environment variables in
.env.productionfiles - Build for production:
./build-production.sh
- Deploy using Docker:
docker-compose up -d --build
- Heroku: Deploy backend and frontend separately
- Railway/Render: Use provided Dockerfiles
- AWS/GCP/Azure: Container deployment
- Netlify/Vercel: Frontend static deployment
See DEPLOYMENT.md for detailed instructions.
- β Production-ready Flask API backend
- β Modern React frontend with TypeScript
- β Face recognition with OpenCV
- β Real-time attendance marking
- β Advanced filtering and analytics
- β Export and reporting functionality
- β Docker containerization
- β Production deployment configs
- β Comprehensive error handling
- β CORS and security configurations
- Environment-based configuration
- CORS protection
- Local face data storage
- Optional cloud storage integration
- Production security settings
- Camera permissions: Grant browser camera access
- Port conflicts: Ensure ports 3000 and 5002 are free
- Docker issues: Check Docker daemon is running
- Face recognition: Ensure good lighting conditions
# Check backend logs
docker-compose logs backend
# Check frontend logs
docker-compose logs frontend
# Restart services
docker-compose restartYour enterprise-ready face recognition system is live! π
- Frontend: http://localhost:3000
- Backend API: http://localhost:5002
- Documentation: See DEPLOYMENT.md