How linhtran00/nest-guard works
NestGuard is a homeowner risk-assessment application. The main journey is home intake, API scoring, then a dashboard with category details and ranked mitigation tips; users can also view live weather alerts and report events for rescoring. The backend scoring stages are visible in the API excerpt. Several frontend routes and integrations are represented from README claims and the source index; their internal wiring is not fully shown.
Main entry points: App.jsx App flow · main.py FastAPI endpoints · Dashboard.jsx Risk dashboard · IntakeForm.jsx Home intake
Components 25
Homeowner app
- Home intake
frontend/src/pages/IntakeForm.jsx - App flow
frontend/src/App.jsx - Login view
frontend/src/components/login-page.jsx - Score API client
frontend/src/lib/api.js - Risk dashboard
frontend/src/pages/Dashboard.jsx - Risk gauge
frontend/src/components/risk-gauge.jsx - House map
frontend/src/pages/HouseMap.jsx - House visualization
frontend/src/components/house-visualization.jsx - Category details
frontend/src/pages/details - Detail shell
frontend/src/components/DetailShell.jsx - Action tips
frontend/src/pages/TipsPage.jsx - Live alerts
frontend/src/pages/LiveAlerts.jsx - Weather client
frontend/src/lib/weatherApi.js - Settings
frontend/src/pages/Settings.jsx
Risk assessment API
- Request and response schemas
backend/models/schemas.py - FastAPI endpoints
backend/main.py - Address geocoding
backend/services/geo.py - FEMA hazard lookup
backend/services/fema.py - Event classification
backend/services/ai.py - Risk scoring and tips
backend/services/risk.py
External data and AI
- FEMA data service
- Geocoding service
- AI providers
- Weather service
Other components
- Homeowner
Connections 28
- Homeowner → Login view: opens app
- App flow → Login view: shows when signed out
frontend/src/App.jsx - Homeowner → Home intake: enters home data
README.md - Home intake → App flow: submits assessment
README.md - App flow → Score API client: requests score
frontend/src/App.jsx - Score API client → FastAPI endpoints: POST /score
README.md - FastAPI endpoints → Request and response schemas: validates and responds
backend/main.py - FastAPI endpoints → Address geocoding: geocodes address
backend/main.py - Address geocoding → Geocoding service: queries
- FastAPI endpoints → FEMA hazard lookup: fetches hazard data
backend/main.py - FEMA hazard lookup → FEMA data service: queries
- FastAPI endpoints → Event classification: classifies events
backend/main.py - Event classification → AI providers: classifies with
- FastAPI endpoints → Risk scoring and tips: scores home
backend/main.py - Risk scoring and tips → Request and response schemas: builds response
backend/services/risk.py - FastAPI endpoints → App flow: returns assessment
README.md - App flow → Risk dashboard: shows results
frontend/src/App.jsx - Risk dashboard → Risk gauge: renders score
frontend/src/pages/Dashboard.jsx - Risk dashboard → Category details: opens category view
frontend/src/pages/Dashboard.jsx - Category details → Detail shell: uses shared wrapper
frontend/src/pages/details/NaturalDisasterDetail.jsx - Risk dashboard → Action tips: shows action tips
README.md - App flow → House map: routes to map
frontend/src/App.jsx - House map → House visualization: renders visualization
frontend/src/pages/HouseMap.jsx - House visualization → App flow: submits event for rescoring
- App flow → Live alerts: routes to alerts
frontend/src/App.jsx - Live alerts → Weather client: fetches forecast
frontend/src/pages/LiveAlerts.jsx - Weather client → Weather service: requests weather
- App flow → Settings: routes to settings
frontend/src/App.jsx