# deekshiths06/agentic-ai-maritime-brokerage architecture

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

- Interactive diagram: https://gitdiagram.com/deekshiths06/agentic-ai-maritime-brokerage
- Repository: https://github.com/deekshiths06/agentic-ai-maritime-brokerage

## Overview

This is a maritime freight quotation platform: users analyze a shipment lane, compare routes and pricing, and receive weather and customs assessments. The React application also provides an operations map, an assistant, and administration features; the backend exposes the API and coordinates domain services. The graph preserves these documented capabilities, but the excerpts show only selected route and weather request handling. Some subsystem links therefore rely on SOURCE INDEX references rather than inspected call sites; uncertain relationships are omitted.

Main entry points: [`backend/main.py`](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/main.py) (Maritime API), [`frontend/src/App.jsx`](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/frontend/src/App.jsx) (Maritime platform UI), [`backend/app/agents/quotation_service.py`](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/quotation_service.py) (Quotation orchestration), [`backend/app/agents/assistant_agent.py`](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/assistant_agent.py) (Maritime assistant)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_app["Maritime platform UI<br/>[App.jsx]"]
  node_route_map["Route map"]
  node_geometry["Route geometry"]
  node_ocean_routes["Ocean routing<br/>[oceanRoutes.js]"]
  node_coast_data["Coastline data<br/>[coastData.js]"]
  node_assistant_widget["Assistant widget"]
  node_customs_card["Customs compliance card"]
end

subgraph group_api["API and operations"]
  node_api_service["Maritime API<br/>[main.py]"]
  node_mongodb[("MongoDB")]
  node_ais["AIS vessel service<br/>[ais_service.py]"]
end

subgraph group_intelligence["Shipment intelligence"]
  node_quotation["Quotation orchestration"]
  node_route_analysis["Route analysis<br/>[route_agent.py]"]
  node_pricing["Freight pricing<br/>[pricing_agent.py]"]
  node_margin["Margin optimization<br/>[margin_agent.py]"]
  node_weather["Weather risk<br/>[weather_agent.py]"]
  node_customs["Customs compliance<br/>[customs_agent.py]"]
end

subgraph group_assistant["Assistant knowledge"]
  node_assistant_agent["Maritime assistant<br/>[assistant_agent.py]"]
  node_assistant_scope["Assistant scope<br/>[assistant_scope.py]"]
  node_gemini["Gemini service<br/>[gemini_service.py]"]
  node_project_context["Business knowledge<br/>[project_context.py]"]
end

node_customer(("Customer"))
node_operations_user(("Operations user"))

node_customer -->|"uses"| node_app
node_operations_user -->|"uses"| node_app
node_app -->|"requests weather"| node_api_service
node_app -->|"renders"| node_route_map
node_app -->|"renders"| node_assistant_widget
node_app -->|"renders"| node_customs_card
node_app -->|"uses"| node_geometry
node_route_map -->|"uses"| node_geometry
node_geometry -->|"uses"| node_ocean_routes
node_ocean_routes -->|"uses"| node_coast_data
node_api_service -->|"dispatches"| node_route_analysis
node_api_service -->|"dispatches"| node_quotation
node_api_service -->|"dispatches"| node_weather
node_api_service -->|"dispatches"| node_customs
node_api_service -->|"dispatches"| node_assistant_agent
node_api_service -->|"uses"| node_gemini
node_api_service -->|"uses"| node_project_context
node_api_service -->|"dispatches"| node_ais
node_quotation -->|"analyzes route"| node_route_analysis
node_quotation -->|"gets freight"| node_pricing
node_quotation -->|"calculates margin"| node_margin
node_customs -->|"matches route"| node_route_analysis
node_assistant_agent -->|"uses scope"| node_assistant_scope
node_assistant_agent -->|"requests response"| node_gemini
node_assistant_agent -->|"retrieves knowledge"| node_project_context

click node_app "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/frontend/src/App.jsx"
click node_route_map "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/frontend/src/components/MaritimeRouteMap.jsx"
click node_geometry "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/frontend/src/utils/maritimeGeometry.js"
click node_ocean_routes "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/frontend/src/utils/oceanRoutes.js"
click node_coast_data "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/frontend/src/utils/coastData.js"
click node_assistant_widget "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/frontend/src/components/AssistantWidget.jsx"
click node_customs_card "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/frontend/src/components/CustomsComplianceCard.jsx"
click node_api_service "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/main.py"
click node_ais "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/services/ais_service.py"
click node_quotation "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/quotation_service.py"
click node_route_analysis "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/route_agent.py"
click node_pricing "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/pricing_agent.py"
click node_margin "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/margin_agent.py"
click node_weather "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/weather_agent.py"
click node_customs "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/customs_agent.py"
click node_assistant_agent "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/assistant_agent.py"
click node_assistant_scope "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/assistant_scope.py"
click node_gemini "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/services/gemini_service.py"
click node_project_context "https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/services/project_context.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_route_map,node_geometry,node_ocean_routes,node_coast_data,node_assistant_widget,node_customs_card,node_operations_user toneBlue
class node_api_service,node_mongodb,node_ais toneAmber
class node_quotation,node_route_analysis,node_pricing,node_margin,node_weather,node_customs toneMint
class node_assistant_agent,node_assistant_scope,node_gemini,node_project_context toneRose
class node_customer toneIndigo
```

## Components

### User experience

- [Maritime platform UI](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Route map](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/frontend/src/components/MaritimeRouteMap.jsx): `frontend/src/components/MaritimeRouteMap.jsx`
- [Route geometry](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/frontend/src/utils/maritimeGeometry.js): `frontend/src/utils/maritimeGeometry.js`
- [Ocean routing](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/frontend/src/utils/oceanRoutes.js): `frontend/src/utils/oceanRoutes.js`
- [Coastline data](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/frontend/src/utils/coastData.js): `frontend/src/utils/coastData.js`
- [Assistant widget](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/frontend/src/components/AssistantWidget.jsx): `frontend/src/components/AssistantWidget.jsx`
- [Customs compliance card](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/frontend/src/components/CustomsComplianceCard.jsx): `frontend/src/components/CustomsComplianceCard.jsx`

### API and operations

- [Maritime API](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/main.py): `backend/main.py`
- **MongoDB**
- [AIS vessel service](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/services/ais_service.py): `backend/app/services/ais_service.py`

### Shipment intelligence

- [Quotation orchestration](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/quotation_service.py): `backend/app/agents/quotation_service.py`
- [Route analysis](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/route_agent.py): `backend/app/agents/route_agent.py`
- [Freight pricing](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/pricing_agent.py): `backend/app/agents/pricing_agent.py`
- [Margin optimization](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/margin_agent.py): `backend/app/agents/margin_agent.py`
- [Weather risk](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/weather_agent.py): `backend/app/agents/weather_agent.py`
- [Customs compliance](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/customs_agent.py): `backend/app/agents/customs_agent.py`

### Assistant knowledge

- [Maritime assistant](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/assistant_agent.py): `backend/app/agents/assistant_agent.py`
- [Assistant scope](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/agents/assistant_scope.py): `backend/app/agents/assistant_scope.py`
- [Gemini service](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/services/gemini_service.py): `backend/app/services/gemini_service.py`
- [Business knowledge](https://github.com/deekshiths06/agentic-ai-maritime-brokerage/blob/main/backend/app/services/project_context.py): `backend/app/services/project_context.py`

### Other components

- **Customer**
- **Operations user**

## Connections

- Customer → Maritime platform UI: uses
- Operations user → Maritime platform UI: uses
- Maritime platform UI → Maritime API: requests weather (evidence: `frontend/src/App.jsx`)
- Maritime platform UI → Route map: renders (evidence: `frontend/src/App.jsx`)
- Maritime platform UI → Assistant widget: renders (evidence: `frontend/src/App.jsx`)
- Maritime platform UI → Customs compliance card: renders (evidence: `frontend/src/App.jsx`)
- Maritime platform UI → Route geometry: uses (evidence: `frontend/src/App.jsx`)
- Route map → Route geometry: uses (evidence: `frontend/src/components/MaritimeRouteMap.jsx`)
- Route geometry → Ocean routing: uses (evidence: `frontend/src/utils/maritimeGeometry.js`)
- Ocean routing → Coastline data: uses (evidence: `frontend/src/utils/oceanRoutes.js`)
- Maritime API → Route analysis: dispatches (evidence: `backend/main.py`)
- Maritime API → Quotation orchestration: dispatches (evidence: `backend/main.py`)
- Maritime API → Weather risk: dispatches (evidence: `backend/main.py`)
- Maritime API → Customs compliance: dispatches (evidence: `backend/main.py`)
- Maritime API → Maritime assistant: dispatches (evidence: `backend/main.py`)
- Maritime API → Gemini service: uses (evidence: `backend/main.py`)
- Maritime API → Business knowledge: uses (evidence: `backend/main.py`)
- Maritime API → AIS vessel service: dispatches (evidence: `backend/main.py`)
- Quotation orchestration → Route analysis: analyzes route (evidence: `backend/app/agents/quotation_service.py`)
- Quotation orchestration → Freight pricing: gets freight (evidence: `backend/app/agents/quotation_service.py`)
- Quotation orchestration → Margin optimization: calculates margin (evidence: `backend/app/agents/quotation_service.py`)
- Customs compliance → Route analysis: matches route (evidence: `backend/app/agents/customs_agent.py`)
- Maritime assistant → Assistant scope: uses scope (evidence: `backend/app/agents/assistant_agent.py`)
- Maritime assistant → Gemini service: requests response (evidence: `backend/app/services/gemini_service.py`)
- Maritime assistant → Business knowledge: retrieves knowledge (evidence: `backend/app/services/project_context.py`)
