How sothyrith/air-guardian-app works
Air Guardian is a Flutter app for monitoring city air quality and giving weather-aware health guidance. The main user flow is selecting or locating a city, viewing AQI and weather, checking forecasts and health recommendations, then optionally asking the AI assistant for contextual advice; account access and saved chat history support that experience. The README documents Firebase, DeepSeek, and GPS capabilities, but Flutter application source was not excerpted, so product-stage links are documented rather than verified call paths. The excerpts chiefly cover native desktop/mobile launch scaffolding, not the Dart runtime.
Main entry points: main.dart Flutter app · auth_service.dart Authentication · ai_assistant_screen.dart AI assistant · ai_chat_service.dart AI chat service
Components 31
User experience
- Flutter app
lib/main.dart
Location and context
- City selection
lib/providers/city_provider.dart - City locations
lib/constants/city_locations.dart - GPS context
lib/services/location_context_service.dart - Chat context
lib/services/chat_context_service.dart
Air quality
- AQI dashboard
lib/screens/home_screen.dart - AQI details
lib/screens/aqi_screen.dart - AQI retrieval
lib/services/aqi_service.dart - AQI model
lib/models/aqi_model.dart - Weather state
lib/providers/weather_provider.dart - Weather retrieval
lib/services/weather_service.dart - Weather model
lib/models/weather_model.dart - AQI forecast
lib/screens/forecast_screen.dart - Forecast retrieval
lib/services/forecast_service.dart - Forecast model
lib/models/forecast_model.dart - Health guidance
lib/screens/health_screen.dart - Pollution awareness
lib/screens/awareness_screen.dart
AI and chat
- AI assistant
lib/screens/ai_assistant_screen.dart - AI chat service
lib/services/ai_chat_service.dart - DeepSeek API
- Chat messages
lib/models/chat_message.dart - Context snapshot
lib/models/chat_context_snapshot.dart
Identity and persistence
- Account screens
lib/screens/login_screen.dart - Registration
lib/screens/register_screen.dart - Email verification
lib/screens/verify_email_screen.dart - Authentication
lib/services/auth_service.dart - Firebase Auth
- Chat sessions
lib/models/chat_session.dart - Chat repository
lib/repositories/chat_repository.dart - Chat history
Other components
- App user
Connections 30
- App user → Flutter app: opens
README.md - Flutter app → City selection: offers selection
- City selection → City locations: uses locations
- Flutter app → AQI dashboard: shows dashboard
- AQI dashboard → AQI retrieval: requests AQI
- AQI retrieval → AQI model: provides data
- Flutter app → Weather state: provides weather
- Weather state → Weather retrieval: requests weather
- Weather retrieval → Weather model: provides data
- Flutter app → AQI details: shows details
- Flutter app → AQI forecast: shows forecast
- AQI forecast → Forecast retrieval: requests forecast
- Forecast retrieval → Forecast model: provides data
- Flutter app → Health guidance: shows guidance
- Flutter app → Pollution awareness: shows education
- Flutter app → GPS context: gets GPS context
- AI assistant → Chat context: requests context
- Chat context → Context snapshot: builds snapshot
- AI assistant → AI chat service: sends prompt
- AI chat service → DeepSeek API: requests advice
README.md - AI chat service → Chat messages: uses messages
- App user → Account screens: signs in
- App user → Registration: creates account
- Registration → Authentication: registers
- Account screens → Authentication: authenticates
- Email verification → Authentication: verifies email
- Authentication → Firebase Auth: uses Firebase
README.md - AI assistant → Chat repository: saves conversations
- Chat repository → Chat sessions: uses sessions
- Chat repository → Chat history: persists history
README.md