How siddhesh-k7/breathewise-ai works
AirWise is a web air-quality assistant whose main workflow takes a household’s location and profile, gathers atmospheric and fire telemetry, calculates quantified impact, then returns a tailored smog action plan for display. The product also supports live AQI monitoring, ground-station cross-checks, fire context, conversational chat, city comparison, geocoding, and community sharing. Edges follow the README, indexed references, and excerpts; unsampled UI and API wiring is not inferred beyond documented relationships.
Main entry points: page.tsx AirWise dashboard · recommendations/route.ts Plan endpoint · api Other product APIs · aqi/route.ts AQI endpoint
Components 28
User experience
- AirWise dashboard
src/app/page.tsx - AQI insights
src/components/aqi/SmartFamilyDashboard.tsx - Household profile
src/components/profile/ProfileForm.tsx - Plan display
src/components/plan/PlanDisplay.tsx - Impact simulator
src/components/simulator/WhatIfSimulator.tsx - Streaming chat
src/components/chat/StreamingChat.tsx - Community bulletin
src/components/community/CommunityCard.tsx - Telemetry hook
src/hooks/useAqi.ts - Plan hook
src/hooks/usePlan.ts
Air telemetry
- AQI endpoint
src/app/api/aqi/route.ts - Open-Meteo telemetry
src/services/aqi-service.ts - Station cross-check
src/services/waqi-service.ts - Fire detections
src/services/firms-service.ts - Geocoding service
src/services/geocoding-service.ts
Plans and impact
- Plan endpoint
src/app/api/recommendations/route.ts - Impact calculator
src/services/impact-calculator.ts - Plan and chat AI
src/services/gemini-service.ts - Fallback plan
src/services/fallback-plan.ts
API and state
- Request schemas
src/validators/schemas.ts - Memory cache
src/services/cache.ts - Response utilities
src/services/api-response.ts - Other product APIs
src/app/api - Application data store
src/services/db.ts - Data models
src/services/models.ts
Other components
- Household user
- Open-Meteo
- WAQI
- NASA FIRMS
Connections 36
- Household user → AirWise dashboard: uses
README.md - AirWise dashboard → Telemetry hook: loads telemetry
src/app/page.tsx - AirWise dashboard → Plan hook: requests plan
src/app/page.tsx - AirWise dashboard → AQI insights: renders
src/app/page.tsx - AirWise dashboard → Household profile: renders
src/app/page.tsx - AirWise dashboard → Plan display: renders
src/app/page.tsx - AirWise dashboard → Impact simulator: renders
src/app/page.tsx - AirWise dashboard → Streaming chat: renders
src/app/page.tsx - AirWise dashboard → Community bulletin: renders
src/app/page.tsx - Telemetry hook → AQI endpoint: fetches
src/hooks/useAqi.ts - Plan hook → Plan endpoint: submits plan
- AQI endpoint → Open-Meteo telemetry: fetches telemetry
src/app/api/aqi/route.ts - AQI endpoint → Station cross-check: cross-checks
src/app/api/aqi/route.ts - AQI endpoint → Fire detections: loads fires
src/app/api/aqi/route.ts - Open-Meteo telemetry → Open-Meteo: fetches
src/services/aqi-service.ts - Station cross-check → WAQI: fetches
src/services/waqi-service.ts - Fire detections → NASA FIRMS: fetches
src/services/firms-service.ts - Open-Meteo telemetry → Memory cache: reads and writes
src/services/aqi-service.ts - Station cross-check → Memory cache: reads and writes
src/services/waqi-service.ts - Fire detections → Memory cache: reads and writes
src/services/firms-service.ts - Plan endpoint → Request schemas: validates request
src/app/api/recommendations/route.ts - Plan endpoint → Open-Meteo telemetry: fetches telemetry
src/app/api/recommendations/route.ts - Plan endpoint → Station cross-check: cross-checks
src/app/api/recommendations/route.ts - Plan endpoint → Fire detections: loads fire context
src/app/api/recommendations/route.ts - Plan endpoint → Impact calculator: calculates impact
src/app/api/recommendations/route.ts - Plan endpoint → Plan and chat AI: generates plan
src/app/api/recommendations/route.ts - Plan and chat AI → Fallback plan: falls back
src/services/gemini-service.ts - Plan and chat AI → Memory cache: caches plans
src/services/gemini-service.ts - Impact simulator → Impact calculator: calculates scenarios
src/components/simulator/WhatIfSimulator.tsx - Streaming chat → Other product APIs: streams chat
- Other product APIs → Plan and chat AI: uses AI
src/app/api/chat/route.ts - Plan endpoint → Response utilities: formats response
src/app/api/recommendations/route.ts - Other product APIs → Application data store: uses storage
src/app/api/profile/route.ts - Other product APIs → Data models: uses models
src/app/api/profile/route.ts - Other product APIs → Geocoding service: serves search
src/app/api/geocoding/route.ts - Geocoding service → Open-Meteo: queries places