How rubeshnpl13/riverwatch-nepal works
RiverWatch Nepal ingests BIPAD river data, validates and preserves raw records, processes typed datasets and quality reports, then serves monitoring analytics through a FastAPI API and React dashboard. Its event-driven cloud execution path supports ingestion and managed Spark processing. The graph combines sampled call relationships with README-documented capabilities; unsampled analytics, dashboard, and cloud subsystems are included at paths supported by the tree, but their internal links are not inferred where evidence is absent.
Main entry points: App.tsx Dashboard application · historical_service.py Validate and ingest · pipeline.py Spark transformations · processing_pipeline.py Cloud Spark pipeline
Components 25
BIPAD ingestion
- Paginated API client
src/riverwatch/ingestion/bipad/client.py - Validate and ingest
src/riverwatch/ingestion/bipad/historical_service.py - Source endpoints
src/riverwatch/ingestion/bipad/endpoints.py
Lake and processing
- Immutable raw records
src/riverwatch/storage/raw.py - Run manifests
src/riverwatch/storage/manifest.py - Quarantined records
src/riverwatch/storage/quarantine.py - Spark transformations
src/riverwatch/processing/spark/pipeline.py - Quality reports
src/riverwatch/quality/spark/summary.py - Typed Parquet datasets
src/riverwatch/processing/spark/writer.py
Event execution
- Event worker
src/riverwatch/events/worker.py - Event bus
src/riverwatch/events/bus.py - Cloud ingestion service
src/riverwatch/cloud/ingestion_app.py - Cloud Spark pipeline
src/riverwatch/cloud/processing_pipeline.py
Analytics and API
- Network and basin analytics
src/riverwatch/analytics/service.py - BigQuery analytics
src/riverwatch/analytics/bigquery.py - FastAPI endpoints
src/riverwatch/api/app.py
Dashboard
- Dashboard application
frontend/src/App.tsx - HTTP API client
frontend/src/api/client.ts - Network overview
frontend/src/components/NetworkOverview.tsx - Station map
frontend/src/components/StationMap.tsx - Station history
frontend/src/components/StationDetail.tsx - Station table
frontend/src/components/StationTable.tsx - Basin analytics view
frontend/src/components/BasinAnalytics.tsx
Other components
- BIPAD Nepal
- Dashboard user
Connections 27
- Paginated API client → BIPAD Nepal: fetches pages
src/riverwatch/ingestion/bipad/client.py - Validate and ingest → Paginated API client: reads source
src/riverwatch/ingestion/bipad/historical_service.py - Validate and ingest → Immutable raw records: writes raw
src/riverwatch/ingestion/bipad/historical_service.py - Validate and ingest → Quarantined records: writes invalid
src/riverwatch/ingestion/bipad/historical_service.py - Validate and ingest → Run manifests: records run
src/riverwatch/ingestion/bipad/historical_service.py - Validate and ingest → Source endpoints: uses types
src/riverwatch/ingestion/bipad/historical_service.py - Spark transformations → Immutable raw records: reads inputs
src/riverwatch/processing/spark/pipeline.py - Spark transformations → Run manifests: loads run
src/riverwatch/processing/spark/pipeline.py - Spark transformations → Typed Parquet datasets: writes datasets
src/riverwatch/processing/spark/pipeline.py - Spark transformations → Quality reports: evaluates quality
src/riverwatch/processing/spark/pipeline.py - Event worker → Event bus: consumes requests
src/riverwatch/events/worker.py - Event worker → Validate and ingest: runs ingestion
- Cloud ingestion service → Event worker: handles events
src/riverwatch/cloud/ingestion_app.py - Cloud Spark pipeline → Immutable raw records: loads inputs
src/riverwatch/cloud/processing_pipeline.py - Cloud Spark pipeline → Typed Parquet datasets: commits datasets
src/riverwatch/cloud/processing_pipeline.py - Cloud Spark pipeline → Quality reports: creates reports
src/riverwatch/cloud/processing_pipeline.py - Typed Parquet datasets → Network and basin analytics: feeds analytics
README.md - Network and basin analytics → FastAPI endpoints: serves queries
src/riverwatch/api/app.py - BigQuery analytics → Network and basin analytics: cloud implementation
README.md - Dashboard user → Dashboard application: views dashboard
- Dashboard application → HTTP API client: requests data
- HTTP API client → FastAPI endpoints: calls HTTP API
README.md - Dashboard application → Network overview: renders
frontend/src/App.tsx - Dashboard application → Station map: renders
frontend/src/App.tsx - Dashboard application → Station history: renders
frontend/src/App.tsx - Dashboard application → Basin analytics view: renders
frontend/src/App.tsx - Dashboard application → Station table: renders
frontend/src/App.tsx