# eithan1231/open-fastfile architecture

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

- Interactive diagram: https://gitdiagram.com/eithan1231/open-fastfile
- Repository: https://github.com/eithan1231/open-fastfile

## Overview

3D Designer turns text-authored or imported Call of Duty maps into walkable first-person worlds, then supports solo exploration and authoritative multiplayer. The player workflow runs from browser world selection and scene loading through input, rendering, and (for matches) API authentication and matchmaking to a game server that simulates the match and sends realtime updates. Supporting layers include shared world/game/network rules and the map importer. The README documents the product topology; edges grounded only in it are cited there, while source-level evidence is limited to the supplied excerpts and SOURCE INDEX.

Main entry points: [`packages/client/src/app/App.ts`](https://github.com/eithan1231/open-fastfile/blob/main/packages/client/src/app/App.ts) (App composition), [`packages/game-server/src/games.ts`](https://github.com/eithan1231/open-fastfile/blob/main/packages/game-server/src/games.ts) (Game hosting), [`packages/api/src/app.ts`](https://github.com/eithan1231/open-fastfile/blob/main/packages/api/src/app.ts) (HTTP routes), [`packages/game-server/src/server.ts`](https://github.com/eithan1231/open-fastfile/blob/main/packages/game-server/src/server.ts) (Server lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser client"]
  node_app["App composition<br/>[App.ts]"]
  node_worldclient["World loading<br/>[worldLoader.ts]"]
  node_input["Player input<br/>[InputManager.ts]"]
  node_render["Render pipeline<br/>[pipeline.ts]"]
  node_scripts["World scripts<br/>[scripts.ts]"]
  node_uibridge["UI bridge<br/>[uiBridge.ts]"]
  node_audio["Audio mixer<br/>[mixer.ts]"]
end

subgraph group_api["Central API"]
  node_apiapp["HTTP routes<br/>[app.ts]"]
  node_auth["Accounts and sessions<br/>[sessions.ts]"]
  node_users["User records<br/>[users.ts]"]
  node_database[("SQLite database<br/>[database.ts]")]
  node_matchmaker["Matchmaking<br/>[matchmaker.ts]"]
  node_apiconfig["API configuration<br/>[config.ts]"]
end

subgraph group_game["Match servers"]
  node_games["Game hosting<br/>[games.ts]"]
  node_transport["Realtime transport<br/>[server.ts]"]
  node_gameprocess["Server lifecycle<br/>[server.ts]"]
  node_bodies["Bodies and physics<br/>[bodies.ts]"]
  node_weapons["Weapon catalogue<br/>[weapons.ts]"]
end

subgraph group_shared["Shared runtime"]
  node_dsl["World language<br/>[parser.ts]"]
  node_simulation["Game simulation<br/>[context.ts]"]
  node_protocol["Network protocol<br/>[packet.ts]"]
  node_physics["Deterministic physics<br/>[engine.ts]"]
end

subgraph group_worlds["World pipeline"]
  node_worldsource["World assets<br/>[source.ts]"]
  node_importer["Map importer<br/>[export.py]"]
end

node_player(("Player"))

node_player -->|"plays in"| node_app
node_app -->|"loads worlds"| node_worldclient
node_app -->|"sets up"| node_input
node_app -->|"composes"| node_scripts
node_scripts -->|"requests audio"| node_audio
node_app -->|"connects UI"| node_uibridge
node_app -.->|"renders through"| node_render
node_worldclient -->|"fetches worlds"| node_apiapp
node_app -->|"uses services"| node_apiapp
node_apiapp -->|"mounts auth"| node_auth
node_apiapp -->|"mounts matchmaking"| node_matchmaker
node_auth -->|"resolves users"| node_users
node_users -->|"queries"| node_database
node_auth -->|"reads and writes"| node_database
node_matchmaker -->|"queries"| node_database
node_apiconfig -->|"configures"| node_database
node_matchmaker -->|"assigns matches"| node_games
node_gameprocess -->|"manages"| node_games
node_gameprocess -->|"starts transport"| node_transport
node_transport -->|"dispatches packets"| node_games
node_games -->|"uses bodies"| node_bodies
node_games -->|"uses weapons"| node_weapons
node_gameprocess -->|"registers and receives orders"| node_apiapp
node_gameprocess -->|"fetches world data"| node_worldsource
node_worldclient -->|"parses world text"| node_dsl
node_games -->|"runs shared rules"| node_simulation
node_transport -->|"encodes packets"| node_protocol
node_bodies -.->|"uses physics"| node_physics
node_importer -->|"produces worlds"| node_worldsource

click node_app "https://github.com/eithan1231/open-fastfile/blob/main/packages/client/src/app/App.ts"
click node_worldclient "https://github.com/eithan1231/open-fastfile/blob/main/packages/client/src/app/worldLoader.ts"
click node_input "https://github.com/eithan1231/open-fastfile/blob/main/packages/client/src/input/InputManager.ts"
click node_render "https://github.com/eithan1231/open-fastfile/blob/main/packages/client/src/engine/render/pipeline.ts"
click node_scripts "https://github.com/eithan1231/open-fastfile/blob/main/packages/client/src/app/scripts.ts"
click node_uibridge "https://github.com/eithan1231/open-fastfile/blob/main/packages/client/src/app/uiBridge.ts"
click node_audio "https://github.com/eithan1231/open-fastfile/blob/main/packages/client/src/engine/audio/mixer.ts"
click node_apiapp "https://github.com/eithan1231/open-fastfile/blob/main/packages/api/src/app.ts"
click node_auth "https://github.com/eithan1231/open-fastfile/blob/main/packages/api/src/auth/sessions.ts"
click node_users "https://github.com/eithan1231/open-fastfile/blob/main/packages/api/src/auth/users.ts"
click node_database "https://github.com/eithan1231/open-fastfile/blob/main/packages/api/src/db/database.ts"
click node_matchmaker "https://github.com/eithan1231/open-fastfile/blob/main/packages/api/src/matchmaking/matchmaker.ts"
click node_apiconfig "https://github.com/eithan1231/open-fastfile/blob/main/packages/api/src/config.ts"
click node_games "https://github.com/eithan1231/open-fastfile/blob/main/packages/game-server/src/games.ts"
click node_transport "https://github.com/eithan1231/open-fastfile/blob/main/packages/game-server/src/net/server.ts"
click node_gameprocess "https://github.com/eithan1231/open-fastfile/blob/main/packages/game-server/src/server.ts"
click node_bodies "https://github.com/eithan1231/open-fastfile/blob/main/packages/game-server/src/bodies.ts"
click node_weapons "https://github.com/eithan1231/open-fastfile/blob/main/packages/game-server/src/weapons.ts"
click node_dsl "https://github.com/eithan1231/open-fastfile/blob/main/packages/shared/src/dsl/parser.ts"
click node_simulation "https://github.com/eithan1231/open-fastfile/blob/main/packages/shared/src/game/context.ts"
click node_protocol "https://github.com/eithan1231/open-fastfile/blob/main/packages/shared/src/net/packet.ts"
click node_physics "https://github.com/eithan1231/open-fastfile/blob/main/packages/shared/src/physics/engine.ts"
click node_worldsource "https://github.com/eithan1231/open-fastfile/blob/main/packages/api/src/worlds/source.ts"
click node_importer "https://github.com/eithan1231/open-fastfile/blob/main/scripts/cod/export.py"

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_worldclient,node_input,node_render,node_scripts,node_uibridge,node_audio toneBlue
class node_apiapp,node_auth,node_users,node_database,node_matchmaker,node_apiconfig toneAmber
class node_games,node_transport,node_gameprocess,node_bodies,node_weapons toneMint
class node_dsl,node_simulation,node_protocol,node_physics toneRose
class node_worldsource,node_importer,node_player toneIndigo
```

## Components

### Browser client

- [App composition](https://github.com/eithan1231/open-fastfile/blob/main/packages/client/src/app/App.ts): `packages/client/src/app/App.ts`
- [World loading](https://github.com/eithan1231/open-fastfile/blob/main/packages/client/src/app/worldLoader.ts): `packages/client/src/app/worldLoader.ts`
- [Player input](https://github.com/eithan1231/open-fastfile/blob/main/packages/client/src/input/InputManager.ts): `packages/client/src/input/InputManager.ts`
- [Render pipeline](https://github.com/eithan1231/open-fastfile/blob/main/packages/client/src/engine/render/pipeline.ts): `packages/client/src/engine/render/pipeline.ts`
- [World scripts](https://github.com/eithan1231/open-fastfile/blob/main/packages/client/src/app/scripts.ts): `packages/client/src/app/scripts.ts`
- [UI bridge](https://github.com/eithan1231/open-fastfile/blob/main/packages/client/src/app/uiBridge.ts): `packages/client/src/app/uiBridge.ts`
- [Audio mixer](https://github.com/eithan1231/open-fastfile/blob/main/packages/client/src/engine/audio/mixer.ts): `packages/client/src/engine/audio/mixer.ts`

### Central API

- [HTTP routes](https://github.com/eithan1231/open-fastfile/blob/main/packages/api/src/app.ts): `packages/api/src/app.ts`
- [Accounts and sessions](https://github.com/eithan1231/open-fastfile/blob/main/packages/api/src/auth/sessions.ts): `packages/api/src/auth/sessions.ts`
- [User records](https://github.com/eithan1231/open-fastfile/blob/main/packages/api/src/auth/users.ts): `packages/api/src/auth/users.ts`
- [SQLite database](https://github.com/eithan1231/open-fastfile/blob/main/packages/api/src/db/database.ts): `packages/api/src/db/database.ts`
- [Matchmaking](https://github.com/eithan1231/open-fastfile/blob/main/packages/api/src/matchmaking/matchmaker.ts): `packages/api/src/matchmaking/matchmaker.ts`
- [API configuration](https://github.com/eithan1231/open-fastfile/blob/main/packages/api/src/config.ts): `packages/api/src/config.ts`

### Match servers

- [Game hosting](https://github.com/eithan1231/open-fastfile/blob/main/packages/game-server/src/games.ts): `packages/game-server/src/games.ts`
- [Realtime transport](https://github.com/eithan1231/open-fastfile/blob/main/packages/game-server/src/net/server.ts): `packages/game-server/src/net/server.ts`
- [Server lifecycle](https://github.com/eithan1231/open-fastfile/blob/main/packages/game-server/src/server.ts): `packages/game-server/src/server.ts`
- [Bodies and physics](https://github.com/eithan1231/open-fastfile/blob/main/packages/game-server/src/bodies.ts): `packages/game-server/src/bodies.ts`
- [Weapon catalogue](https://github.com/eithan1231/open-fastfile/blob/main/packages/game-server/src/weapons.ts): `packages/game-server/src/weapons.ts`

### Shared runtime

- [World language](https://github.com/eithan1231/open-fastfile/blob/main/packages/shared/src/dsl/parser.ts): `packages/shared/src/dsl/parser.ts`
- [Game simulation](https://github.com/eithan1231/open-fastfile/blob/main/packages/shared/src/game/context.ts): `packages/shared/src/game/context.ts`
- [Network protocol](https://github.com/eithan1231/open-fastfile/blob/main/packages/shared/src/net/packet.ts): `packages/shared/src/net/packet.ts`
- [Deterministic physics](https://github.com/eithan1231/open-fastfile/blob/main/packages/shared/src/physics/engine.ts): `packages/shared/src/physics/engine.ts`

### World pipeline

- [World assets](https://github.com/eithan1231/open-fastfile/blob/main/packages/api/src/worlds/source.ts): `packages/api/src/worlds/source.ts`
- [Map importer](https://github.com/eithan1231/open-fastfile/blob/main/scripts/cod/export.py): `scripts/cod/export.py`

### Other components

- **Player**

## Connections

- Player → App composition: plays in
- App composition → World loading: loads worlds (evidence: `packages/client/src/app/App.ts`)
- App composition → Player input: sets up (evidence: `packages/client/src/app/App.ts`)
- App composition → World scripts: composes (evidence: `packages/client/src/app/App.ts`)
- World scripts → Audio mixer: requests audio (evidence: `packages/client/src/app/scripts.ts`)
- App composition → UI bridge: connects UI (evidence: `packages/client/src/app/App.ts`)
- App composition → Render pipeline: renders through
- World loading → HTTP routes: fetches worlds
- App composition → HTTP routes: uses services
- HTTP routes → Accounts and sessions: mounts auth (evidence: `packages/api/src/app.ts`)
- HTTP routes → Matchmaking: mounts matchmaking (evidence: `packages/api/src/app.ts`)
- Accounts and sessions → User records: resolves users (evidence: `packages/api/src/auth/sessions.ts`)
- User records → SQLite database: queries (evidence: `packages/api/src/auth/users.ts`)
- Accounts and sessions → SQLite database: reads and writes (evidence: `packages/api/src/auth/sessions.ts`)
- Matchmaking → SQLite database: queries (evidence: `packages/api/src/matchmaking/matchmaker.ts`)
- API configuration → SQLite database: configures (evidence: `packages/api/src/db/database.ts`)
- Matchmaking → Game hosting: assigns matches
- Server lifecycle → Game hosting: manages (evidence: `packages/game-server/src/server.ts`)
- Server lifecycle → Realtime transport: starts transport (evidence: `packages/game-server/src/server.ts`)
- Realtime transport → Game hosting: dispatches packets (evidence: `packages/game-server/src/net/server.ts`)
- Game hosting → Bodies and physics: uses bodies (evidence: `packages/game-server/src/games.ts`)
- Game hosting → Weapon catalogue: uses weapons (evidence: `packages/game-server/src/games.ts`)
- Server lifecycle → HTTP routes: registers and receives orders
- Server lifecycle → World assets: fetches world data
- World loading → World language: parses world text
- Game hosting → Game simulation: runs shared rules
- Realtime transport → Network protocol: encodes packets (evidence: `packages/game-server/src/net/server.ts`)
- Bodies and physics → Deterministic physics: uses physics
- Map importer → World assets: produces worlds
