# nnxi/space-founder-client-unity architecture

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

- Interactive diagram: https://gitdiagram.com/nnxi/space-founder-client-unity
- Repository: https://github.com/nnxi/space-founder-client-unity

## Overview

Space Founder is a Unity WebGL space-exploration simulation. The user journey begins with account access, continues through creating a personal planet, and leads into shared-space exploration: the client generates deterministic celestial objects, tracks sectors around the player, and synchronizes multiplayer state. The README also describes floating-origin world shifts, planet management, and viewing other explorers’ information. The repository tree identifies likely Unity implementation areas, but the only sampled source is generated Burst code; implementation-level call relationships are therefore not verified.

Main entry points: [`SpaceFounder/Assets/Scripts/SpaceScene/Managers/WorldManager.cs`](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Managers/WorldManager.cs) (World Management), [`SpaceFounder/Assets/Scripts/SpaceScene/Managers/NetworkManager.cs`](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Managers/NetworkManager.cs) (Network Manager), [`SpaceFounder/Assets/Scripts/PlanetCreationScene/Managers/PlanetCreationManager.cs`](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/PlanetCreationScene/Managers/PlanetCreationManager.cs) (Planet Creation), [`SpaceFounder/Assets/Scripts/LoginScene/Managers/LoginManager.cs`](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/LoginScene/Managers/LoginManager.cs) (Login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and Setup"]
  node_login["Login<br/>[LoginManager.cs]"]
  node_signup["Sign Up<br/>[SignUpManager.cs]"]
  node_user["User Management<br/>[UserManager.cs]"]
end

subgraph group_planet["Planet Creation"]
  node_creation["Planet Creation"]
  node_planetgen["Planet Generation"]
end

subgraph group_world["World Exploration"]
  node_world["World Management<br/>[WorldManager.cs]"]
  node_procgen["Procedural Universe"]
  node_chunktracker["Chunk Tracking"]
  node_worldshift["World Shift<br/>[WorldManager.cs]"]
  node_planetview["Planet Interaction"]
  node_planetinfo["Planet Information"]
end

subgraph group_sync["Networking and Services"]
  node_supabase[("Supabase Auth")]
  node_planetstore[("Planet Records<br/>[NetworkManager.cs]")]
  node_network["Network Manager<br/>[NetworkManager.cs]"]
  node_adapter["WebGL Socket Bridge"]
  node_server["Socket.IO Server"]
  node_decoder["World Packet Decoder"]
  node_dispatcher["Main Thread Dispatcher"]
end

node_explorer(("Explorer"))

node_explorer -->|"signs in"| node_login
node_explorer -->|"registers"| node_signup
node_login -.->|"authenticates"| node_supabase
node_signup -.->|"creates account"| node_supabase
node_explorer -->|"creates planet"| node_creation
node_creation -.->|"generates planet"| node_planetgen
node_creation -.->|"records planet"| node_planetstore
node_explorer -->|"explores space"| node_world
node_world -->|"generates objects"| node_procgen
node_world -->|"tracks sectors"| node_chunktracker
node_world -->|"shifts origin"| node_worldshift
node_explorer -->|"visits planets"| node_planetview
node_planetview -.->|"views information"| node_planetinfo
node_world -.->|"syncs world"| node_network
node_network -->|"bridges sockets"| node_adapter
node_adapter -->|"exchanges data"| node_server
node_network -.->|"decodes packets"| node_decoder
node_network -.->|"dispatches updates"| node_dispatcher
node_explorer -->|"meets explorers"| node_network

click node_login "https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/LoginScene/Managers/LoginManager.cs"
click node_signup "https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/LoginScene/Managers/SignUpManager.cs"
click node_user "https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/LoginScene/Managers/UserManager.cs"
click node_creation "https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/PlanetCreationScene/Managers/PlanetCreationManager.cs"
click node_planetgen "https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Generators/RandomPlanetGenerator.cs"
click node_planetstore "https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Managers/NetworkManager.cs"
click node_world "https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Managers/WorldManager.cs"
click node_procgen "https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Generators/RandomPlanetGenerator.cs"
click node_chunktracker "https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Tracker/CameraChunkTracker.cs"
click node_worldshift "https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Managers/WorldManager.cs"
click node_planetview "https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Controllers/PlanetController.cs"
click node_planetinfo "https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Managers/PlanetInfoUIManager.cs"
click node_network "https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Managers/NetworkManager.cs"
click node_adapter "https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Plugins/WebGL/SoketIOBridge.jslib"
click node_decoder "https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/protocols/WorldPacketDecoder.cs"
click node_dispatcher "https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Dispatcher/UnityMainThreadDispatcher.cs"

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_login,node_signup,node_user toneBlue
class node_creation,node_planetgen toneAmber
class node_world,node_procgen,node_chunktracker,node_worldshift,node_planetview,node_planetinfo toneMint
class node_supabase,node_planetstore,node_network,node_adapter,node_server,node_decoder,node_dispatcher toneRose
class node_explorer toneIndigo
```

## Components

### Identity and Setup

- [Login](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/LoginScene/Managers/LoginManager.cs): `SpaceFounder/Assets/Scripts/LoginScene/Managers/LoginManager.cs`
- [Sign Up](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/LoginScene/Managers/SignUpManager.cs): `SpaceFounder/Assets/Scripts/LoginScene/Managers/SignUpManager.cs`
- [User Management](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/LoginScene/Managers/UserManager.cs): `SpaceFounder/Assets/Scripts/LoginScene/Managers/UserManager.cs`

### Planet Creation

- [Planet Creation](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/PlanetCreationScene/Managers/PlanetCreationManager.cs): `SpaceFounder/Assets/Scripts/PlanetCreationScene/Managers/PlanetCreationManager.cs`
- [Planet Generation](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Generators/RandomPlanetGenerator.cs): `SpaceFounder/Assets/Generators/RandomPlanetGenerator.cs`

### World Exploration

- [World Management](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Managers/WorldManager.cs): `SpaceFounder/Assets/Scripts/SpaceScene/Managers/WorldManager.cs`
- [Procedural Universe](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Generators/RandomPlanetGenerator.cs): `SpaceFounder/Assets/Generators/RandomPlanetGenerator.cs`
- [Chunk Tracking](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Tracker/CameraChunkTracker.cs): `SpaceFounder/Assets/Scripts/SpaceScene/Tracker/CameraChunkTracker.cs`
- [World Shift](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Managers/WorldManager.cs): `SpaceFounder/Assets/Scripts/SpaceScene/Managers/WorldManager.cs`
- [Planet Interaction](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Controllers/PlanetController.cs): `SpaceFounder/Assets/Scripts/SpaceScene/Controllers/PlanetController.cs`
- [Planet Information](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Managers/PlanetInfoUIManager.cs): `SpaceFounder/Assets/Scripts/SpaceScene/Managers/PlanetInfoUIManager.cs`

### Networking and Services

- **Supabase Auth**
- [Planet Records](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Managers/NetworkManager.cs): `SpaceFounder/Assets/Scripts/SpaceScene/Managers/NetworkManager.cs`
- [Network Manager](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Managers/NetworkManager.cs): `SpaceFounder/Assets/Scripts/SpaceScene/Managers/NetworkManager.cs`
- [WebGL Socket Bridge](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Plugins/WebGL/SoketIOBridge.jslib): `SpaceFounder/Assets/Plugins/WebGL/SoketIOBridge.jslib`
- **Socket.IO Server**
- [World Packet Decoder](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/protocols/WorldPacketDecoder.cs): `SpaceFounder/Assets/Scripts/SpaceScene/protocols/WorldPacketDecoder.cs`
- [Main Thread Dispatcher](https://github.com/nnxi/space-founder-client-unity/blob/main/SpaceFounder/Assets/Scripts/SpaceScene/Dispatcher/UnityMainThreadDispatcher.cs): `SpaceFounder/Assets/Scripts/SpaceScene/Dispatcher/UnityMainThreadDispatcher.cs`

### Other components

- **Explorer**

## Connections

- Explorer → Login: signs in (evidence: `README.md`)
- Explorer → Sign Up: registers (evidence: `README.md`)
- Login → Supabase Auth: authenticates
- Sign Up → Supabase Auth: creates account
- Explorer → Planet Creation: creates planet (evidence: `README.md`)
- Planet Creation → Planet Generation: generates planet
- Planet Creation → Planet Records: records planet
- Explorer → World Management: explores space (evidence: `README.md`)
- World Management → Procedural Universe: generates objects (evidence: `README.md`)
- World Management → Chunk Tracking: tracks sectors (evidence: `README.md`)
- World Management → World Shift: shifts origin (evidence: `README.md`)
- Explorer → Planet Interaction: visits planets (evidence: `README.md`)
- Planet Interaction → Planet Information: views information
- World Management → Network Manager: syncs world
- Network Manager → WebGL Socket Bridge: bridges sockets (evidence: `README.md`)
- WebGL Socket Bridge → Socket.IO Server: exchanges data (evidence: `README.md`)
- Network Manager → World Packet Decoder: decodes packets
- Network Manager → Main Thread Dispatcher: dispatches updates
- Explorer → Network Manager: meets explorers (evidence: `README.md`)
