# ykkim97/3dv architecture

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

- Interactive diagram: https://gitdiagram.com/ykkim97/3dv
- Repository: https://github.com/ykkim97/3dv

## Overview

Lumatrix City Studio is a browser/desktop 3D city-planning editor. Users open a project, edit its city layout and environment, inspect infrastructure and operating status in the scene, then save or reuse the result. The graph includes the documented editing, simulation, navigation, persistence, and manual capabilities. Some subsystems are represented at their existing directory path because their implementation was not sampled; edges without direct evidence are omitted. The rendering-to-editor link is unverified and marked dashed.

Main entry points: [`src/features/city/editor/CityEditor.jsx`](https://github.com/ykkim97/3dv/blob/main/src/features/city/editor/CityEditor.jsx) (City editor), [`src/features/city/pages/ProjectEditor.jsx`](https://github.com/ykkim97/3dv/blob/main/src/features/city/pages/ProjectEditor.jsx) (Project editor), [`src/app/App.jsx`](https://github.com/ykkim97/3dv/blob/main/src/app/App.jsx) (App router), [`src/features/city/simulation/utilityService.js`](https://github.com/ykkim97/3dv/blob/main/src/features/city/simulation/utilityService.js) (Utility supply)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_app["App router<br/>[App.jsx]"]
end

subgraph group_editing["City editing"]
  node_city_editor["City editor<br/>[CityEditor.jsx]"]
  node_city_state["City state<br/>[cityState.js]"]
  node_city_validation["City validation<br/>[cityValidation.js]"]
  node_placement["Placement tools"]
end

subgraph group_scene["Scene and infrastructure"]
  node_connections["Connections<br/>[connectionModel.js]"]
  node_city_engine["3D scene engine<br/>[CityEngine.js]"]
  node_roads["Road network<br/>[roadModel.js]"]
  node_terrain["Terrain model<br/>[terrainModel.js]"]
  node_lighting["Lighting controls"]
end

subgraph group_operations["City operations"]
  node_utility_service["Utility supply<br/>[utilityService.js]"]
  node_fire_service["Fire service<br/>[fireService.js]"]
  node_diagnostics["City diagnostics<br/>[cityDiagnostics.js]"]
  node_management["Facility management"]
end

subgraph group_projects["Projects and guidance"]
  node_project_editor["Project editor<br/>[ProjectEditor.jsx]"]
  node_city_files["City file persistence<br/>[cityFiles.js]"]
  node_autosave["Autosave<br/>[useAutosave.js]"]
  node_manual["Korean manual<br/>[ManualPage.jsx]"]
  node_desktop_files["Desktop file bridge<br/>[desktopFiles.js]"]
end

node_user(("City planner"))

node_user -->|"opens app"| node_app
node_app -->|"routes to"| node_project_editor
node_app -->|"loads manual"| node_manual
node_project_editor -->|"renders editor"| node_city_editor
node_project_editor -->|"uses state"| node_city_state
node_project_editor -->|"validates city"| node_city_validation
node_city_editor -.->|"drives scene"| node_city_engine
node_city_state -->|"initializes terrain"| node_terrain
node_city_validation -->|"validates links"| node_connections
node_city_editor -->|"edits layout"| node_placement
node_city_editor -->|"edits roads"| node_roads
node_city_editor -->|"edits connections"| node_connections
node_city_editor -->|"adjusts lighting"| node_lighting
node_city_engine -->|"renders badges"| node_utility_service
node_utility_service -.->|"uses network model"| node_roads
node_fire_service -->|"routes via roads"| node_roads
node_city_editor -->|"shows supply"| node_utility_service
node_city_editor -->|"shows fire impact"| node_fire_service
node_city_editor -->|"explores status"| node_diagnostics
node_city_editor -->|"manages facilities"| node_management
node_project_editor -->|"saves and loads"| node_city_files
node_project_editor -->|"autosaves work"| node_autosave
node_city_files -.->|"uses desktop bridge"| node_desktop_files

click node_app "https://github.com/ykkim97/3dv/blob/main/src/app/App.jsx"
click node_project_editor "https://github.com/ykkim97/3dv/blob/main/src/features/city/pages/ProjectEditor.jsx"
click node_city_editor "https://github.com/ykkim97/3dv/blob/main/src/features/city/editor/CityEditor.jsx"
click node_city_state "https://github.com/ykkim97/3dv/blob/main/src/features/city/core/cityState.js"
click node_city_validation "https://github.com/ykkim97/3dv/blob/main/src/features/city/core/cityValidation.js"
click node_placement "https://github.com/ykkim97/3dv/tree/main/src/features/city/placement"
click node_connections "https://github.com/ykkim97/3dv/blob/main/src/features/city/connections/connectionModel.js"
click node_city_engine "https://github.com/ykkim97/3dv/blob/main/src/features/city/rendering/CityEngine.js"
click node_roads "https://github.com/ykkim97/3dv/blob/main/src/features/city/roads/roadModel.js"
click node_terrain "https://github.com/ykkim97/3dv/blob/main/src/features/city/terrain/terrainModel.js"
click node_lighting "https://github.com/ykkim97/3dv/tree/main/src/features/city/lighting"
click node_utility_service "https://github.com/ykkim97/3dv/blob/main/src/features/city/simulation/utilityService.js"
click node_fire_service "https://github.com/ykkim97/3dv/blob/main/src/features/city/simulation/fireService.js"
click node_diagnostics "https://github.com/ykkim97/3dv/blob/main/src/features/city/management/cityDiagnostics.js"
click node_management "https://github.com/ykkim97/3dv/tree/main/src/features/city/management"
click node_city_files "https://github.com/ykkim97/3dv/blob/main/src/features/city/persistence/cityFiles.js"
click node_autosave "https://github.com/ykkim97/3dv/blob/main/src/features/city/persistence/useAutosave.js"
click node_manual "https://github.com/ykkim97/3dv/blob/main/src/features/city/manual/ManualPage.jsx"
click node_desktop_files "https://github.com/ykkim97/3dv/blob/main/src/platform/desktopFiles.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_app toneBlue
class node_city_editor,node_city_state,node_city_validation,node_placement toneAmber
class node_connections,node_city_engine,node_roads,node_terrain,node_lighting toneMint
class node_utility_service,node_fire_service,node_diagnostics,node_management toneRose
class node_project_editor,node_city_files,node_autosave,node_manual,node_desktop_files,node_user toneIndigo
```

## Components

### App entry

- [App router](https://github.com/ykkim97/3dv/blob/main/src/app/App.jsx): `src/app/App.jsx`

### City editing

- [City editor](https://github.com/ykkim97/3dv/blob/main/src/features/city/editor/CityEditor.jsx): `src/features/city/editor/CityEditor.jsx`
- [City state](https://github.com/ykkim97/3dv/blob/main/src/features/city/core/cityState.js): `src/features/city/core/cityState.js`
- [City validation](https://github.com/ykkim97/3dv/blob/main/src/features/city/core/cityValidation.js): `src/features/city/core/cityValidation.js`
- [Placement tools](https://github.com/ykkim97/3dv/tree/main/src/features/city/placement): `src/features/city/placement`

### Scene and infrastructure

- [Connections](https://github.com/ykkim97/3dv/blob/main/src/features/city/connections/connectionModel.js): `src/features/city/connections/connectionModel.js`
- [3D scene engine](https://github.com/ykkim97/3dv/blob/main/src/features/city/rendering/CityEngine.js): `src/features/city/rendering/CityEngine.js`
- [Road network](https://github.com/ykkim97/3dv/blob/main/src/features/city/roads/roadModel.js): `src/features/city/roads/roadModel.js`
- [Terrain model](https://github.com/ykkim97/3dv/blob/main/src/features/city/terrain/terrainModel.js): `src/features/city/terrain/terrainModel.js`
- [Lighting controls](https://github.com/ykkim97/3dv/tree/main/src/features/city/lighting): `src/features/city/lighting`

### City operations

- [Utility supply](https://github.com/ykkim97/3dv/blob/main/src/features/city/simulation/utilityService.js): `src/features/city/simulation/utilityService.js`
- [Fire service](https://github.com/ykkim97/3dv/blob/main/src/features/city/simulation/fireService.js): `src/features/city/simulation/fireService.js`
- [City diagnostics](https://github.com/ykkim97/3dv/blob/main/src/features/city/management/cityDiagnostics.js): `src/features/city/management/cityDiagnostics.js`
- [Facility management](https://github.com/ykkim97/3dv/tree/main/src/features/city/management): `src/features/city/management`

### Projects and guidance

- [Project editor](https://github.com/ykkim97/3dv/blob/main/src/features/city/pages/ProjectEditor.jsx): `src/features/city/pages/ProjectEditor.jsx`
- [City file persistence](https://github.com/ykkim97/3dv/blob/main/src/features/city/persistence/cityFiles.js): `src/features/city/persistence/cityFiles.js`
- [Autosave](https://github.com/ykkim97/3dv/blob/main/src/features/city/persistence/useAutosave.js): `src/features/city/persistence/useAutosave.js`
- [Korean manual](https://github.com/ykkim97/3dv/blob/main/src/features/city/manual/ManualPage.jsx): `src/features/city/manual/ManualPage.jsx`
- [Desktop file bridge](https://github.com/ykkim97/3dv/blob/main/src/platform/desktopFiles.js): `src/platform/desktopFiles.js`

### Other components

- **City planner**

## Connections

- City planner → App router: opens app
- App router → Project editor: routes to (evidence: `src/app/App.jsx`)
- App router → Korean manual: loads manual (evidence: `src/app/App.jsx`)
- Project editor → City editor: renders editor (evidence: `src/features/city/pages/ProjectEditor.jsx`)
- Project editor → City state: uses state (evidence: `src/features/city/pages/ProjectEditor.jsx`)
- Project editor → City validation: validates city (evidence: `src/features/city/core/cityValidation.js`)
- City editor → 3D scene engine: drives scene (evidence: `src/features/city/editor/CityEditor.jsx`)
- City state → Terrain model: initializes terrain (evidence: `src/features/city/core/cityState.js`)
- City validation → Connections: validates links (evidence: `src/features/city/core/cityValidation.js`)
- City editor → Placement tools: edits layout (evidence: `src/features/city/editor/CityEditor.jsx`)
- City editor → Road network: edits roads (evidence: `src/features/city/editor/CityEditor.jsx`)
- City editor → Connections: edits connections
- City editor → Lighting controls: adjusts lighting
- 3D scene engine → Utility supply: renders badges
- Utility supply → Road network: uses network model
- Fire service → Road network: routes via roads (evidence: `src/features/city/simulation/fireService.js`)
- City editor → Utility supply: shows supply (evidence: `src/features/city/editor/CityEditor.jsx`)
- City editor → Fire service: shows fire impact (evidence: `src/features/city/editor/CityEditor.jsx`)
- City editor → City diagnostics: explores status (evidence: `src/features/city/editor/CityEditor.jsx`)
- City editor → Facility management: manages facilities (evidence: `src/features/city/editor/CityEditor.jsx`)
- Project editor → City file persistence: saves and loads
- Project editor → Autosave: autosaves work (evidence: `src/features/city/pages/ProjectEditor.jsx`)
- City file persistence → Desktop file bridge: uses desktop bridge
