How ashrithakadarla/airmind-ai works
AirMind AI is a city-focused air-quality intelligence platform. A user selects a city in the React dashboard, which requests current conditions and history from the backend; prediction capabilities extend this workflow with current and 24-/72-hour forecasts and health guidance. The backend collects environmental data, stores snapshots, and exposes API routers, while the frontend presents maps and historical/pollutant analytics. README-described capabilities are included, but links into unsampled API routes and collector internals are omitted where exact wiring cannot be confirmed.
Main entry points: Home.jsx Live dashboard · main.py FastAPI app · router.jsx Page router · data_collector.py Data collector
Components 25
React Dashboard
- React app
frontend/src/App.jsx - Page router
frontend/src/router.jsx - Selected city
frontend/src/context/CityContext.jsx - Live dashboard
frontend/src/pages/Home.jsx - Forecast page
frontend/src/pages/Prediction.jsx - API client
frontend/src/services/api.js - Maps and charts
frontend/src/components/Map/AQIMap.jsx - Health guidance
frontend/src/utils/healthRecommendations.js
Backend API
- FastAPI app
backend/app/main.py - AQI endpoints
backend/app/api/aqi.py - Environment endpoints
backend/app/api/environment.py - Prediction endpoints
backend/app/api/prediction.py - AQI service
backend/app/services/aqi_service.py - Environment service
backend/app/services/environment_service.py - AQI repository
backend/app/repositories/aqi_repository.py - MongoDB
backend/app/database/mongodb.py
Environmental Data
- Data collector
backend/app/integrations/data_collector.py - City geocoding
backend/app/integrations/geocoding.py - Weather integration
backend/app/integrations/weather_service.py - OpenWeather AQI
backend/app/integrations/openweather_aqi.py
Prediction Intelligence
- Prediction service
backend/app/services/prediction_service.py - AQI predictor
ml/predictor.py - Prediction models
ml/predict.py
Other components
- City user
- OpenWeather APIs
Connections 25
- City user → React app: uses
- React app → Page router: renders
- Page router → Live dashboard: routes
- Page router → Forecast page: routes
- Live dashboard → Selected city: reads city
- Live dashboard → API client: requests data
- API client → FastAPI app: sends requests
- Live dashboard → Maps and charts: renders analytics
- FastAPI app → AQI endpoints: registers routes
- FastAPI app → Environment endpoints: registers routes
- FastAPI app → Prediction endpoints: registers routes
- AQI service → Data collector: collects data
- AQI service → AQI repository: stores and reads
- AQI repository → MongoDB: queries and writes
- Environment service → AQI repository: reads environment
- Weather integration → City geocoding: gets coordinates
- Data collector → OpenWeather AQI: collects AQI
- Data collector → Weather integration: collects weather
- OpenWeather AQI → OpenWeather APIs: fetches air data
- Weather integration → OpenWeather APIs: fetches weather
- City geocoding → OpenWeather APIs: geocodes city
- Prediction service → AQI service: refreshes data
- Prediction service → AQI predictor: requests predictions
- AQI predictor → Prediction models: uses models
- Forecast page → Health guidance: uses guidance