Prerequisites
Before you begin, ensure you have the following installed on your system:Python 3.8+
Download from python.org
pip
Usually included with Python installation
Git
Download from git-scm.com
Code Editor
VS Code, PyCharm, or your preferred editor
Installation Steps
Create a Virtual Environment
Create an isolated Python environment for the project:
You should see
(venv) appear at the beginning of your terminal prompt, indicating the virtual environment is active.Install Dependencies
Install all required Python packages from This will install:
requirements.txt:- Flask - Web framework
- geopy - Geocoding library
- gunicorn - WSGI HTTP server (for production)
Additional dependencies like
flask-login, flask-mail, apscheduler, and reportlab are used by the application but may be installed as sub-dependencies.Install Additional Dependencies
The application requires several additional packages not listed in requirements.txt. Install them:
Configure Environment Variables
Create a See the Environment Variables guide for detailed configuration options.
.env file in the project root or set environment variables directly:.env
Running the Application
Development Server
Start the Flask development server:http://localhost:5000 by default.
The app runs with
debug=True and use_reloader=False to prevent the APScheduler from running twice during development (app.py:239).Accessing the Application
Open your browser and navigate to:Default User Accounts
The application comes with pre-configured test accounts (seeapp.py:32-34):
Development Workflow
Project Structure
Key Application Features
Authentication System
Uses Flask-Login for session management (
app.py:42-49)Email Notifications
Configured with Flask-Mail to send automated reminders (
app.py:15-21)Scheduled Tasks
APScheduler sends reminders at 8:00 AM daily (
app.py:88-91)PDF Reports
Generate attendance reports with ReportLab (
app.py:184-231)Making Changes
- Edit the code in your preferred editor
- Save your changes
- The server may need to be restarted manually since
use_reloader=False - Refresh your browser to see changes
Testing Email Functionality
Using Gmail
To test email sending with Gmail:Generate App Password
Go to Google App Passwords and create a new app password
Alternative: Using MailHog
For local development without real email sending, consider using MailHog:Deactivating the Virtual Environment
When you’re done working:Troubleshooting
Module Not Found Errors
Ensure your virtual environment is activated and all dependencies are installed:
Port Already in Use
If port 5000 is occupied, change the port in
app.py:239:Permission Errors on data/
Ensure the application has write permissions:
Scheduler Running Twice
This is expected with
use_reloader=True. The app uses use_reloader=False by default to prevent duplicate scheduler instances (app.py:239).Next Steps
Configure Environment
Set up production-ready configuration
Deploy to Heroku
Deploy your application to production
API Reference
Explore available endpoints
Admin Guide
Learn how to manage users and attendance