# kitaowens/ships architecture

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

- Interactive diagram: https://gitdiagram.com/kitaowens/ships
- Repository: https://github.com/kitaowens/ships

## Overview

This is a small, incomplete browser-side maritime app: `main.js` appears intended to render an application view, while the data layer holds ships, haulers, and docks. The sampled entity modules import database getters but do not call them, and `main.js` references an undefined `applicationHTML`; the actual user-to-result workflow therefore cannot be established. The edges below show only evidenced imports, not runtime data flow.

Main entry points: [`scripts/main.js`](https://github.com/kitaowens/ships/blob/main/scripts/main.js) (App entry), [`scripts/database.js`](https://github.com/kitaowens/ships/blob/main/scripts/database.js) (In-memory data), [`scripts/ships.js`](https://github.com/kitaowens/ships/blob/main/scripts/ships.js) (Ships module), [`scripts/haulers.js`](https://github.com/kitaowens/ships/blob/main/scripts/haulers.js) (Haulers module)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_browser(("Browser"))
node_main["App entry<br/>[main.js]"]
node_ships["Ships module<br/>[ships.js]"]
node_haulers["Haulers module<br/>[haulers.js]"]
node_docks["Docks module<br/>[docks.js]"]
node_database[("In-memory data<br/>[database.js]")]

node_main -->|"renders into"| node_browser
node_main -->|"imports"| node_ships
node_main -->|"imports"| node_haulers
node_main -->|"imports"| node_docks
node_ships -->|"imports getter"| node_database
node_haulers -->|"imports getter"| node_database
node_docks -->|"imports getter"| node_database

click node_main "https://github.com/kitaowens/ships/blob/main/scripts/main.js"
click node_ships "https://github.com/kitaowens/ships/blob/main/scripts/ships.js"
click node_haulers "https://github.com/kitaowens/ships/blob/main/scripts/haulers.js"
click node_docks "https://github.com/kitaowens/ships/blob/main/scripts/docks.js"
click node_database "https://github.com/kitaowens/ships/blob/main/scripts/database.js"

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_browser toneBlue
class node_main,node_ships,node_haulers,node_docks toneTeal
class node_database toneAmber
```

## Components

### Other components

- **Browser**
- [App entry](https://github.com/kitaowens/ships/blob/main/scripts/main.js): `scripts/main.js`
- [Ships module](https://github.com/kitaowens/ships/blob/main/scripts/ships.js): `scripts/ships.js`
- [Haulers module](https://github.com/kitaowens/ships/blob/main/scripts/haulers.js): `scripts/haulers.js`
- [Docks module](https://github.com/kitaowens/ships/blob/main/scripts/docks.js): `scripts/docks.js`
- [In-memory data](https://github.com/kitaowens/ships/blob/main/scripts/database.js): `scripts/database.js`

## Connections

- App entry → Browser: renders into (evidence: `scripts/main.js`)
- App entry → Ships module: imports (evidence: `scripts/main.js`)
- App entry → Haulers module: imports (evidence: `scripts/main.js`)
- App entry → Docks module: imports (evidence: `scripts/main.js`)
- Ships module → In-memory data: imports getter (evidence: `scripts/ships.js`)
- Haulers module → In-memory data: imports getter (evidence: `scripts/haulers.js`)
- Docks module → In-memory data: imports getter (evidence: `scripts/docks.js`)
