How response-central/emergency-responsestarter works
This is a starter emergency-reporting dashboard: a user views incidents or submits a report, which the Flask API validates and saves as a location, emergency call, and incident; the dashboard can then read incident details. The React app also checks API health. The README explicitly says the system does not contact emergency services and that assignment and login are future work. The sampled source shows the API’s PostgreSQL queries and connection helper; the schema file is documented but was not sampled, so its internal details are not expanded here.
Main entry points: app.py Incident listing · App.jsx Dashboard view · database.py DB connection · main.jsx React entry
Components 13
React frontend
- React entry
src/main.jsx - Dashboard view
src/App.jsx - Report form
src/App.jsx
Flask API
- Health endpoint
app.py - Incident listing
app.py - Report submission
app.py
PostgreSQL persistence
- DB connection
database.py - Location records
database/schema.sql - Emergency calls
database/schema.sql - Incident records
database/schema.sql
Other components
- User
- Web browser
- PostgreSQL
Connections 16
- User → Web browser: uses
README.md - Web browser → React entry: opens
README.md - React entry → Dashboard view: renders
src/main.jsx - User → Report form: submits
src/App.jsx - Report form → Report submission: posts report
src/App.jsx - Dashboard view → Incident listing: loads incidents
src/App.jsx - Dashboard view → Health endpoint: checks health
src/App.jsx - Report submission → DB connection: opens connection
app.py - Incident listing → DB connection: opens connection
app.py - DB connection → PostgreSQL: connects
database.py - Report submission → Location records: inserts
app.py - Report submission → Emergency calls: inserts
app.py - Report submission → Incident records: inserts
app.py - Incident listing → Incident records: queries
app.py - Incident listing → Emergency calls: joins
app.py - Incident listing → Location records: joins
app.py