# smsmaydi/open-sea architecture

> Architecture diagram of the GitHub repository smsmaydi/open-sea, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/smsmaydi/open-sea
- Repository: https://github.com/smsmaydi/open-sea

## Overview

This is a browser-based, 3D interactive portfolio presented as a seafaring exploration game. The visitor starts the experience, sails through a rendered world, explores profile islands, and reads localized portfolio content in the HUD/logbook. App is the apparent entry point and coordinates the world, HUD, input, content, and audio. The excerpts establish some world construction and shared rendering utilities; several runtime links are indicated only by the source index, so those links are marked unverified rather than asserted as inspected calls.

Main entry points: [`src/world/SeaWorld.tsx`](https://github.com/smsmaydi/open-sea/blob/main/src/world/SeaWorld.tsx) (Sea world), [`src/App.tsx`](https://github.com/smsmaydi/open-sea/blob/main/src/App.tsx) (App coordinator), [`src/experience/Ship.ts`](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Ship.ts) (Player ship), [`src/experience/Atmosphere.ts`](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Atmosphere.ts) (Atmosphere)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and interface"]
  node_app["App coordinator<br/>[App.tsx]"]
  node_hud["HUD and logbook<br/>[Hud.tsx]"]
  node_input["Input controls<br/>[Input.ts]"]
end

subgraph group_world["World simulation"]
  node_world["Sea world<br/>[SeaWorld.tsx]"]
  node_ship["Player ship<br/>[Ship.ts]"]
  node_island["Portfolio islands<br/>[Island.ts]"]
  node_ocean["Ocean surface<br/>[Ocean.ts]"]
  node_dressing["World dressing<br/>[Dressing.ts]"]
  node_fauna["Sea life<br/>[Fauna.ts]"]
  node_rival["Rival ship<br/>[Rival.ts]"]
  node_kraken["Kraken encounter<br/>[Kraken.ts]"]
  node_debris["Debris effects<br/>[Debris.ts]"]
  node_wake["Ship wake<br/>[Wake.ts]"]
end

subgraph group_render["Rendering utilities"]
  node_particles["Particle effects<br/>[Particles.ts]"]
  node_atmosphere["Atmosphere<br/>[Atmosphere.ts]"]
  node_weather["Weather<br/>[Weather.ts]"]
  node_clouds["Clouds<br/>[Clouds.ts]"]
  node_sky["Sky<br/>[Sky.ts]"]
  node_curve["World curvature<br/>[curve.ts]"]
  node_env["Shared shader environment<br/>[env.ts]"]
  node_kit["Model loader<br/>[kit.ts]"]
  node_waves["Wave functions<br/>[waves.ts]"]
  node_coast["Coast utilities<br/>[coast.ts]"]
  node_settings["Device and motion settings<br/>[settings.ts]"]
end

subgraph group_content["Portfolio and media"]
  node_content["Island content<br/>[content.ts]"]
  node_audio["Audio controls<br/>[sounds.ts]"]
  node_models["3D model assets"]
end

node_visitor(("Visitor"))

node_visitor -.->|"opens"| node_app
node_app -.->|"renders"| node_world
node_app -.->|"renders"| node_hud
node_app -->|"creates"| node_input
node_app -->|"starts and controls"| node_audio
node_app -->|"reads and stores"| node_content
node_hud -.->|"displays"| node_content
node_hud -.->|"uses"| node_input
node_world -->|"constructs"| node_ship
node_world -->|"constructs"| node_dressing
node_world -->|"constructs"| node_ocean
node_world -->|"constructs"| node_island
node_world -.->|"dispatches"| node_fauna
node_world -.->|"dispatches"| node_rival
node_world -.->|"dispatches"| node_kraken
node_world -.->|"dispatches"| node_debris
node_ship -->|"creates"| node_wake
node_ship -->|"samples"| node_waves
node_ship -->|"loads model"| node_kit
node_ship -->|"curves materials"| node_curve
node_fauna -->|"samples"| node_waves
node_fauna -.->|"uses"| node_particles
node_atmosphere -->|"coordinates"| node_clouds
node_atmosphere -->|"coordinates"| node_sky
node_atmosphere -->|"coordinates"| node_weather
node_atmosphere -.->|"updates"| node_env
node_curve -->|"uses uniforms"| node_env
node_waves -->|"reads swell"| node_env
node_waves -->|"reads motion setting"| node_settings
node_kit -->|"loads"| node_models
node_island -.->|"uses island data"| node_content
node_world -.->|"renders assets"| node_models

click node_app "https://github.com/smsmaydi/open-sea/blob/main/src/App.tsx"
click node_hud "https://github.com/smsmaydi/open-sea/blob/main/src/ui/Hud.tsx"
click node_input "https://github.com/smsmaydi/open-sea/blob/main/src/experience/Input.ts"
click node_world "https://github.com/smsmaydi/open-sea/blob/main/src/world/SeaWorld.tsx"
click node_ship "https://github.com/smsmaydi/open-sea/blob/main/src/experience/Ship.ts"
click node_island "https://github.com/smsmaydi/open-sea/blob/main/src/experience/Island.ts"
click node_ocean "https://github.com/smsmaydi/open-sea/blob/main/src/experience/Ocean.ts"
click node_dressing "https://github.com/smsmaydi/open-sea/blob/main/src/experience/Dressing.ts"
click node_fauna "https://github.com/smsmaydi/open-sea/blob/main/src/experience/Fauna.ts"
click node_rival "https://github.com/smsmaydi/open-sea/blob/main/src/experience/Rival.ts"
click node_kraken "https://github.com/smsmaydi/open-sea/blob/main/src/experience/Kraken.ts"
click node_debris "https://github.com/smsmaydi/open-sea/blob/main/src/experience/Debris.ts"
click node_wake "https://github.com/smsmaydi/open-sea/blob/main/src/experience/Wake.ts"
click node_particles "https://github.com/smsmaydi/open-sea/blob/main/src/experience/Particles.ts"
click node_atmosphere "https://github.com/smsmaydi/open-sea/blob/main/src/experience/Atmosphere.ts"
click node_weather "https://github.com/smsmaydi/open-sea/blob/main/src/experience/Weather.ts"
click node_clouds "https://github.com/smsmaydi/open-sea/blob/main/src/experience/Clouds.ts"
click node_sky "https://github.com/smsmaydi/open-sea/blob/main/src/experience/Sky.ts"
click node_curve "https://github.com/smsmaydi/open-sea/blob/main/src/experience/curve.ts"
click node_env "https://github.com/smsmaydi/open-sea/blob/main/src/experience/env.ts"
click node_kit "https://github.com/smsmaydi/open-sea/blob/main/src/experience/kit.ts"
click node_waves "https://github.com/smsmaydi/open-sea/blob/main/src/experience/waves.ts"
click node_coast "https://github.com/smsmaydi/open-sea/blob/main/src/experience/coast.ts"
click node_settings "https://github.com/smsmaydi/open-sea/blob/main/src/experience/settings.ts"
click node_content "https://github.com/smsmaydi/open-sea/blob/main/src/data/content.ts"
click node_audio "https://github.com/smsmaydi/open-sea/blob/main/src/audio/sounds.ts"
click node_models "https://github.com/smsmaydi/open-sea/tree/main/public/models"

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_hud,node_input toneBlue
class node_world,node_ship,node_island,node_ocean,node_dressing,node_fauna,node_rival,node_kraken,node_debris,node_wake toneAmber
class node_particles,node_atmosphere,node_weather,node_clouds,node_sky,node_curve,node_env,node_kit,node_waves,node_coast,node_settings toneMint
class node_content,node_audio,node_models toneRose
class node_visitor toneIndigo
```

## Components

### App and interface

- [App coordinator](https://github.com/smsmaydi/open-sea/blob/main/src/App.tsx): `src/App.tsx`
- [HUD and logbook](https://github.com/smsmaydi/open-sea/blob/main/src/ui/Hud.tsx): `src/ui/Hud.tsx`
- [Input controls](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Input.ts): `src/experience/Input.ts`

### World simulation

- [Sea world](https://github.com/smsmaydi/open-sea/blob/main/src/world/SeaWorld.tsx): `src/world/SeaWorld.tsx`
- [Player ship](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Ship.ts): `src/experience/Ship.ts`
- [Portfolio islands](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Island.ts): `src/experience/Island.ts`
- [Ocean surface](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Ocean.ts): `src/experience/Ocean.ts`
- [World dressing](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Dressing.ts): `src/experience/Dressing.ts`
- [Sea life](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Fauna.ts): `src/experience/Fauna.ts`
- [Rival ship](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Rival.ts): `src/experience/Rival.ts`
- [Kraken encounter](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Kraken.ts): `src/experience/Kraken.ts`
- [Debris effects](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Debris.ts): `src/experience/Debris.ts`
- [Ship wake](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Wake.ts): `src/experience/Wake.ts`

### Rendering utilities

- [Particle effects](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Particles.ts): `src/experience/Particles.ts`
- [Atmosphere](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Atmosphere.ts): `src/experience/Atmosphere.ts`
- [Weather](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Weather.ts): `src/experience/Weather.ts`
- [Clouds](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Clouds.ts): `src/experience/Clouds.ts`
- [Sky](https://github.com/smsmaydi/open-sea/blob/main/src/experience/Sky.ts): `src/experience/Sky.ts`
- [World curvature](https://github.com/smsmaydi/open-sea/blob/main/src/experience/curve.ts): `src/experience/curve.ts`
- [Shared shader environment](https://github.com/smsmaydi/open-sea/blob/main/src/experience/env.ts): `src/experience/env.ts`
- [Model loader](https://github.com/smsmaydi/open-sea/blob/main/src/experience/kit.ts): `src/experience/kit.ts`
- [Wave functions](https://github.com/smsmaydi/open-sea/blob/main/src/experience/waves.ts): `src/experience/waves.ts`
- [Coast utilities](https://github.com/smsmaydi/open-sea/blob/main/src/experience/coast.ts): `src/experience/coast.ts`
- [Device and motion settings](https://github.com/smsmaydi/open-sea/blob/main/src/experience/settings.ts): `src/experience/settings.ts`

### Portfolio and media

- [Island content](https://github.com/smsmaydi/open-sea/blob/main/src/data/content.ts): `src/data/content.ts`
- [Audio controls](https://github.com/smsmaydi/open-sea/blob/main/src/audio/sounds.ts): `src/audio/sounds.ts`
- [3D model assets](https://github.com/smsmaydi/open-sea/tree/main/public/models): `public/models`

### Other components

- **Visitor**

## Connections

- Visitor → App coordinator: opens
- App coordinator → Sea world: renders (evidence: `src/App.tsx`)
- App coordinator → HUD and logbook: renders (evidence: `src/App.tsx`)
- App coordinator → Input controls: creates (evidence: `src/App.tsx`)
- App coordinator → Audio controls: starts and controls (evidence: `src/App.tsx`)
- App coordinator → Island content: reads and stores (evidence: `src/App.tsx`)
- HUD and logbook → Island content: displays (evidence: `src/ui/Hud.tsx`)
- HUD and logbook → Input controls: uses (evidence: `src/ui/Hud.tsx`)
- Sea world → Player ship: constructs (evidence: `src/world/SeaWorld.tsx`)
- Sea world → World dressing: constructs (evidence: `src/world/SeaWorld.tsx`)
- Sea world → Ocean surface: constructs (evidence: `src/world/SeaWorld.tsx`)
- Sea world → Portfolio islands: constructs (evidence: `src/world/SeaWorld.tsx`)
- Sea world → Sea life: dispatches (evidence: `src/world/SeaWorld.tsx`)
- Sea world → Rival ship: dispatches (evidence: `src/world/SeaWorld.tsx`)
- Sea world → Kraken encounter: dispatches (evidence: `src/world/SeaWorld.tsx`)
- Sea world → Debris effects: dispatches (evidence: `src/world/SeaWorld.tsx`)
- Player ship → Ship wake: creates (evidence: `src/experience/Ship.ts`)
- Player ship → Wave functions: samples (evidence: `src/experience/Ship.ts`)
- Player ship → Model loader: loads model (evidence: `src/experience/Ship.ts`)
- Player ship → World curvature: curves materials (evidence: `src/experience/Ship.ts`)
- Sea life → Wave functions: samples (evidence: `src/experience/Fauna.ts`)
- Sea life → Particle effects: uses (evidence: `src/experience/Fauna.ts`)
- Atmosphere → Clouds: coordinates (evidence: `src/experience/Atmosphere.ts`)
- Atmosphere → Sky: coordinates (evidence: `src/experience/Atmosphere.ts`)
- Atmosphere → Weather: coordinates (evidence: `src/experience/Atmosphere.ts`)
- Atmosphere → Shared shader environment: updates (evidence: `src/experience/Atmosphere.ts`)
- World curvature → Shared shader environment: uses uniforms (evidence: `src/experience/curve.ts`)
- Wave functions → Shared shader environment: reads swell (evidence: `src/experience/waves.ts`)
- Wave functions → Device and motion settings: reads motion setting (evidence: `src/experience/waves.ts`)
- Model loader → 3D model assets: loads (evidence: `src/experience/kit.ts`)
- Portfolio islands → Island content: uses island data (evidence: `src/experience/Island.ts`)
- Sea world → 3D model assets: renders assets
