🏛️ Platform Architecture

Lifecycle note: Pages in this tree are mostly current. Exception: Realtime Comms is mixed (LiveKit client/RPC/manifests exist; Helm roadmap sections remain proposed). Secrets/Vault language may describe intended control plane while live cutover remains blocked — see Nakama multiplayer and Secrets runbook.

Executive Summary Defines the high-level platform boundaries, technology stack, routing, and data flow of the Funday ecosystem. When to change: Update this when introducing a new infrastructural layer, changing the routing logic, shifting core technologies (like Nakama, SvelteKit, or Kubernetes), or changing secret handling policy.

Find

Understand

Current platform shape

LayerTechnologyPurpose
FrontendSvelteKit 2 + Svelte 5 + Tailwind 4 + DaisyUI 5Web UI, game lobby, matchmaking, /play/[id] host shell
BackendNakama 3.32.0 + TypeScript runtime modulesAuth, matchmaking, leaderboards, RPCs, authoritative match state
OrchestrationK3s + AgonesPlatform services plus dedicated game-server fleet management
Edgenginx TLS → TraefikPublic HTTPS, subpath routing, WebSocket upgrade
DatabasePostgreSQL 15.6+ in postgresql namespaceReal Nakama user/game data
CacheRedis 7.2+ in funday-platform namespaceSession/cache/pub-sub support
MonitoringGrafana + PrometheusMetrics, dashboards, alerting rules
DocsQuartz 5 static wikiSource: /home/usr/funday/dev/docs; served at /dev/docs/wiki/ via quartz-wiki.service (operator/developer documentation)
AI AgentsOmpcord/Amy + local omp toolingDiscord and CLI assisted development

Request routing

flowchart TD
  User["User (:443)"] --> Nginx["Nginx (TLS termination)"]
  Nginx -->|"/dev/docs/wiki/"| Quartz["Quartz :8080 (funday/dev/docs)"]
  Nginx -->|"/console, /v2/console"| Traefik1["Traefik (:32443)"] --> NakamaConsole["nakama-console-svc (:7351)"]
  Nginx -->|"/v2, /ws"| Traefik2["Traefik (:32443)"] --> Nakama["nakama (:7350)"]
  Nginx -->|"/grafana, /prometheus"| Traefik3["Traefik (:32443)"] --> Monitoring["monitoring ingresses"]
  Nginx -->|"/*"| SvelteKit["SvelteKit (:3000)"]
PathTarget
/console, /v2/consoleTraefik to Nakama console.
/v2, /wsTraefik to Nakama HTTP/WebSocket.
/grafana, /prometheusMonitoring ingresses.
/*SvelteKit frontend on systemd.

Nakama deployment

SettingCurrent source-backed value
Imageheroiclabs/nakama:3.32.0
Deploymentgitops/platform/base/nakama/ via Argo nakama-app (intended)
Namespacefunday-platform
ReplicasGitOps intended 3 (deployment.yaml); live may differ — verify
Runtime path/nakama/data/modules
Runtime module sourceHost path /home/usr/funday/nakama-modules
Game mountHost path /home/usr/funday/games mounted under runtime modules
HTTP port7350
Console port7351
Metrics port9100
Readiness/liveness/healthcheck on port 7350

Secret handling

INTENDED vs LIVE: GitOps declares Vault + ESO Argo apps. Workloads still consume materialized Kubernetes Secrets (secretKeyRef / envFrom). Do not assume Vault is live until cluster-verified. See Secrets runbook.

🔒 Secret values are intentionally not documented here. This wiki is served at https://funday.gg/dev/docs/wiki/ via quartz-wiki.service; keep credentials in K8s Secrets, systemd env files, or local .env files. Document names and locations only.

Historical: Previously documented as live at ssot.funday.gg (/home/usr/funday/ssot.funday.gg); that directory is missing. It was Quartz, not Hugo.

SettingWhere it livesBrowser exposure
Database connectionNakama deployment/config secretNever
Session / refresh encryption keysNakama configNever
Console credentials/signing keyNakama configNever
Socket server keyNakama configNever
Runtime HTTP keyServer-side env / Nakama configNever
Public Nakama host/port/SSLPUBLIC_NAKAMA_* frontend envSafe

Server identity

FieldValue
Domainfunday.gg
Wikihttps://funday.gg/dev/docs/wiki/ (quartz-wiki.service)
Server IP213.136.90.143
OSDebian 13 (trixie)
  • Play Shell Cheatsheet — Visual map of what you see on /play/[gameId] and how the pieces talk to each other

Historical supporting

Ask Docs

AI assistant to help answer questions about the documentation. Answers are read-only and cite docs/source.

Hi! How can I help you with the documentation today? Answers are read-only and cite docs/source.

Ctrl+Enter to send