User traffic enters nginx on 443, then routes by path.
🛣️ Routing
Funday traffic enters at User:443, terminates TLS at nginx, then routes by path.
| Path | Target |
|---|---|
/console, /v2/console | Traefik to Nakama console. |
/v2, /ws | Traefik to Nakama HTTP/WebSocket. |
/grafana, /prometheus | Monitoring ingresses. |
/* | SvelteKit frontend on systemd. |
Source: funday/funday-codex.yml routing; funday/funday-bible.md 2. Architecture.
🎮 Plugins
Each game lives under games/{id}/ with funday-plugin.json as its manifest.
| Type | Mount | Bridge |
|---|---|---|
svelte-component | Svelte dynamic component | platformBus store. |
iframe-themeable | Browser iframe | postMessage. |
dedicated-server | iframe plus service | postMessage and REST. |
Current matrix: 82 directories, 35 production-ready, 11 partial, 27 frontend-only, 8 scaffolds/templates, 1 unregistered.
Source: funday/funday-codex.yml games; funday/funday-bible.md game plugin section.
🪪 Identity
Funday is guest-first. Device auth mints the funday-identity HTTP-only cookie and the app restores the Nakama session from it.
Rule
Every identity mutation updates both Nakama and the cookie atomically.
Handles
username: immutable TwoWord handle for mentions and profile URLs.displayName: mutable persona text.
Source: funday/funday-codex.yml identity; funday/funday-bible.md identity golden rule.
🧬 Nakama
Nakama runs in Kubernetes under funday-platform and hosts matchmaking RPCs, match handlers, console, and WebSocket gameplay paths.
Runtime
- Entry:
nakama-modules/index.ts. - Matchmaking RPC:
find_match_v3. - Game registry:
games/_platform/server/game_registry.ts. - Public health path:
/v2/healthcheck.
Source: funday/funday-codex.yml nakama; funday/funday-bible.md Nakama section.