# sarum4n3/ft_transcendence architecture

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

- Interactive diagram: https://gitdiagram.com/sarum4n3/ft_transcendence
- Repository: https://github.com/sarum4n3/ft_transcendence

## Overview

Transcendence is an early-stage multiplayer game project with a placeholder web deliverable. The current web workflow is a browser request routed through nginx to a Node.js static-file server, which serves files from `web/public`; the intended WebGL game is served as part of those assets. Separately, Unity source contains player movement, combat, stats, and procedural terrain; networking and the advertised game modes are not yet wired in. The graph reflects README documentation and sampled server code; unsampled Unity behavior and deployment configuration are not inferred.

Main entry points: [`UnityProject`](https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject) (Unity source), [`web/nginx`](https://github.com/sarum4n3/ft_transcendence/tree/main/web/nginx) (HTTPS proxy), [`web/server.js`](https://github.com/sarum4n3/ft_transcendence/blob/main/web/server.js) (Static server), [`web/public`](https://github.com/sarum4n3/ft_transcendence/tree/main/web/public) (Static assets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web delivery"]
  node_browser["Web browser"]
  node_nginx["HTTPS proxy"]
  node_server["Static server<br/>[server.js]"]
  node_webfiles["Static assets"]
  node_webgl["WebGL game build"]
end

subgraph group_game["Unity game"]
  node_unity["Unity source"]
  node_playerplay["Player movement"]
  node_combat["Combat and stats"]
  node_terrain["Procedural terrain"]
  node_modes["Multiplayer modes"]
end

subgraph group_content["Game content"]
  node_kits["Class kits"]
  node_enemykit["Enemy kit"]
  node_animations["Character animations"]
  node_world["Terrain assets"]
end

node_player(("Player"))

node_player -->|"uses"| node_browser
node_browser -->|"requests app"| node_nginx
node_nginx -->|"proxies requests"| node_server
node_server -->|"serves files"| node_webfiles
node_webfiles -.->|"includes game"| node_webgl
node_unity -.->|"produces build"| node_webgl
node_unity -->|"implements"| node_playerplay
node_unity -->|"implements"| node_combat
node_unity -->|"generates"| node_terrain
node_unity -.->|"plans modes"| node_modes

click node_nginx "https://github.com/sarum4n3/ft_transcendence/tree/main/web/nginx"
click node_server "https://github.com/sarum4n3/ft_transcendence/blob/main/web/server.js"
click node_webfiles "https://github.com/sarum4n3/ft_transcendence/tree/main/web/public"
click node_webgl "https://github.com/sarum4n3/ft_transcendence/tree/main/web/public/game"
click node_unity "https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject"
click node_playerplay "https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject/Assets"
click node_combat "https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject/Assets"
click node_terrain "https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject/Assets/Prefabs/Terrain"
click node_modes "https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject"
click node_kits "https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject/Assets/Data/Player/ClassKits"
click node_enemykit "https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject/Assets/Data/EnemyKits"
click node_animations "https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject/Assets/Animations"
click node_world "https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject/Assets/Resources/Terrain"

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,node_nginx,node_server,node_webfiles,node_webgl toneBlue
class node_unity,node_playerplay,node_combat,node_terrain,node_modes toneAmber
class node_kits,node_enemykit,node_animations,node_world toneMint
class node_player toneIndigo
```

## Components

### Web delivery

- **Web browser**
- [HTTPS proxy](https://github.com/sarum4n3/ft_transcendence/tree/main/web/nginx): `web/nginx`
- [Static server](https://github.com/sarum4n3/ft_transcendence/blob/main/web/server.js): `web/server.js`
- [Static assets](https://github.com/sarum4n3/ft_transcendence/tree/main/web/public): `web/public`
- [WebGL game build](https://github.com/sarum4n3/ft_transcendence/tree/main/web/public/game): `web/public/game`

### Unity game

- [Unity source](https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject): `UnityProject`
- [Player movement](https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject/Assets): `UnityProject/Assets`
- [Combat and stats](https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject/Assets): `UnityProject/Assets`
- [Procedural terrain](https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject/Assets/Prefabs/Terrain): `UnityProject/Assets/Prefabs/Terrain`
- [Multiplayer modes](https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject): `UnityProject`

### Game content

- [Class kits](https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject/Assets/Data/Player/ClassKits): `UnityProject/Assets/Data/Player/ClassKits`
- [Enemy kit](https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject/Assets/Data/EnemyKits): `UnityProject/Assets/Data/EnemyKits`
- [Character animations](https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject/Assets/Animations): `UnityProject/Assets/Animations`
- [Terrain assets](https://github.com/sarum4n3/ft_transcendence/tree/main/UnityProject/Assets/Resources/Terrain): `UnityProject/Assets/Resources/Terrain`

### Other components

- **Player**

## Connections

- Player → Web browser: uses (evidence: `README.md`)
- Web browser → HTTPS proxy: requests app (evidence: `README.md`)
- HTTPS proxy → Static server: proxies requests (evidence: `README.md`)
- Static server → Static assets: serves files (evidence: `web/server.js`)
- Static assets → WebGL game build: includes game (evidence: `README.md`)
- Unity source → WebGL game build: produces build (evidence: `README.md`)
- Unity source → Player movement: implements (evidence: `README.md`)
- Unity source → Combat and stats: implements (evidence: `README.md`)
- Unity source → Procedural terrain: generates (evidence: `README.md`)
- Unity source → Multiplayer modes: plans modes (evidence: `README.md`)
