A comprehensive, production-ready attendance management system with face recognition capabilities, built with modern technologies for scalability and reliability.
- Overview
- Features
- Tech Stack
- Project Structure
- Prerequisites
- Installation
- Configuration
- Running the Application
- API Documentation
- System Architecture
- Contributing
- License
- Support
The AI-Powered Attendance Management System (AAMS) is an intelligent attendance tracking solution that combines:
- Face Recognition Technology for automated attendance marking
- REST API Backend built with Spring Boot for robust server-side operations
- Interactive Web Frontend for user management and real-time attendance tracking
- Python AI Service for face recognition and image processing
This system eliminates manual attendance processes and provides real-time analytics and reporting capabilities.
- ✅ Face Recognition-Based Attendance - Automated attendance marking using AI
- ✅ User Management - Add, update, and manage users with profiles
- ✅ Real-time Attendance Tracking - Live attendance monitoring and updates
- ✅ Email Notifications - Automated email alerts for attendance events
- ✅ Semester Management - Organize students and classes by semester
- ✅ Group Management - Create and manage student groups
- ✅ Comprehensive Reporting - View attendance history and statistics
- ✅ RESTful API - Complete API for integration with other systems
- Environment-based configuration for sensitive data
- Input validation and error handling
- CORS configuration for secure cross-origin requests
- Framework: Spring Boot (Java)
- Database: (Configurable via application.properties)
- Build Tool: Maven
- JSON Processing: Jackson
- Frontend Framework: Vanilla JavaScript
- Styling: CSS3
- Architecture: Module-based structure
- Templating: HTML5
- Language: Python 3.x
- Face Recognition: Python-based image processing
- HTTP Communication: REST API integration
- Version Control: Git
- Build: Maven (Java), pip (Python)
- Containerization: Docker-ready structure
- CI/CD: GitHub Actions compatible
AAMS/
├── .gitignore # Git ignore rules
├── README.md # Project documentation
├── backend/ # Spring Boot backend service
│ ├── src/
│ │ ├── main/java/
│ │ │ └── com/laxmanpoudel/attendance/
│ │ │ ├── controller/ # REST API endpoints
│ │ │ ├── service/ # Business logic
│ │ │ ├── entity/ # JPA entities
│ │ │ ├── repository/ # Data access layer
│ │ │ ├── dto/ # Data transfer objects
│ │ │ └── configuration/ # Spring configuration
│ │ └── resources/
│ │ ├── application.properties
│ │ └── templates/ # Email templates
│ └── pom.xml # Maven configuration
├── frontend/ # Web frontend
│ ├── public/
│ │ ├── css/ # Stylesheets
│ │ ├── js/ # JavaScript modules
│ │ └── images/ # Static images
│ └── views/ # HTML templates
└── ai-service/ # Python AI service
├── recognition.py # Face recognition logic
├── register.py # User registration with face data
└── requirement.txt # Python dependencies
- Java: JDK 11 or higher
- Python: Python 3.7 or higher
- Node.js: Optional, for frontend development
- Maven: 3.6+
- Git: For version control
- Git for version control
- A modern web browser (Chrome, Firefox, Safari, Edge)
- Command line terminal/PowerShell
git clone https://github.com/yourusername/AAMS.git
cd AAMScd backend
mvn clean installThis command will:
- Clean previous build artifacts
- Download all Maven dependencies
- Compile the Java source code
- Run unit tests
No installation required for vanilla JavaScript frontend. Simply ensure:
- Static files are served from the
frontend/publicdirectory - HTML files are served from
frontend/viewsdirectory
cd ai-service
# Windows
python -m venv venv
venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirement.txtEdit backend/src/main/resources/application.properties:
# Server Configuration
server.port=8080
server.servlet.context-path=/api
# Database Configuration
spring.datasource.url=jdbc:mysql://localhost:3306/aams_db
spring.datasource.username=root
spring.datasource.password=your_password
spring.jpa.hibernate.ddl-auto=update
# Email Configuration
spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username=${MAIL_USERNAME}
spring.mail.password=${MAIL_PASSWORD}
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
# CORS Configuration
cors.allowed-origins=http://localhost:3000,http://localhost:8080Create .env file in the root directory (ensure it's in .gitignore):
# Database
DB_HOST=localhost
DB_PORT=3306
DB_NAME=aams_db
DB_USER=root
DB_PASSWORD=your_secure_password
# Email Service
MAIL_USERNAME=your_email@gmail.com
MAIL_PASSWORD=your_app_password
# API Configuration
API_PORT=8080
API_HOST=localhost
# Frontend
FRONTEND_URL=http://localhost:3000Edit ai-service/config.py (if exists) or environment variables:
FACE_RECOGNITION_MODEL=path/to/model
API_BACKEND_URL=http://localhost:8080/apicd backend
mvn spring-boot:runBackend will be available at: http://localhost:8080
Serve the frontend files using any HTTP server:
# Using Python (Python 3)
cd frontend
python -m http.server 3000
# Using Node.js http-server
npx http-server frontend -p 3000Frontend will be available at: http://localhost:3000
cd ai-service
source venv/bin/activate # On Windows: venv\Scripts\activate
python recognition.pyAI service will be available at: http://localhost:5000 (configure as needed)
http://localhost:8080/api
POST /attendance/mark
Content-Type: application/json
{
"userId": "123",
"timestamp": "2026-04-20T10:30:00"
}
GET /attendance/view?userId=123&startDate=2026-04-01&endDate=2026-04-30
POST /user/register
Content-Type: application/json
{
"email": "user@example.com",
"firstName": "John",
"lastName": "Doe"
}
PUT /user/{userId}
Content-Type: application/json
{
"email": "new.email@example.com",
"firstName": "Jane"
}
GET /user/view
GET /user/view/{userId}
POST /face/register
Content-Type: multipart/form-data
- userId: "123"
- faceImage: [binary image data]
POST /face/recognize
Content-Type: multipart/form-data
- faceImage: [binary image data]
POST /semester/create
Content-Type: application/json
{
"name": "Fall 2026",
"startDate": "2026-09-01",
"endDate": "2026-12-31"
}
GET /semester/list
┌─────────────────────────────────────────────────────┐
│ Web Browser (Frontend) │
│ ├─ Login & Authentication │
│ ├─ User Management Interface │
│ ├─ Attendance Tracking Dashboard │
│ └─ Real-time Reports │
└──────────────────┬──────────────────────────────────┘
│ HTTP/REST
┌──────────────────▼──────────────────────────────────┐
│ Spring Boot REST API (Backend) │
│ ├─ Authentication & Authorization │
│ ├─ Business Logic │
│ ├─ Data Validation │
│ └─ API Rate Limiting │
└──────────────────┬──────────────────────────────────┘
┌───────────┴───────────┬──────────────────┐
│ │ │
┌──────▼─────────┐ ┌─────────▼──────┐ ┌───────▼────────┐
│ Database │ │ Python AI │ │ Email Service │
│ (MySQL) │ │ (Face Recog) │ │ (SMTP) │
└────────────────┘ └────────────────┘ └────────────────┘
- User Registration: User registers → Face capture → Face encoding stored
- Attendance Marking: Face capture → Recognition → Attendance recorded → Email sent
- Reporting: Query database → Generate statistics → Display on frontend
- Fork the repository on GitHub
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes with clear, descriptive commits
- Write/update tests for new functionality
- Follow code style conventions used in the project
- Submit a pull request with detailed description
- Java: Follow Google Java Style Guide
- Python: Follow PEP 8 style guide
- JavaScript: Use consistent indentation (2 spaces)
- Commits: Use clear, descriptive commit messages
# Install pre-commit hooks
pip install pre-commit
pre-commit install
# Run tests
mvn test # Backend tests
pytest # Python tests- 📧 Email Support: sevensemesterproject@gmail.com
- 🐛 Report Bugs: GitHub Issues
- 💬 Discussions: GitHub Discussions
Issue: Backend fails to start
- Solution: Check if port 8080 is already in use, ensure Java is installed
Issue: Face recognition not working
- Solution: Ensure Python environment is activated and all dependencies are installed
Issue: Database connection error
- Solution: Verify MySQL is running and connection string in application.properties is correct
Q: Can I deploy this on cloud platforms? A: Yes, the application is designed to be cloud-ready. See deployment guides for AWS, Azure, or GCP.
Q: How do I scale the application? A: Implement load balancing and database replication. See architecture documentation for details.
Q: Is this GDPR compliant? A: The system handles biometric data. Ensure compliance with local regulations regarding face data storage.
Last Updated: April 2026 Version: 1.0.0 Maintainer: Laxman Poudel