Quick reference for working on the Fire Department Management System.
- GitHub Repository: https://github.com/mbyrdLCS/Fire-Department-Management-System
- Live Site: https://michealhelps.pythonanywhere.com
- PythonAnywhere Username: michealhelps
Fire-Department-Management-System/
├── flask_app/ # Main application code
│ ├── app.py # Flask application
│ ├── db_helpers.py # Database functions
│ ├── db_init.py # Database initialization
│ ├── templates/ # HTML templates
│ ├── static/ # CSS, JS, images
│ └── database/ # SQLite database (fire_dept.db)
├── README.md # Project overview
├── DEPLOYMENT.md # Deployment instructions
├── DATABASE_SCHEMA.md # Database documentation
└── requirements.txt # Python dependencies
# Navigate to project
cd /Users/MJB/Fire-Department-Management-System
# Make your changes to files
# Test locally if needed
cd flask_app
source ../venv/bin/activate
python app.py
# Visit: http://localhost:5001# Stage your changes
git add .
# Commit with a descriptive message
git commit -m "Description of what you changed"
# Push to GitHub
git push origin mainOpen PythonAnywhere bash console and run:
# Navigate to project
cd ~/Fire-Department-Management-System
# Pull latest changes from GitHub
git pull origin main
# If you changed Python dependencies:
workon fdms-env
pip install -r requirements.txt
# If you changed database schema:
cd ~/Fire-Department-Management-System/flask_app
python db_init.py # Only for NEW databases
# OR run migration scripts if neededThen reload the web app:
- Go to: https://www.pythonanywhere.com/user/michealhelps/
- Click Web tab
- Click green Reload button
- Test: https://michealhelps.pythonanywhere.com
# PythonAnywhere console
cd ~/Fire-Department-Management-System/flask_app
workon fdms-env
python db_init.py # For fresh database# PythonAnywhere console
cd ~/Fire-Department-Management-System/flask_app
workon fdms-env
python add_default_categories.py# PythonAnywhere console
tail -50 /var/log/michealhelps.pythonanywhere.com.error.log# PythonAnywhere console
cd ~/Fire-Department-Management-System/flask_app/database
sqlite3 fire_dept.db
.tables
.schema table_name
.quitWhen Claude Code makes changes:
git add .
git commit -m "Descriptive message of changes"
git push origin main- Main App:
flask_app/app.py - Database Functions:
flask_app/db_helpers.py - Database Schema:
flask_app/db_init.py - Templates:
flask_app/templates/*.html - Config:
.env(contains passwords - NEVER commit!) - WSGI Config: On PythonAnywhere at
/var/www/michealhelps_pythonanywhere_com_wsgi.py
Located in .env file (NOT in git):
ADMIN_USERNAME=your_admin_username
ADMIN_PASSWORD=your_secure_password
SECRET_KEY=your_secret_key_here
- Check error logs:
tail -50 /var/log/michealhelps.pythonanywhere.com.error.log - Check if web app reloaded: Go to Web tab, click Reload
- Check if database exists:
ls -la ~/Fire-Department-Management-System/flask_app/database/
- Did you push to GitHub?
git status - Did you pull on PythonAnywhere?
git pull origin main - Did you reload the web app? Go to Web tab → Reload
- Check database path in logs
- Verify database file exists:
~/Fire-Department-Management-System/flask_app/database/fire_dept.db - Check permissions:
ls -la ~/Fire-Department-Management-System/flask_app/database/
- ✅ Always test locally before deploying (if possible)
- ✅ Commit often with clear messages
- ✅ Check error logs if something breaks
- ✅ Keep
.envfile secure and never commit it - ✅ Document major changes in commit messages
- ❌ Never force push to main (
git push --force) - ❌ Never commit passwords or API keys
- Open project folder:
cd /Users/MJB/Fire-Department-Management-System - Check what changed:
git status - Pull any changes from GitHub:
git pull origin main - Start making changes!
- Make changes locally
- Test locally (optional)
-
git add . -
git commit -m "Message" -
git push origin main - SSH/Console to PythonAnywhere
-
cd ~/Fire-Department-Management-System -
git pull origin main - Go to Web tab
- Click Reload button
- Test site: https://michealhelps.pythonanywhere.com
- Check for errors in logs if needed
- GitHub Issues: https://github.com/mbyrdLCS/Fire-Department-Management-System/issues
- PythonAnywhere Help: https://help.pythonanywhere.com/
- PythonAnywhere Forums: https://www.pythonanywhere.com/forums/
Fire Department Management System for tracking:
- ✅ Firefighter clock in/out
- ✅ Activity tracking (Work night, Training, Board Meeting, EMR Meeting, Other)
- ✅ Vehicle inspections (6-day intervals)
- ✅ Maintenance work orders
- ✅ Inventory management (station & vehicle)
- ✅ Reports and analytics
- ✅ Dashboard and display board for TV
Remember: GitHub → PythonAnywhere → Reload → Test!