How srujan111-max/sih26076-mausam works
Mausam turns a selected persona and location into weather guidance: the frontend gathers preferences, the Flask endpoint validates and stores them, the weather service fetches and normalizes provider data, then applies persona-specific recommendations and returns a homepage response. The README documents forecasts, air quality, traveller destinations, alerts and insights as product capabilities. Source evidence is strongest for the API boundary and SSR error handling; some weather-service internals and frontend routes were not sampled, so those relationships are documented or left unconnected rather than inferred.
Main entry points: weather_service.py Weather service · app.py Personalization API · data.ts Persona and mock data · server.ts SSR request handler
Components 17
Personalized frontend
- Weather dashboard
mausam-persona-builder-main/mausam-persona-builder-main/src/routes/dashboard.tsx - Persona preferences
mausam-persona-builder-main/mausam-persona-builder-main/src/routes/preferences.$role.tsx - Backend client
mausam-persona-builder-main/mausam-persona-builder-main/src/lib/mausam/api.ts - Weather alerts
mausam-persona-builder-main/mausam-persona-builder-main/src/routes/alerts.tsx - Weather insights
mausam-persona-builder-main/mausam-persona-builder-main/src/routes/insights.tsx - Persona and mock data
mausam-persona-builder-main/mausam-persona-builder-main/src/lib/mausam/data.ts
Backend API
- Personalization API
app.py
Weather processing
- Weather service
weather_service.py - Location geocoding
weather_service.py - Forecast and air quality
weather_service.py - Persona guidance
weather_service.py
Preference storage
- SQLite preferences
database.py
SSR error handling
- SSR request handler
mausam-persona-builder-main/mausam-persona-builder-main/src/server.ts - Error capture
mausam-persona-builder-main/mausam-persona-builder-main/src/lib/error-capture.ts - Fallback error page
mausam-persona-builder-main/mausam-persona-builder-main/src/lib/error-page.ts
Other components
- Weather user
- Open-Meteo APIs
Connections 17
- Weather user → Persona preferences: sets preferences
README.md - Weather user → Weather dashboard: views guidance
README.md - Weather dashboard → Backend client: requests data
mausam-persona-builder-main/mausam-persona-builder-main/src/routes/dashboard.tsx - Backend client → Personalization API: POST personalization
README.md - Personalization API → SQLite preferences: saves selection
app.py - Personalization API → Weather service: requests homepage
app.py - Weather service → Location geocoding: resolves locations
README.md - Weather service → Forecast and air quality: fetches conditions
README.md - Weather service → Persona guidance: builds guidance
README.md - Location geocoding → Open-Meteo APIs: queries geocoding
README.md - Forecast and air quality → Open-Meteo APIs: fetches weather
README.md - Persona guidance → Personalization API: returns homepage data
app.py - Persona preferences → Persona and mock data: uses role definitions
- Weather alerts → Persona and mock data: presents alert content
- Weather insights → Persona and mock data: presents insight content
- SSR request handler → Error capture: captures errors
mausam-persona-builder-main/mausam-persona-builder-main/src/server.ts - SSR request handler → Fallback error page: renders fallback
mausam-persona-builder-main/mausam-persona-builder-main/src/server.ts