A comprehensive web-based attendance management system built with Flask that enables educational institutions to efficiently track student attendance, manage student records, and generate detailed reports. The system provides a user-friendly interface for teachers and administrators to streamline the attendance tracking process with secure authentication and robust data management capabilities.
π Key Highlights:
- Modern web interface with responsive design
- Secure user authentication system
- Real-time attendance tracking and management
- Comprehensive reporting with multiple export formats
- Cloud deployment ready (Render/Heroku compatible)
- Role-based access control
- Secure session management
- Password protection with encryption
- Default admin credentials:
username: a, password: a
- β Register new students with unique identifiers (UID)
- ποΈ Remove students from the system
- π View comprehensive student directories
- π Search and filter student records
- π Edit student information
- β Mark attendance status (Present/Absent/Late)
- π Date-wise attendance management
- β° Timestamp tracking for attendance records
- π Edit and update existing attendance records
- π Real-time attendance statistics
- π Export attendance data to Excel (.xlsx)
- π Generate professional PDF reports
- π View detailed attendance history by date range
- π Attendance percentage calculations
- π Visual attendance analytics and insights
- Multiple export formats (Excel, PDF, CSV)
- Customizable date range selection
- Filtered export options
- Professional report formatting
- Framework: Python Flask 2.x
- Database: SQLite (Development) / PostgreSQL (Production)
- ORM: SQLAlchemy with Flask-SQLAlchemy
- Migrations: Flask-Migrate (Alembic)
- Authentication: Flask-Login
- Templating: Jinja2
- Styling: CSS3 with Bootstrap components
- JavaScript: Vanilla JS for interactivity
- Responsive Design: Mobile-first approach
- Excel Export: Pandas + openpyxl
- PDF Generation: WeasyPrint
- Data Analysis: NumPy, Pandas
- Cloud Platform: Render (Primary), Heroku (Alternative)
- Database: PostgreSQL (Production)
- Environment Management: python-dotenv
- Python 3.8+ installed on your system
- Git for version control
- Virtual environment (recommended)
git clone https://github.com/arpanpramanik2003/smart-attendence.git
cd smart-attendence# Create virtual environment
python -m venv attendance_env
# Activate virtual environment
# On Windows:
attendance_env\Scripts\activate
# On macOS/Linux:
source attendance_env/bin/activate# Install required packages
pip install -r requirements.txt
# If requirements.txt doesn't exist, install manually:
pip install flask flask-sqlalchemy flask-migrate pandas openpyxl weasyprint# Create .env file
touch .env
# Add the following variables to .env:
FLASK_APP=app.py
FLASK_ENV=development
SECRET_KEY=your-secret-key-here
DATABASE_URL=sqlite:///attendance.db# Initialize database
flask db init
flask db migrate -m "Initial migration"
flask db upgrade# Start the development server
flask run
# Or alternatively:
python app.pyThe application will be available at http://localhost:5000
-
Prepare for Deployment:
# Ensure you have these files: # - requirements.txt # - Procfile (web: gunicorn app:app) # - runtime.txt (python-3.9.x)
-
Database Configuration:
- Set
DATABASE_URLenvironment variable to PostgreSQL URL - Update database configurations for production
- Set
-
Deploy on Render:
- Connect your GitHub repository
- Configure build and start commands
- Set environment variables
- Deploy automatically from main branch
- Heroku: Use Heroku Postgres add-on
- Railway: Direct GitHub integration
- PythonAnywhere: Manual file upload option
- Navigate to the application URL
- Login with admin credentials:
- Username:
a - Password:
a
- Username:
- Access the main dashboard
-
Add New Student:
- Click "Add Student" button
- Enter student name and unique UID
- Submit the form
-
View Students:
- Navigate to "Students" section
- Browse through student directory
- Use search functionality if needed
-
Remove Student:
- Find student in the directory
- Click "Remove" button
- Confirm the action
-
Daily Attendance:
- Select the current date
- Choose students from the list
- Mark Present/Absent status
- Save attendance records
-
Edit Attendance:
- Navigate to specific date
- Modify existing attendance records
- Update and save changes
-
Generate Reports:
- Select date range
- Choose report format (Excel/PDF)
- Click "Generate Report" button
- Download the generated file
-
View Attendance History:
- Navigate to "Reports" section
- Filter by date, student, or class
- View detailed attendance statistics
smart-attendence/
βββ app.py # Main Flask application
βββ config.py # Configuration settings
βββ requirements.txt # Python dependencies
βββ Procfile # Deployment configuration
βββ runtime.txt # Python runtime version
βββ .env # Environment variables
βββ migrations/ # Database migration files
βββ static/ # Static files (CSS, JS, images)
β βββ css/
β βββ js/
β βββ images/
βββ templates/ # HTML templates
β βββ base.html
β βββ login.html
β βββ dashboard.html
β βββ students.html
β βββ attendance.html
β βββ reports.html
βββ models/ # Database models
β βββ __init__.py
β βββ student.py
β βββ attendance.py
βββ routes/ # Application routes
β βββ __init__.py
β βββ auth.py
β βββ students.py
β βββ attendance.py
βββ utils/ # Utility functions
βββ __init__.py
βββ export.py
βββ helpers.py
We welcome contributions to improve the Smart Attendance Management System! Here's how you can contribute:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes with proper documentation
- Add tests for new functionality
- Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- π Write clear commit messages
- π Update documentation for new features
- π§ͺ Add tests for new functionality
- π¨ Follow Python PEP 8 style guidelines
- π± Ensure responsive design compatibility
- π Test thoroughly before submitting PR
- π UI/UX improvements
- π§ Performance optimizations
- π‘οΈ Security enhancements
- π Additional reporting features
- π Internationalization support
- π± Mobile app development
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2024 Arpan Pramanik
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
π¨βπ» Developer: Arpan Pramanik
π§ Email: [email protected]
πΌ LinkedIn: Connect with Arpan Pramanik
π± GitHub: @arpanpramanik2003
π± Portfolio: Visit Portfolio
- Flask Community - For the excellent web framework and documentation
- SQLAlchemy Team - For the powerful ORM capabilities
- Bootstrap - For responsive design components
- Open Source Community - For inspiration and code examples
- Educational Institutions - For feedback and feature suggestions
- Contributors - Thank you to all who have contributed to this project
- π Educational Technology Community for valuable insights
- π§ Flask Extension Developers for amazing tools
- π Documentation Writers for clear guides and tutorials
- π§ͺ Beta Testers for thorough testing and feedback
Made with β€οΈ by Arpan Pramanik