How dhlee-gif/fireextinguisher works
FireExtinguisher is a Flask/MariaDB control dashboard for an autonomous fire-response RC car. Operators view live status and fire, water, and device logs, then issue sortie, stop, return, or resume commands. The car reports heartbeats, fire events and images, spray results, status, and water readings through the API; the dashboard combines persisted records with in-memory live state. The simulator exercises that device-facing API. The excerpts show these main routes and data dependencies; other template behavior and unsampled modules are represented only where the README or tree supports them.
Main entry points: api.py Device API · app.py Dashboard routes · live.js Live dashboard · db.py Database sessions
Components 16
Operator interface
- Dashboard routes
web/app.py - Live dashboard
web/static/js/live.js - Dashboard views
web/templates
Control and telemetry
- Car simulator
web/simulator.py - Device API
web/api.py - Live command state
web/state.py - Display labels
web/labels.py
Domain records
- Fire events and images
web/models.py - Device and admin records
web/models.py - Status and water logs
web/models.py
Runtime support
- Database sessions
web/db.py - Runtime configuration
web/config.py
Other components
- Operator
- RC car
- MariaDB
- Camera stream
Connections 23
- Operator → Live dashboard: uses
web/static/js/live.js - Live dashboard → Dashboard routes: loads pages
web/app.py - Dashboard routes → Dashboard views: renders
web/app.py - Live dashboard → Device API: polls and commands
web/static/js/live.js - Live dashboard → Camera stream: displays stream
- RC car → Device API: reports telemetry
- Car simulator → Device API: sends API requests
web/simulator.py - Device API → Database sessions: opens sessions
web/api.py - Dashboard routes → Database sessions: opens sessions
web/app.py - Database sessions → MariaDB: connects
web/db.py - Device API → Live command state: updates and reads
web/api.py - Dashboard routes → Live command state: reads and queues
web/app.py - Device API → Fire events and images: writes fire data
web/api.py - Device API → Status and water logs: writes telemetry
web/api.py - Device API → Device and admin records: updates device
web/api.py - Dashboard routes → Fire events and images: queries fire history
web/app.py - Dashboard routes → Status and water logs: queries logs
web/app.py - Dashboard routes → Device and admin records: queries admin and device
web/app.py - Dashboard routes → Display labels: uses labels
web/app.py - Device API → Display labels: validates actions
web/api.py - Dashboard routes → Runtime configuration: loads settings
web/app.py - Device API → Runtime configuration: loads settings
web/api.py - Database sessions → Runtime configuration: configures engine
web/db.py