A comprehensive web-based time tracking and management system designed specifically for volunteer fire departments. Built with Flask and SQLite, this system helps fire departments track volunteer hours, manage equipment inventory, schedule vehicle inspections, and monitor station operations.
Live Demo: https://byrdmanlk.pythonanywhere.com (Login: demo / demo2024)
- β±οΈ Kiosk Mode Clock In/Out: iPad-friendly touch interface for firefighters to check in/out
- π Activity Tracking: Track firefighting calls, training, work nights, meetings, and custom activities
- π₯ Real-Time Dashboard: Live display showing active firefighters and recent activity
- π Comprehensive Reports: Hours by firefighter, activity breakdown, date ranges, and exportable Excel reports
β οΈ Smart Alerts: Automatic alerts for overdue vehicle inspections and low inventory levels
- π¦ Inventory System: Track station and vehicle inventory with quantities, costs, and categories
- π Vehicle Inspections: Schedule and track weekly vehicle inspections with detailed checklists
- π’οΈ Fluid Specifications: Document required fluids (oil, coolant, brake fluid, etc.) for each vehicle
- π§ Maintenance Tracking: Monitor vehicle maintenance needs with failed inspection alerts
- π± QR Code Access: Generate QR codes for mobile access to inspections and inventory
- π° Value Reporting: Track total inventory value by location
β οΈ Failed Inspection Alerts: Automatic alerts on dashboard, display, and maintenance pages for vehicles needing attention
- π Admin Panel: Comprehensive management interface for all system features
- π₯ Multi-User System: Create multiple admin accounts with individual logins and secure password management
- π Dashboard Analytics: Visual charts and statistics for department operations
- π€ Excel Export: Export any report to formatted Excel spreadsheets
- π Alert Dashboard: Centralized view of all system alerts and warnings
- πΊ Digital Signage: Display mode perfect for TV displays in the station
- π± Mobile Responsive: Works great on phones, tablets, and desktop
- π¨ Modern UI: Clean, intuitive interface with smooth animations
- β‘ Real-Time Updates: Auto-refreshing displays keep information current
- π Automatic Backups: Hourly backups to Dropbox for data safety
Touch-friendly iPad interface for firefighters to check in and out
Comprehensive management interface with all system features at your fingertips
Real-time display with active firefighters, alerts, and leaderboards - perfect for station TVs. Display on any Fire TV or smart TV using SignPresenter.com!
Annual hose testing interface with compliance tracking and repair management
Mobile-friendly inspection checklists with inline fluid specifications
Track equipment across stations and vehicles with cost tracking
Comprehensive reporting with Excel export capabilities
- Backend: Flask 2.0+ (Python)
- Database: SQLite with optimized queries
- Frontend: HTML5, CSS3, JavaScript (Vanilla)
- Charts: Chart.js for dashboard analytics
- QR Codes: qrcodejs for mobile access
- Excel Export: openpyxl for formatted reports
- Backup: Dropbox API for automatic backups
- Timezone: America/Chicago (Central Time)
- Python 3.7+
- pip
- Virtual environment (recommended)
- Clone the repository:
git clone <your-repo-url>
cd Fire-Department-Management-System- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
cd flask_app
pip install -r requirements.txt- Set up environment variables:
cp ../.env.example ../.env
# Edit .env with your actual credentials- Create initial data files:
cp ../user_data.json.example user_data.json
cp ../categories.json.example categories.json
cp ../vehicles.json.example vehicles.json
cp ../vehicle_inspections.json.example vehicle_inspections.json- Run the application:
python app.pyThe app will be available at http://localhost:5000
See .env.example for required environment variables:
FLASK_SECRET_KEY: Secret key for Flask sessionsADMIN_USERNAME: Admin login usernameADMIN_PASSWORD: Admin login passwordDROPBOX_APP_KEY: Dropbox API app key (for backups)DROPBOX_APP_SECRET: Dropbox API secretDROPBOX_REFRESH_TOKEN: Dropbox refresh token
python -c "import secrets; print(secrets.token_hex(32))"- Visit the home page
- Enter your firefighter number
- Select activity type
- Click "Clock In" when starting
- Click "Clock Out" when finished
- Visit
/admin - Login with admin credentials
- Access admin panel to:
- View all firefighter hours
- Add/edit/delete firefighters
- Manually add hours
- Export data to CSV
- Manage activity categories
Visit /display for a real-time dashboard showing:
- Currently active firefighters
- Active alerts and warnings
- Vehicles needing inspection
- Recent activity feed
- Hours leaderboard
Want to show the live dashboard on a TV in your fire station? Use SignPresenter to display real-time updates on any Fire TV, Android device, or smart TV!
Benefits:
- π Real-time updates: Auto-refreshes every 30 seconds
- π± Easy setup: Works on Fire Stick, Android TV, or any Android device
- β‘ Always on: Perfect for station wall-mounted displays
- π° Affordable: Only $10/month per device
Setup Instructions:
- Visit SignPresenter.com and sign up
- Install SignPresenter on your Fire TV/Android device
- Follow the setup guide to add a website
- Enter your display URL:
https://your-site.pythonanywhere.com/display - Your live dashboard will now show on the TV!
This service helps keep our system running and supports continued development. Thank you!
Fire-Department-Management-System/
βββ flask_app/
β βββ app.py # Main application
β βββ backup_manager.py # Dropbox backup handler
β βββ requirements.txt # Python dependencies
β βββ templates/ # HTML templates
β β βββ index.html
β β βββ admin.html
β β βββ admin_login.html
β β βββ display.html
β β βββ inspect.html
β βββ static/
β βββ style.css
βββ .env # Environment variables (not in git)
βββ .env.example # Example environment variables
βββ .gitignore # Git ignore rules
βββ README.md # This file
We highly recommend PythonAnywhere for hosting this application. It works great for fire departments and offers:
- β Free tier available - Perfect for small/medium departments
- β Always-on hosting - No cold starts or sleep mode
- β Easy deployment - Simple web-based interface
- β SQLite support - Built-in database support
- β Automatic HTTPS - Secure by default
- β No server maintenance - They handle everything
Our live demo runs on PythonAnywhere's free tier!
- Go to PythonAnywhere.com
- Sign up for a free account
- Verify your email
Open a Bash console from the dashboard and run:
git clone https://github.com/mbyrdLCS/Fire-Department-Management-System.git
cd Fire-Department-Management-Systemmkvirtualenv fdms-env --python=python3.10
pip install -r requirements.txtCreate your .env file:
nano .envAdd these variables (replace with your values):
FLASK_SECRET_KEY=your-secret-key-here-generate-a-random-string
FLASK_ENV=production
FLASK_DEBUG=False
ADMIN_USERNAME=your-admin-username
ADMIN_PASSWORD=your-secure-password-here
# Optional: Dropbox backup (see DROPBOX_SETUP.md)
DROPBOX_APP_KEY=your-dropbox-app-key
DROPBOX_APP_SECRET=your-dropbox-app-secret
DROPBOX_REFRESH_TOKEN=your-dropbox-refresh-tokenSave with Ctrl+O, Enter, then Ctrl+X
Generate a secure secret key:
python3 -c "import secrets; print(secrets.token_hex(32))"cd ~/Fire-Department-Management-System/flask_app
python3 db_init.pyThis single command creates ALL database tables including:
- Time tracking & activity logs
- Multi-user authentication
- Vehicle inspections & maintenance
- Inventory management
- ISO hose testing & compliance
- Stations & equipment tracking
Then create your first admin user:
cd ~/Fire-Department-Management-System
python3 add_users_table.pyThat's it! No need to run multiple migration scripts.
Go to the Web tab in PythonAnywhere dashboard:
- Click "Add a new web app"
- Choose "Manual configuration"
- Select Python 3.10
Click on the WSGI configuration file link and replace the contents with:
import sys
import os
# Add your project directory to the sys.path
project_home = '/home/YOUR_USERNAME/Fire-Department-Management-System'
if project_home not in sys.path:
sys.path.insert(0, project_home)
# Set environment variables path
os.environ['DOTENV_PATH'] = '/home/YOUR_USERNAME/Fire-Department-Management-System/.env'
# Import Flask app
from flask_app.app import app as applicationImportant: Replace YOUR_USERNAME with your PythonAnywhere username!
In the Web tab, under "Virtualenv":
- Enter:
/home/YOUR_USERNAME/.virtualenvs/fdms-env - Click the checkmark
In the Web tab, under "Static files":
- URL:
/static/ - Directory:
/home/YOUR_USERNAME/Fire-Department-Management-System/flask_app/static/
- Click the green "Reload" button
- Visit your site:
https://YOUR_USERNAME.pythonanywhere.com - You should see the kiosk clock-in page!
- Test admin login at:
https://YOUR_USERNAME.pythonanywhere.com/admin
When you want to update with new features:
cd ~/Fire-Department-Management-System
git pull
source ~/.virtualenvs/fdms-env/bin/activate
pip install -r requirements.txt
# Click "Reload" button in Web tabWhile we recommend PythonAnywhere, you can also deploy to:
- Heroku - Free tier available with some limitations
- Railway - Modern platform with generous free tier
- DigitalOcean - More control, requires server management ($5/month)
- AWS/Azure/GCP - Enterprise options
- Your own server - Linux server with Python 3.7+
The application will run anywhere Python Flask can run!
- Never commit
.envfile to Git - Never commit actual data files (
user_data.json, etc.) - Change default admin credentials immediately
- Use strong passwords
- Keep Dropbox credentials secure
The system automatically backs up to Dropbox every hour. Backups include:
- User data
- Categories
- Vehicle information
To manually trigger a backup, visit /test_backup while logged in as admin.
- Use a separate
.envfile for development - Test with example data files
- Never work directly on production server
- Create a new branch:
git checkout -b feature/your-feature - Make changes
- Test thoroughly
- Commit and push
- Deploy to development server first
The database wasn't initialized properly. Run:
cd ~/Fire-Department-Management-System/flask_app
python3 db_init.pyYour WSGI file paths are wrong. Make sure your WSGI file includes:
flask_app_dir = '/home/YOUR_USERNAME/Fire-Department-Management-System/flask_app'
if flask_app_dir not in sys.path:
sys.path.insert(0, flask_app_dir)Check the error log (link in Web tab). Common issues:
- Database not initialized (run
db_init.py) - Wrong virtualenv path
- Missing
.envfile
- Check logs in
firefighter.log - Verify background threads are running
- Verify credentials in
.env - Dropbox backups are optional - leave credentials blank if not using
- System automatically tries to recover from backups
- Check local backup files with
_backup_in filename
This project is licensed under a Non-Commercial License with Attribution Requirement.
Key Points:
- β Free to use for fire departments and non-profits
- β Can modify and adapt for your needs
- β Must keep SignPresenter.com references
- β Cannot sell or use commercially
- β Cannot remove attribution
See LICENSE file for full details.
For commercial licensing inquiries, contact: mike@signpresenter.com
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Test your changes thoroughly
- Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Issues: GitHub Issues
- Email: mike@signpresenter.com
- Built for volunteer fire departments who serve their communities
- Powered by SignPresenter for digital signage displays
- Thanks to all contributors and fire departments using this system
- β Multi-User Authentication: Add multiple admin users with individual logins for better audit trails
- β User Management System: Admin interface to create, manage, and deactivate user accounts
- β Password Security: Bcrypt password hashing with forced password change on first login
- β Request-Based Backups: Fixed automatic Dropbox backups to work reliably on PythonAnywhere
- β ISO Hose Testing: Complete hose testing system with compliance tracking and year closeout
- β Detailed Inspection Reports: Export comprehensive reports showing every individual checklist item inspected with pass/fail status
- β Vehicle Fluid Specifications: Track required oil, coolant, brake fluid, power steering fluid, and transmission fluid for each vehicle
- β Inline Fluid Display: During inspections, fluid requirements automatically appear next to relevant checklist items
- β Failed Inspection System: Comprehensive alerts across dashboard, display board, and maintenance pages
- β Auto-Generated Vehicle Codes: Smart vehicle code generation from vehicle name and type
- β Station-Based Inspection Filtering: Filter inspections by station with "All Stations" option
- β Enhanced Maintenance Alerts: Failed inspections now prominently highlighted at top of maintenance menu
- Mobile app for iOS/Android
- Advanced scheduling system
- Training record management
- Grant reporting features
- Multi-department support
- API for third-party integrations
- Work order system for maintenance tracking
Made with β€οΈ for volunteer firefighters






