How divya-a10/ocean-intelligence works
Ocean Intelligence is a marine-plastic research platform: users select a region and forecast day, retrieve a simulation, currents, and hotspots, inspect transport and risk in an interactive dashboard, and request scientific explanations or reports. The repository contains both a documented OceanState/CMEMS backend and a separate forecast/API implementation; sampled evidence does not establish how they are wired together. Dashed, uncited edges mark documented or likely integrations not shown in source excerpts.
Main entry points: App.tsx Dashboard · routes_simulation.py Simulation routes · ocean_engine.py Ocean engine · main.py FastAPI app
Components 28
Research workspace
- Dashboard
frontend/src/App.tsx - Ocean globe
frontend/src/components/GlobePreview.tsx - Plastic simulator
frontend/src/components/PlasticSimulator.tsx - Copilot workspace
frontend/src/components/AICopilotWorkspace.tsx - Report workspace
frontend/src/components/ReportsGenerator.tsx - Simulation state
frontend/src/hooks/useSimulation.ts - Simulation client
frontend/src/services/simulationService.ts - HTTP client
frontend/src/services/apiClient.ts
API and contracts
- API contract
shared/types/api.ts - FastAPI app
backend/app/main.py - Simulation routes
backend/api/routes_simulation.py - Response schemas
backend/models/schemas.py - Application settings
backend/app/config/settings.py - Structured logging
backend/app/utils/logger.py
Ocean data and simulation
- Ocean engine
backend/app/engine/ocean_engine.py - OceanState model
backend/app/schemas/ocean_state.py - CMEMS loader
backend/app/services/cmems/loader.py - CMEMS processor
backend/app/services/cmems/processor.py - Forecast engine
backend/simulation/forecast_engine.py - Particle simulation
backend/simulation/particle_simulation.py - Current loader
backend/simulation/current_loader.py - Hotspot analysis
backend/simulation/hotspot_analysis.py - Hotspot service
backend/app/services/hotspot_service.py
Scientific insight
- Scientific copilot
backend/app/services/gemini_service.py - Report service
backend/app/services/report_service.py - Report generator
backend/reports/report_generator.py
Other components
- Researcher
- Gemini API
Connections 25
- Researcher → Dashboard: explores
README.md - Dashboard → Simulation state: manages state
frontend/src/App.tsx - Dashboard → Ocean globe: renders
frontend/src/App.tsx - Dashboard → Plastic simulator: renders
frontend/src/App.tsx - Simulation state → Simulation client: requests data
frontend/src/hooks/useSimulation.ts - Simulation client → HTTP client: uses
frontend/src/services/simulationService.ts - Simulation client → API contract: uses types
frontend/src/services/simulationService.ts - Dashboard → Copilot workspace: offers
frontend/src/App.tsx - Dashboard → Report workspace: offers
frontend/src/App.tsx - HTTP client → FastAPI app: sends requests
- FastAPI app → Simulation routes: registers routes
- FastAPI app → Application settings: configures
backend/app/main.py - FastAPI app → Structured logging: logs
backend/app/main.py - Simulation routes → Forecast engine: generates forecast
backend/api/routes_simulation.py - Simulation routes → Current loader: loads vectors
backend/api/routes_simulation.py - Simulation routes → Hotspot analysis: calculates hotspots
backend/api/routes_simulation.py - Simulation routes → Response schemas: validates responses
backend/api/routes_simulation.py - Forecast engine → Particle simulation: initializes particles
backend/simulation/forecast_engine.py - Ocean engine → CMEMS loader: fetches data
backend/app/engine/ocean_engine.py - Ocean engine → CMEMS processor: processes data
backend/app/engine/ocean_engine.py - Ocean engine → OceanState model: builds state
backend/app/engine/ocean_engine.py - Hotspot service → Ocean engine: reads state
backend/app/services/hotspot_service.py - Scientific copilot → Ocean engine: reads state
backend/app/services/gemini_service.py - Scientific copilot → Gemini API: requests explanation
- Report service → Report generator: delegates generation