How adiendendra/fishing-backend works
This repository implements a fishing-forecast backend: a browser requests a location and date, receives cached or partial weather data, and asynchronous stages add astronomy, deterministic fishing-activity scoring, and an AI-written explanation. A scheduled job prewarms forecasts through the same cache pipeline. Source excerpts establish these runtime links; the tree also contains a Telegram notifier directory, but provides no source evidence to map its behavior.
Main entry points: weather_activity/handler.py Activity handler · weather_cache_pipeline.py Cache pipeline · weather_analysis/handler.py Analysis handler · weather_handler/handler.py Request handler
Components 18
Request and scheduling
- HTTP API Gateway
- Request handler
lambda_functions/weather_handler/handler.py - Prewarm handler
lambda_functions/weather_processor/handler.py
Forecast and cache
- Cache pipeline
lambda_functions/shared/weather_cache_pipeline.py - Weather data fetch
lambda_functions/shared/weather_data.py - Cache key helper
lambda_functions/shared/cache_keys.py - Weather cache
Fishing activity
- Activity handler
lambda_functions/weather_activity/handler.py - Astronomy calculations
lambda_functions/shared/astronomy.py - Fishing activity scoring
lambda_functions/shared/fishing_activity.py
AI analysis
- Analysis handler
lambda_functions/weather_analysis/handler.py - Weather narrative
lambda_functions/shared/ai_analysis.py - Species identification
lambda_functions/shared/ai_analysis.py
Other components
- Browser client
- EventBridge schedule
- Open-Meteo
- Gemini API
- Parameter Store
Connections 23
- Browser client → HTTP API Gateway: requests forecast
- HTTP API Gateway → Request handler: routes request
- EventBridge schedule → Prewarm handler: triggers schedule
- Request handler → Cache key helper: creates key
- Request handler → Weather cache: reads cache
- Request handler → Cache pipeline: builds on miss
- Prewarm handler → Cache pipeline: prewarms dates
- Cache pipeline → Weather data fetch: fetches bundle
- Weather data fetch → Open-Meteo: requests conditions
- Cache pipeline → Cache key helper: creates key
- Cache pipeline → Weather cache: writes partial data
- Cache pipeline → Activity handler: invokes asynchronously
- Activity handler → Weather cache: reads partial data
- Activity handler → Astronomy calculations: calculates astronomy
- Activity handler → Fishing activity scoring: scores conditions
- Activity handler → Weather cache: writes activity data
- Activity handler → Analysis handler: invokes asynchronously
- Analysis handler → Weather cache: reads activity data
- Analysis handler → Weather narrative: generates narrative
- Analysis handler → Parameter Store: gets API key
- Weather narrative → Gemini API: requests narrative
- Analysis handler → Weather cache: writes completed data
- Species identification → Gemini API: identifies from image