How punyakp/ecowatch works
EcoWatch is a Flask-based environmental reporting and monitoring dashboard. Users sign in, submit environmental issue reports, and view them through report, alert, analytics, map, and AI-insight screens; users can also manage accounts and settings. The app computes report statistics and persists reports and user records in JSON files, with an S3 upload helper and OpenWeather data helpers present in app.py. The excerpts do not show all route bodies or template forms, so uncertain calls—especially which screens invoke the external-service helpers—are omitted.
Main entry points: app.py Flask routes · reports.json Report records · login.html Login screen · index.html Dashboard screen
Components 21
Web interface
- Flask routes
app.py - Login and access
app.py - Login screen
templates/login.html - Dashboard screen
templates/index.html - Reports screen
templates/reports.html - Alerts screen
templates/alerts.html - Analytics screen
templates/analytics.html - Map screen
templates/map.html - AI insights screen
templates/ai.html - User management screen
templates/users.html - Settings screen
templates/settings.html
Reporting and insights
- Report operations
app.py - Report statistics
app.py
Application state
- Report records
reports.json - User records
users.json - Uploaded files
static/uploads
External integrations
- S3 upload helper
app.py - AWS S3
- Weather data helpers
app.py - OpenWeather API
Other components
- User
Connections 18
- User → Flask routes: requests pages
- Flask routes → Login and access: handles login
- Login and access → User records: loads and saves
- Flask routes → Login screen: renders
- Flask routes → Dashboard screen: renders
- Flask routes → Reports screen: renders
- Flask routes → Alerts screen: renders
- Flask routes → Analytics screen: renders
- Flask routes → Map screen: renders
- Flask routes → AI insights screen: renders
- Flask routes → User management screen: renders
- Flask routes → Settings screen: renders
- Flask routes → Report operations: handles reports
- Report operations → Report records: loads and saves
- Flask routes → Report statistics: requests statistics
- Report statistics → Report records: reads reports
- S3 upload helper → AWS S3: uploads files
- Weather data helpers → OpenWeather API: requests conditions