all projects
python

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

  • Excel File Processing

    • Supports both .xls and .xlsx file formats
    • Intelligent enrollment number validation
    • Automatic status detection and standardization
  • 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
Admin Upload Page
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
Attendance History Page
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
Absences Report Page

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/mess-attendance-system.git
cd mess-attendance-system
  1. Create and activate virtual environment:
python -m venv venv
source venv/bin/activate  # Linux/Mac
venv\Scripts\activate     # Windows
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
cp .env.example .env
# Edit .env file with your MongoDB URI and secret key
  1. Run the application:
python app.py

Usage

Admin Portal

  1. Login using admin credentials
  2. Navigate to Upload section
  3. Select date and Excel file
  4. Submit for processing

Viewing Attendance

  1. Access History section
  2. Select date range
  3. View color-coded attendance table
  4. Filter and sort as needed

Analyzing Absences

  1. Visit Absences section
  2. Set consecutive days threshold
  3. Select date range
  4. 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

  1. Email notifications for long absences
  2. Mobile responsive design
  3. Student portal access
  4. Real-time attendance updates
  5. Advanced analytics dashboard

Contributing

  1. Fork the repository
  2. Create feature branch
  3. Commit changes
  4. Push to branch
  5. 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