# vivanparwani5526/orca---sih26176 architecture

> Architecture diagram of the GitHub repository vivanparwani5526/orca---sih26176, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vivanparwani5526/orca---sih26176
- Repository: https://github.com/vivanparwani5526/orca---sih26176

## Overview

ORCA is a marine decision-support application for fishers: users submit a natural-language or location-based query, and the backend assembles capability evidence into an explanation and decision displayed in the client. The tree identifies weather, waves, tides, PFZ/productivity, hazards, geofencing, routing, maps, and community catches as distinct product areas. The query route excerpt confirms selected service calls, and the PFZ/productivity excerpts confirm that relationship. Other service wiring is not fully sampled, so uncertain service-to-service links are omitted.

Main entry points: [`backend/app/api/routes/query.py`](https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/api/routes/query.py) (Query endpoint), [`frontend/src/pages/Dashboard.jsx`](https://github.com/vivanparwani5526/orca---sih26176/blob/main/frontend/src/pages/Dashboard.jsx) (Dashboard), [`frontend/src/services/api.js`](https://github.com/vivanparwani5526/orca---sih26176/blob/main/frontend/src/services/api.js) (API client), [`frontend/src/app/App.jsx`](https://github.com/vivanparwani5526/orca---sih26176/blob/main/frontend/src/app/App.jsx) (Application shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User interface"]
  node_app["Application shell<br/>[App.jsx]"]
  node_queryui["Query input<br/>[QueryBox.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_advanced["Advanced dashboard"]
  node_results["Result panels"]
  node_clientapi["API client<br/>[api.js]"]
end

subgraph group_api["API and orchestration"]
  node_server["FastAPI application<br/>[main.py]"]
  node_queryroute["Query endpoint<br/>[query.py]"]
  node_session["Session context<br/>[session_service.py]"]
  node_multiagent["Agent orchestration"]
  node_explanation["Explanation generation"]
  node_language["Language handling"]
  node_maproute["Map data endpoint<br/>[map_data.py]"]
  node_communityroute["Community catches endpoint<br/>[community.py]"]
end

subgraph group_intelligence["Marine intelligence"]
  node_weather["Weather and waves<br/>[weather_service.py]"]
  node_tides["Tide and marine data<br/>[tide_service.py]"]
  node_hazards["Marine hazards"]
  node_geofence["Geofence assessment"]
  node_routing["Route optimization"]
  node_productivity["Fishing productivity"]
  node_pfzservice["PFZ advisory<br/>[pfz_service.py]"]
end

subgraph group_data["Models and data"]
  node_marineengine["PFZ marine engine"]
  node_weather_model["Weather predictor"]
  node_routermodel["Intent router<br/>[router.py]"]
end

node_fisher(("Fisher"))
node_externaldata[("Marine and weather data")]

node_fisher -->|"uses"| node_app
node_app -->|"opens"| node_dashboard
node_app -->|"switches mode"| node_advanced
node_dashboard -->|"offers query"| node_queryui
node_queryui -->|"submits query"| node_dashboard
node_dashboard -->|"requests data"| node_clientapi
node_advanced -->|"requests data"| node_clientapi
node_clientapi -->|"sends query"| node_queryroute
node_server -->|"mounts route"| node_queryroute
node_queryroute -->|"loads context"| node_session
node_queryroute -->|"invokes agents"| node_multiagent
node_queryroute -->|"gets weather"| node_weather
node_queryroute -->|"gets productivity"| node_productivity
node_queryroute -->|"assesses boundary"| node_geofence
node_queryroute -->|"translates text"| node_language
node_queryroute -->|"builds explanation"| node_explanation
node_productivity -->|"gets nearest PFZ"| node_pfzservice
node_productivity -->|"gets marine intelligence"| node_marineengine
node_multiagent -->|"routes intent"| node_routermodel
node_weather -.->|"predicts weather"| node_weather_model
node_externaldata -.->|"supplies observations"| node_weather
node_externaldata -.->|"supplies marine data"| node_tides
node_queryroute -.->|"gets tide data"| node_tides
node_queryroute -.->|"gets hazard data"| node_hazards
node_queryroute -.->|"gets route advice"| node_routing
node_pfzservice -.->|"loads PFZ intelligence"| node_marineengine
node_queryroute -.->|"separate endpoint"| node_maproute
node_queryroute -.->|"separate endpoint"| node_communityroute
node_clientapi -->|"returns response"| node_results
node_results -->|"shows assessment"| node_fisher

click node_app "https://github.com/vivanparwani5526/orca---sih26176/blob/main/frontend/src/app/App.jsx"
click node_queryui "https://github.com/vivanparwani5526/orca---sih26176/blob/main/frontend/src/features/query/QueryBox.jsx"
click node_dashboard "https://github.com/vivanparwani5526/orca---sih26176/blob/main/frontend/src/pages/Dashboard.jsx"
click node_advanced "https://github.com/vivanparwani5526/orca---sih26176/blob/main/frontend/src/pages/AdvancedDashboard.jsx"
click node_results "https://github.com/vivanparwani5526/orca---sih26176/blob/main/frontend/src/features/results/ResultContainer.jsx"
click node_clientapi "https://github.com/vivanparwani5526/orca---sih26176/blob/main/frontend/src/services/api.js"
click node_server "https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/main.py"
click node_queryroute "https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/api/routes/query.py"
click node_session "https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/session_service.py"
click node_multiagent "https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/multi_agent_service.py"
click node_explanation "https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/explanation_service.py"
click node_language "https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/language_service.py"
click node_weather "https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/weather_service.py"
click node_tides "https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/tide_service.py"
click node_hazards "https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/marine_advisory_service.py"
click node_geofence "https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/geofence_service.py"
click node_routing "https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/route_optimizer_service.py"
click node_productivity "https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/fish_productivity_service.py"
click node_pfzservice "https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/pfz_service.py"
click node_marineengine "https://github.com/vivanparwani5526/orca---sih26176/blob/main/models/marine/FINAL_PFZ_MARINE_ENGINE/pfz_marine_engine.py"
click node_weather_model "https://github.com/vivanparwani5526/orca---sih26176/blob/main/models/weather/FINAL_WEATHER_ML/weather_predictor.py"
click node_routermodel "https://github.com/vivanparwani5526/orca---sih26176/blob/main/models/multi_agent/FINAL_MULTI_AGENT_SYSTEM/router.py"
click node_maproute "https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/api/routes/map_data.py"
click node_communityroute "https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/api/routes/community.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_queryui,node_dashboard,node_advanced,node_results,node_clientapi toneBlue
class node_server,node_queryroute,node_session,node_multiagent,node_explanation,node_language,node_maproute,node_communityroute,node_externaldata toneAmber
class node_weather,node_tides,node_hazards,node_geofence,node_routing,node_productivity,node_pfzservice toneMint
class node_marineengine,node_weather_model,node_routermodel toneRose
class node_fisher toneIndigo
```

## Components

### User interface

- [Application shell](https://github.com/vivanparwani5526/orca---sih26176/blob/main/frontend/src/app/App.jsx): `frontend/src/app/App.jsx`
- [Query input](https://github.com/vivanparwani5526/orca---sih26176/blob/main/frontend/src/features/query/QueryBox.jsx): `frontend/src/features/query/QueryBox.jsx`
- [Dashboard](https://github.com/vivanparwani5526/orca---sih26176/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Advanced dashboard](https://github.com/vivanparwani5526/orca---sih26176/blob/main/frontend/src/pages/AdvancedDashboard.jsx): `frontend/src/pages/AdvancedDashboard.jsx`
- [Result panels](https://github.com/vivanparwani5526/orca---sih26176/blob/main/frontend/src/features/results/ResultContainer.jsx): `frontend/src/features/results/ResultContainer.jsx`
- [API client](https://github.com/vivanparwani5526/orca---sih26176/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### API and orchestration

- [FastAPI application](https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/main.py): `backend/app/main.py`
- [Query endpoint](https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/api/routes/query.py): `backend/app/api/routes/query.py`
- [Session context](https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/session_service.py): `backend/app/services/session_service.py`
- [Agent orchestration](https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/multi_agent_service.py): `backend/app/services/multi_agent_service.py`
- [Explanation generation](https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/explanation_service.py): `backend/app/services/explanation_service.py`
- [Language handling](https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/language_service.py): `backend/app/services/language_service.py`
- [Map data endpoint](https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/api/routes/map_data.py): `backend/app/api/routes/map_data.py`
- [Community catches endpoint](https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/api/routes/community.py): `backend/app/api/routes/community.py`

### Marine intelligence

- [Weather and waves](https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/weather_service.py): `backend/app/services/weather_service.py`
- [Tide and marine data](https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/tide_service.py): `backend/app/services/tide_service.py`
- [Marine hazards](https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/marine_advisory_service.py): `backend/app/services/marine_advisory_service.py`
- [Geofence assessment](https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/geofence_service.py): `backend/app/services/geofence_service.py`
- [Route optimization](https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/route_optimizer_service.py): `backend/app/services/route_optimizer_service.py`
- [Fishing productivity](https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/fish_productivity_service.py): `backend/app/services/fish_productivity_service.py`
- [PFZ advisory](https://github.com/vivanparwani5526/orca---sih26176/blob/main/backend/app/services/pfz_service.py): `backend/app/services/pfz_service.py`

### Models and data

- [PFZ marine engine](https://github.com/vivanparwani5526/orca---sih26176/blob/main/models/marine/FINAL_PFZ_MARINE_ENGINE/pfz_marine_engine.py): `models/marine/FINAL_PFZ_MARINE_ENGINE/pfz_marine_engine.py`
- [Weather predictor](https://github.com/vivanparwani5526/orca---sih26176/blob/main/models/weather/FINAL_WEATHER_ML/weather_predictor.py): `models/weather/FINAL_WEATHER_ML/weather_predictor.py`
- [Intent router](https://github.com/vivanparwani5526/orca---sih26176/blob/main/models/multi_agent/FINAL_MULTI_AGENT_SYSTEM/router.py): `models/multi_agent/FINAL_MULTI_AGENT_SYSTEM/router.py`

### Other components

- **Fisher**
- **Marine and weather data**

## Connections

- Fisher → Application shell: uses
- Application shell → Dashboard: opens
- Application shell → Advanced dashboard: switches mode
- Dashboard → Query input: offers query
- Query input → Dashboard: submits query
- Dashboard → API client: requests data
- Advanced dashboard → API client: requests data
- API client → Query endpoint: sends query
- FastAPI application → Query endpoint: mounts route
- Query endpoint → Session context: loads context
- Query endpoint → Agent orchestration: invokes agents
- Query endpoint → Weather and waves: gets weather
- Query endpoint → Fishing productivity: gets productivity
- Query endpoint → Geofence assessment: assesses boundary
- Query endpoint → Language handling: translates text
- Query endpoint → Explanation generation: builds explanation
- Fishing productivity → PFZ advisory: gets nearest PFZ
- Fishing productivity → PFZ marine engine: gets marine intelligence
- Agent orchestration → Intent router: routes intent
- Weather and waves → Weather predictor: predicts weather
- Marine and weather data → Weather and waves: supplies observations
- Marine and weather data → Tide and marine data: supplies marine data
- Query endpoint → Tide and marine data: gets tide data
- Query endpoint → Marine hazards: gets hazard data
- Query endpoint → Route optimization: gets route advice
- PFZ advisory → PFZ marine engine: loads PFZ intelligence
- Query endpoint → Map data endpoint: separate endpoint
- Query endpoint → Community catches endpoint: separate endpoint
- API client → Result panels: returns response
- Result panels → Fisher: shows assessment
