Mess-Attendance-System
IIT ROORKEE - RAJENDRA BHAWAN: A Flask-based web application for managing student mess attendance records. This system streamlines the process of tracking student attendance in educational institution mess facilities through automated Excel file processing.
Mess Attendance System
Rajendra Bhawan - IIT ROORKEE
A comprehensive web-based system for managing and analyzing student mess attendance records. The system processes Excel-based attendance data, tracks patterns, and generates detailed reports for consecutive absences.
Table of Contents
- Features
- System Architecture
- Tech Stack
- Installation
- Usage
- API Endpoints
- Data Processing
- Security
- Screenshots
Features
Excel File Processing
- Supports both
.xlsand.xlsxfile formats - Intelligent enrollment number validation
- Automatic status detection and standardization
- Supports both
Attendance Tracking
- Historical attendance viewing with date range filtering
- Interactive attendance status visualization
- Comprehensive attendance records management
Absence Analysis
- Consecutive absence detection
- Configurable absence threshold
- Downloadable absence reports in CSV format
Admin Dashboard
- Secure admin authentication
- User-friendly interface
- Real-time upload status feedback
System Architecture
graph TD
A[Admin] -->|Upload Excel| B[Flask Backend]
B -->|Store| C[MongoDB Database]
B -->|Process| D[Attendance Data]
B -->|Generate| E[Absence Reports]
F[Frontend] -->|Fetch| B
F -->|Display| G[Interactive Tables]
F -->|Download| H[CSV Reports]
Tech Stack
| Component | Technology |
|---|---|
| Frontend | HTML, CSS, JavaScript |
| Backend | Flask (Python) |
| Database | MongoDB |
| File Processing | openpyxl, xlrd |
| Authentication | Flask-Login |
| Date Handling | python-dateutil |
Screenshots & Features
| Description | Screenshot |
|---|---|
| Admin Upload Page - Simple and intuitive upload interface - Date selector for attendance records - Support for Excel file uploads (.xls and .xlsx) - Clear form layout with labeled fields - Progress feedback for upload status - Secure file handling - User-friendly design with minimal clutter |
|
| Attendance History Page - Comprehensive view of student attendance records - Date range filtering capability - Color-coded status indicators (green for present, red for absent) - Clear enrollment number display - Day-by-day attendance tracking - Easy-to-read table format with fixed headers - Interactive date selection |
|
| Absences Report Page - Generates reports of consecutive student absences - Customizable date range selection - Adjustable consecutive days threshold - Displays enrollment number, start date, end date, and total absent days - Downloadable reports in CSV format - Clean, organized tabular view of absence patterns |
Installation
- Clone the repository:
git clone https://github.com/yourusername/mess-attendance-system.git
cd mess-attendance-system
- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
cp .env.example .env
# Edit .env file with your MongoDB URI and secret key
- Run the application:
python app.py
Usage
Admin Portal
- Login using admin credentials
- Navigate to Upload section
- Select date and Excel file
- Submit for processing
Viewing Attendance
- Access History section
- Select date range
- View color-coded attendance table
- Filter and sort as needed
Analyzing Absences
- Visit Absences section
- Set consecutive days threshold
- Select date range
- Generate and download reports
🔌 API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/upload |
POST | Upload attendance Excel file |
/api/attendance |
GET | Fetch attendance records |
/api/absences |
GET | Get consecutive absence data |
/login |
POST | Admin authentication |
/logout |
GET | End admin session |
Data Processing
Excel Processing Flow
flowchart LR
A[Excel Upload] --> B{File Type?}
B -->|.xls| C[xlrd Processing]
B -->|.xlsx| D[openpyxl Processing]
C --> E[Data Validation]
D --> E
E --> F[MongoDB Storage]
Attendance Status Classification
- Present: Marked when student attends mess
- Absent: Recorded for "not present" status
- Invalid: Entries with incorrect enrollment numbers
Security
- Session-based authentication
- Environment variable configuration
- Input validation and sanitization
- Secure password handling
- Protected API endpoints
Project Statistics
pie title "Code Distribution"
"Python Backend" : 45
"JavaScript Frontend" : 30
"HTML Templates" : 15
"Configuration" : 10
Screenshots
Note: Add actual screenshots of your application here:
- Login Page
- Admin Dashboard
- Attendance History View
- Absence Report Page
Future Enhancements
- Email notifications for long absences
- Mobile responsive design
- Student portal access
- Real-time attendance updates
- Advanced analytics dashboard
Contributing
- Fork the repository
- Create feature branch
- Commit changes
- Push to branch
- Open pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Utso Sarkar (Technical Secretary) Email: utso_s@ma.iitr.ac.in