# mdc15/s-olo-gameengine architecture

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

- Interactive diagram: https://gitdiagram.com/mdc15/s-olo-gameengine
- Repository: https://github.com/mdc15/s-olo-gameengine

## Overview

S:OLO is a browser-based 2D game engine with a React/WebGPU editor and a Rust simulation host. The principal workflow is editing a project and its entities, then running or building the game: the host simulates ECS state, sends updates over WebSockets, and the client interpolates and renders them. The graph also preserves documented physics, animation, scripting, asset, and IDE capabilities. Some subsystem wiring is based on README statements; unsampled implementation details are not assumed.

Main entry points: [`solo-host/src/main.rs`](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/main.rs) (Rust host), [`solo-client/src/App.tsx`](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/App.tsx) (Editor shell), [`solo-host/src/server/ws_handler.rs`](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/server/ws_handler.rs) (WebSocket handler), [`solo-client/src/network/ws-client.ts`](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/network/ws-client.ts) (WebSocket client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_editor["Editor and authoring"]
  node_app["Editor shell<br/>[App.tsx]"]
  node_project["Project launcher"]
  node_scene_edit["Scene authoring<br/>[HierarchyPanel.tsx]"]
  node_inspector["Entity inspector<br/>[InspectorPanel.tsx]"]
  node_animation["Animation editor"]
  node_assets["Asset browser<br/>[AssetBrowser.tsx]"]
  node_ide["Script IDE<br/>[CodePanel.tsx]"]
end

subgraph group_client["Client state and transport"]
  node_editor_store["Editor state<br/>[editor-store.ts]"]
  node_singleton["Client singletons<br/>[singletons.ts]"]
  node_ws_client["WebSocket client<br/>[ws-client.ts]"]
  node_parser["Frame parser<br/>[binary-parser.ts]"]
  node_client_world["Interpolated world<br/>[world.ts]"]
end

subgraph group_render["Rendering"]
  node_viewport["Game viewport<br/>[ViewportPanel.tsx]"]
  node_camera["2D camera<br/>[camera.ts]"]
  node_gpu["WebGPU context<br/>[gpu.ts]"]
  node_pipeline["Sprite pipeline<br/>[sprite-pipeline.ts]"]
end

subgraph group_host["Host simulation"]
  node_host_world["ECS world<br/>[world.rs]"]
  node_physics["Physics system<br/>[physics.rs]"]
  node_animation_sys["Animation system<br/>[animation.rs]"]
  node_script_sys["Script system<br/>[script.rs]"]
  node_sim_camera["Simulation camera"]
end

subgraph group_services["Host services"]
  node_host["Rust host<br/>[main.rs]"]
  node_ws_handler["WebSocket handler<br/>[ws_handler.rs]"]
  node_lsp["Language service<br/>[mod.rs]"]
  node_asset_import["Texture import<br/>[texture_import.rs]"]
  node_assets_store[("Project assets<br/>[app_state.rs]")]
end

node_developer(("Developer"))

node_developer -->|"uses"| node_app
node_app -->|"shows"| node_project
node_app -->|"updates"| node_editor_store
node_app -->|"handles messages"| node_singleton
node_app -->|"mounts editor"| node_viewport
node_developer -.->|"authors scene"| node_scene_edit
node_developer -.->|"edits entities"| node_inspector
node_developer -.->|"edits clips"| node_animation
node_developer -.->|"manages assets"| node_assets
node_developer -.->|"writes scripts"| node_ide
node_viewport -.->|"uses client state"| node_singleton
node_singleton -->|"connects"| node_ws_client
node_ws_client -->|"parses frames"| node_parser
node_ws_client -.->|"delivers frames"| node_client_world
node_client_world -->|"supplies render states"| node_pipeline
node_viewport -.->|"renders"| node_pipeline
node_pipeline -->|"uses device"| node_gpu
node_pipeline -->|"uses camera"| node_camera
node_host -->|"routes WebSocket"| node_ws_handler
node_ws_handler -->|"handles world commands"| node_host_world
node_ws_handler -.->|"exchanges updates"| node_ws_client
node_host -->|"initializes world"| node_host_world
node_host -->|"runs systems"| node_physics
node_host -->|"runs systems"| node_animation_sys
node_host -->|"runs systems"| node_script_sys
node_script_sys -->|"sets camera commands"| node_sim_camera
node_host -->|"resolves camera"| node_sim_camera
node_ide -.->|"requests language service"| node_lsp
node_host -->|"imports textures"| node_asset_import
node_ws_handler -.->|"serves project assets"| node_assets_store

click node_app "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/App.tsx"
click node_project "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/components/editor/ProjectLauncher.tsx"
click node_scene_edit "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/components/editor/HierarchyPanel.tsx"
click node_inspector "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/components/editor/InspectorPanel.tsx"
click node_animation "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/components/editor/AnimationEditorModal.tsx"
click node_assets "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/components/editor/AssetBrowser.tsx"
click node_ide "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/components/editor/CodePanel.tsx"
click node_editor_store "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/store/editor-store.ts"
click node_singleton "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/singletons.ts"
click node_ws_client "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/network/ws-client.ts"
click node_parser "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/network/binary-parser.ts"
click node_client_world "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/ecs/world.ts"
click node_viewport "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/components/editor/ViewportPanel.tsx"
click node_camera "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/renderer/camera.ts"
click node_gpu "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/renderer/gpu.ts"
click node_pipeline "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/renderer/sprite-pipeline.ts"
click node_host "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/main.rs"
click node_ws_handler "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/server/ws_handler.rs"
click node_lsp "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/lsp/mod.rs"
click node_host_world "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/ecs/world.rs"
click node_physics "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/systems/physics.rs"
click node_animation_sys "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/systems/animation.rs"
click node_script_sys "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/systems/script.rs"
click node_sim_camera "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/simulation_camera.rs"
click node_asset_import "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/texture_import.rs"
click node_assets_store "https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/server/app_state.rs"

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_project,node_scene_edit,node_inspector,node_animation,node_assets,node_ide toneBlue
class node_editor_store,node_singleton,node_ws_client,node_parser,node_client_world toneAmber
class node_viewport,node_camera,node_gpu,node_pipeline toneMint
class node_host_world,node_physics,node_animation_sys,node_script_sys,node_sim_camera toneRose
class node_host,node_ws_handler,node_lsp,node_asset_import,node_assets_store,node_developer toneIndigo
```

## Components

### Editor and authoring

- [Editor shell](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/App.tsx): `solo-client/src/App.tsx`
- [Project launcher](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/components/editor/ProjectLauncher.tsx): `solo-client/src/components/editor/ProjectLauncher.tsx`
- [Scene authoring](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/components/editor/HierarchyPanel.tsx): `solo-client/src/components/editor/HierarchyPanel.tsx`
- [Entity inspector](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/components/editor/InspectorPanel.tsx): `solo-client/src/components/editor/InspectorPanel.tsx`
- [Animation editor](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/components/editor/AnimationEditorModal.tsx): `solo-client/src/components/editor/AnimationEditorModal.tsx`
- [Asset browser](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/components/editor/AssetBrowser.tsx): `solo-client/src/components/editor/AssetBrowser.tsx`
- [Script IDE](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/components/editor/CodePanel.tsx): `solo-client/src/components/editor/CodePanel.tsx`

### Client state and transport

- [Editor state](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/store/editor-store.ts): `solo-client/src/store/editor-store.ts`
- [Client singletons](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/singletons.ts): `solo-client/src/singletons.ts`
- [WebSocket client](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/network/ws-client.ts): `solo-client/src/network/ws-client.ts`
- [Frame parser](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/network/binary-parser.ts): `solo-client/src/network/binary-parser.ts`
- [Interpolated world](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/ecs/world.ts): `solo-client/src/ecs/world.ts`

### Rendering

- [Game viewport](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/components/editor/ViewportPanel.tsx): `solo-client/src/components/editor/ViewportPanel.tsx`
- [2D camera](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/renderer/camera.ts): `solo-client/src/renderer/camera.ts`
- [WebGPU context](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/renderer/gpu.ts): `solo-client/src/renderer/gpu.ts`
- [Sprite pipeline](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-client/src/renderer/sprite-pipeline.ts): `solo-client/src/renderer/sprite-pipeline.ts`

### Host simulation

- [ECS world](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/ecs/world.rs): `solo-host/src/ecs/world.rs`
- [Physics system](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/systems/physics.rs): `solo-host/src/systems/physics.rs`
- [Animation system](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/systems/animation.rs): `solo-host/src/systems/animation.rs`
- [Script system](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/systems/script.rs): `solo-host/src/systems/script.rs`
- [Simulation camera](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/simulation_camera.rs): `solo-host/src/simulation_camera.rs`

### Host services

- [Rust host](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/main.rs): `solo-host/src/main.rs`
- [WebSocket handler](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/server/ws_handler.rs): `solo-host/src/server/ws_handler.rs`
- [Language service](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/lsp/mod.rs): `solo-host/src/lsp/mod.rs`
- [Texture import](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/texture_import.rs): `solo-host/src/texture_import.rs`
- [Project assets](https://github.com/mdc15/s-olo-gameengine/blob/dev/solo-host/src/server/app_state.rs): `solo-host/src/server/app_state.rs`

### Other components

- **Developer**

## Connections

- Developer → Editor shell: uses (evidence: `solo-client/src/App.tsx`)
- Editor shell → Project launcher: shows (evidence: `solo-client/src/App.tsx`)
- Editor shell → Editor state: updates (evidence: `solo-client/src/App.tsx`)
- Editor shell → Client singletons: handles messages (evidence: `solo-client/src/App.tsx`)
- Editor shell → Game viewport: mounts editor (evidence: `solo-client/src/App.tsx`)
- Developer → Scene authoring: authors scene (evidence: `README.md`)
- Developer → Entity inspector: edits entities (evidence: `README.md`)
- Developer → Animation editor: edits clips (evidence: `README.md`)
- Developer → Asset browser: manages assets (evidence: `README.md`)
- Developer → Script IDE: writes scripts (evidence: `README.md`)
- Game viewport → Client singletons: uses client state
- Client singletons → WebSocket client: connects (evidence: `solo-client/src/singletons.ts`)
- WebSocket client → Frame parser: parses frames (evidence: `solo-client/src/network/ws-client.ts`)
- WebSocket client → Interpolated world: delivers frames
- Interpolated world → Sprite pipeline: supplies render states (evidence: `solo-client/src/main.ts`)
- Game viewport → Sprite pipeline: renders (evidence: `README.md`)
- Sprite pipeline → WebGPU context: uses device (evidence: `solo-client/src/renderer/sprite-pipeline.ts`)
- Sprite pipeline → 2D camera: uses camera (evidence: `solo-client/src/renderer/sprite-pipeline.ts`)
- Rust host → WebSocket handler: routes WebSocket (evidence: `solo-host/src/main.rs`)
- WebSocket handler → ECS world: handles world commands (evidence: `solo-host/src/server/ws_handler.rs`)
- WebSocket handler → WebSocket client: exchanges updates (evidence: `README.md`)
- Rust host → ECS world: initializes world (evidence: `solo-host/src/main.rs`)
- Rust host → Physics system: runs systems (evidence: `solo-host/src/main.rs`)
- Rust host → Animation system: runs systems (evidence: `solo-host/src/main.rs`)
- Rust host → Script system: runs systems (evidence: `solo-host/src/main.rs`)
- Script system → Simulation camera: sets camera commands (evidence: `solo-host/src/simulation_camera.rs`)
- Rust host → Simulation camera: resolves camera (evidence: `solo-host/src/main.rs`)
- Script IDE → Language service: requests language service (evidence: `README.md`)
- Rust host → Texture import: imports textures (evidence: `solo-host/src/main.rs`)
- WebSocket handler → Project assets: serves project assets (evidence: `README.md`)
