# soggypoiuytr/tableverse architecture

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

- Interactive diagram: https://gitdiagram.com/soggypoiuytr/tableverse
- Repository: https://github.com/soggypoiuytr/tableverse

## Overview

Tableverse is a browser-based tabletop RPG platform for the Aurality setting. Players and the game master use its table interface for shared chat, dice, maps, tokens, inventory and combat; Firebase provides authentication and synchronization. A separate, optional private server handles first-time Discord sign-in and issues Firebase custom tokens. The README documents the product capabilities and hosting, while the only sampled implementation is the sign-in server; feature-level links within the web app are therefore limited to documented relationships.

Main entry points: [`docs/index.html`](https://github.com/soggypoiuytr/tableverse/blob/main/docs/index.html) (Table interface), [`server/server.mjs`](https://github.com/soggypoiuytr/tableverse/blob/main/server/server.mjs) (Discord sign-in server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_table["Table interface"]
  node_web["Table interface<br/>[index.html]"]
  node_chat["Shared chat<br/>[index.html]"]
end

subgraph group_play["Game features"]
  node_dice["3D dice<br/>[index.html]"]
  node_maps["Maps and reveal<br/>[index.html]"]
  node_tokens["Tokens and NPCs<br/>[index.html]"]
  node_inventory["Inventory and Acervo<br/>[index.html]"]
  node_combat["Turn combat<br/>[index.html]"]
end

subgraph group_state["Shared game state"]
  node_firebase[("Firebase")]
end

subgraph group_identity["Identity services"]
  node_authserver["Discord sign-in server<br/>[server.mjs]"]
end

node_user(("Players and GM"))
node_pages["GitHub Pages"]
node_discord["Discord OAuth"]

node_user -->|"uses"| node_web
node_web -->|"offers"| node_chat
node_web -->|"offers"| node_dice
node_web -->|"offers"| node_maps
node_web -->|"offers"| node_tokens
node_web -->|"offers"| node_inventory
node_web -->|"offers"| node_combat
node_web -->|"authenticates and syncs"| node_firebase
node_pages -->|"serves"| node_web
node_authserver -->|"uses OAuth"| node_discord
node_discord -->|"returns identity"| node_authserver
node_authserver -->|"creates users and tokens"| node_firebase
node_web -.->|"requests first sign-in"| node_authserver

click node_web "https://github.com/soggypoiuytr/tableverse/blob/main/docs/index.html"
click node_chat "https://github.com/soggypoiuytr/tableverse/blob/main/docs/index.html"
click node_dice "https://github.com/soggypoiuytr/tableverse/blob/main/docs/index.html"
click node_maps "https://github.com/soggypoiuytr/tableverse/blob/main/docs/index.html"
click node_tokens "https://github.com/soggypoiuytr/tableverse/blob/main/docs/index.html"
click node_inventory "https://github.com/soggypoiuytr/tableverse/blob/main/docs/index.html"
click node_combat "https://github.com/soggypoiuytr/tableverse/blob/main/docs/index.html"
click node_authserver "https://github.com/soggypoiuytr/tableverse/blob/main/server/server.mjs"

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_web,node_chat toneBlue
class node_dice,node_maps,node_tokens,node_inventory,node_combat toneAmber
class node_firebase toneMint
class node_authserver toneRose
class node_user,node_pages,node_discord toneIndigo
```

## Components

### Table interface

- [Table interface](https://github.com/soggypoiuytr/tableverse/blob/main/docs/index.html): `docs/index.html`
- [Shared chat](https://github.com/soggypoiuytr/tableverse/blob/main/docs/index.html): `docs/index.html`

### Game features

- [3D dice](https://github.com/soggypoiuytr/tableverse/blob/main/docs/index.html): `docs/index.html`
- [Maps and reveal](https://github.com/soggypoiuytr/tableverse/blob/main/docs/index.html): `docs/index.html`
- [Tokens and NPCs](https://github.com/soggypoiuytr/tableverse/blob/main/docs/index.html): `docs/index.html`
- [Inventory and Acervo](https://github.com/soggypoiuytr/tableverse/blob/main/docs/index.html): `docs/index.html`
- [Turn combat](https://github.com/soggypoiuytr/tableverse/blob/main/docs/index.html): `docs/index.html`

### Shared game state

- **Firebase**

### Identity services

- [Discord sign-in server](https://github.com/soggypoiuytr/tableverse/blob/main/server/server.mjs): `server/server.mjs`

### Other components

- **Players and GM**
- **GitHub Pages**
- **Discord OAuth**

## Connections

- Players and GM → Table interface: uses (evidence: `README.md`)
- Table interface → Shared chat: offers (evidence: `README.md`)
- Table interface → 3D dice: offers (evidence: `README.md`)
- Table interface → Maps and reveal: offers (evidence: `README.md`)
- Table interface → Tokens and NPCs: offers (evidence: `README.md`)
- Table interface → Inventory and Acervo: offers (evidence: `README.md`)
- Table interface → Turn combat: offers (evidence: `README.md`)
- Table interface → Firebase: authenticates and syncs (evidence: `README.md`)
- GitHub Pages → Table interface: serves (evidence: `README.md`)
- Discord sign-in server → Discord OAuth: uses OAuth (evidence: `server/server.mjs`)
- Discord OAuth → Discord sign-in server: returns identity (evidence: `server/server.mjs`)
- Discord sign-in server → Firebase: creates users and tokens (evidence: `server/server.mjs`)
- Table interface → Discord sign-in server: requests first sign-in (evidence: `README.md`)
