# brahmipatil07/oceanshield-ai architecture

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

- Interactive diagram: https://gitdiagram.com/brahmipatil07/oceanshield-ai
- Repository: https://github.com/brahmipatil07/oceanshield-ai

## Overview

Ocean Shield is a browser-based marine investigation and decision-support prototype. A watchstander supplies satellite imagery and optionally AIS data; the application detects and localizes a candidate slick, forecasts drift and shoreline exposure, screens vessel tracks, and presents a map, telemetry, and an investigation dossier. The README documents CFAR/segmentation, CPA and speed-anomaly screening, and a five-stage audit trail; the sampled app.js shows map layers, uploaded-AIS interaction, dynamic detection/correlation, drift rendering, and report generation. Most runtime responsibilities reside in one script; unsampled capability links reflect README descriptions, not inspected implementation.

Main entry points: [`index.html`](https://github.com/brahmipatil07/oceanshield-ai/blob/main/index.html) (Command Dashboard), [`app.js`](https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js) (Incident Localization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Image Analysis"]
  node_sarfile["SAR Imagery<br/>[index.html]"]
  node_detection["Slick Detection<br/>[app.js]"]
  node_localization["Incident Localization<br/>[app.js]"]
  node_sensor["Sensor Telemetry<br/>[app.js]"]
end

subgraph group_incident["Incident Intelligence"]
  node_mapview["Incident Map<br/>[app.js]"]
  node_drift["Drift Forecast<br/>[app.js]"]
  node_shoreline["Shoreline Risk<br/>[app.js]"]
end

subgraph group_vessels["Vessel Screening"]
  node_aisfile["AIS CSV<br/>[index.html]"]
  node_aisdata["AIS Records<br/>[app.js]"]
  node_correlation["Vessel Correlation<br/>[app.js]"]
  node_shortlist["Candidate Shortlist<br/>[app.js]"]
  node_tracks["Historical Tracks<br/>[app.js]"]
end

subgraph group_presentation["Investigation Workspace"]
  node_workflow["Workflow Timeline<br/>[app.js]"]
  node_dossier["Investigation Dossier<br/>[app.js]"]
  node_dashboard["Command Dashboard<br/>[index.html]"]
end

node_watchstander(("Watchstander"))
node_tiles["CartoDB Tiles"]

node_watchstander -->|"provides imagery"| node_sarfile
node_sarfile -->|"analyzes"| node_detection
node_detection -->|"locates slick"| node_localization
node_localization -->|"derives metrics"| node_sensor
node_watchstander -->|"uploads CSV"| node_aisfile
node_aisfile -->|"loads records"| node_aisdata
node_localization -->|"forecasts movement"| node_drift
node_drift -->|"projects impact"| node_shoreline
node_localization -->|"supplies incident location"| node_correlation
node_aisdata -->|"supplies vessel records"| node_correlation
node_correlation -->|"ranks candidates"| node_shortlist
node_shortlist -->|"selects vessel tracks"| node_tracks
node_localization -->|"renders incident"| node_mapview
node_drift -->|"renders vectors"| node_mapview
node_tracks -->|"renders trajectories"| node_mapview
node_sensor -->|"displays telemetry"| node_dashboard
node_mapview -->|"displays map"| node_dashboard
node_shortlist -->|"displays candidates"| node_dashboard
node_shoreline -->|"displays risk"| node_dashboard
node_workflow -->|"shows stages"| node_dashboard
node_watchstander -->|"requests report"| node_dossier
node_dossier -->|"presents findings"| node_dashboard
node_watchstander -->|"operates"| node_dashboard
node_tiles -.->|"provides basemap"| node_mapview

click node_sarfile "https://github.com/brahmipatil07/oceanshield-ai/blob/main/index.html"
click node_detection "https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js"
click node_localization "https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js"
click node_sensor "https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js"
click node_mapview "https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js"
click node_drift "https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js"
click node_shoreline "https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js"
click node_aisfile "https://github.com/brahmipatil07/oceanshield-ai/blob/main/index.html"
click node_aisdata "https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js"
click node_correlation "https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js"
click node_shortlist "https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js"
click node_tracks "https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js"
click node_workflow "https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js"
click node_dossier "https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js"
click node_dashboard "https://github.com/brahmipatil07/oceanshield-ai/blob/main/index.html"

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_sarfile,node_detection,node_localization,node_sensor toneBlue
class node_mapview,node_drift,node_shoreline toneAmber
class node_aisfile,node_aisdata,node_correlation,node_shortlist,node_tracks toneMint
class node_workflow,node_dossier,node_dashboard toneRose
class node_watchstander,node_tiles toneIndigo
```

## Components

### Image Analysis

- [SAR Imagery](https://github.com/brahmipatil07/oceanshield-ai/blob/main/index.html): `index.html`
- [Slick Detection](https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js): `app.js`
- [Incident Localization](https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js): `app.js`
- [Sensor Telemetry](https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js): `app.js`

### Incident Intelligence

- [Incident Map](https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js): `app.js`
- [Drift Forecast](https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js): `app.js`
- [Shoreline Risk](https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js): `app.js`

### Vessel Screening

- [AIS CSV](https://github.com/brahmipatil07/oceanshield-ai/blob/main/index.html): `index.html`
- [AIS Records](https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js): `app.js`
- [Vessel Correlation](https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js): `app.js`
- [Candidate Shortlist](https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js): `app.js`
- [Historical Tracks](https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js): `app.js`

### Investigation Workspace

- [Workflow Timeline](https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js): `app.js`
- [Investigation Dossier](https://github.com/brahmipatil07/oceanshield-ai/blob/main/app.js): `app.js`
- [Command Dashboard](https://github.com/brahmipatil07/oceanshield-ai/blob/main/index.html): `index.html`

### Other components

- **Watchstander**
- **CartoDB Tiles**

## Connections

- Watchstander → SAR Imagery: provides imagery
- SAR Imagery → Slick Detection: analyzes
- Slick Detection → Incident Localization: locates slick
- Incident Localization → Sensor Telemetry: derives metrics
- Watchstander → AIS CSV: uploads CSV
- AIS CSV → AIS Records: loads records
- Incident Localization → Drift Forecast: forecasts movement
- Drift Forecast → Shoreline Risk: projects impact
- Incident Localization → Vessel Correlation: supplies incident location
- AIS Records → Vessel Correlation: supplies vessel records
- Vessel Correlation → Candidate Shortlist: ranks candidates
- Candidate Shortlist → Historical Tracks: selects vessel tracks
- Incident Localization → Incident Map: renders incident
- Drift Forecast → Incident Map: renders vectors
- Historical Tracks → Incident Map: renders trajectories
- Sensor Telemetry → Command Dashboard: displays telemetry
- Incident Map → Command Dashboard: displays map
- Candidate Shortlist → Command Dashboard: displays candidates
- Shoreline Risk → Command Dashboard: displays risk
- Workflow Timeline → Command Dashboard: shows stages
- Watchstander → Investigation Dossier: requests report
- Investigation Dossier → Command Dashboard: presents findings
- Watchstander → Command Dashboard: operates
- CartoDB Tiles → Incident Map: provides basemap
