Skip to main content

11 — Decisions, corrections and open questions

Decision records​

IDDecisionStatusRationale / consequences
ADR-001Control plane in TypeScript/Node (Fastify, pg-boss, Pulumi Automation API, TanStack Start console)Accepted (D1)Matches Pulumi Automation API and console; supersedes Go CP of the discussions. go-meet stays Go.
ADR-002Chat = Tuwunel (Matrix) per tenantProposed — confirmAGENTS.md still lists Rocket.Chat; Matrix discussion is the deeper one. Affects DB design (Mongo vs RocksDB)
ADR-003Zitadel, single multi-tenant instance, org per tenantAccepted (D3)Replaces Keycloak. Dedicated instance for Tier-1 only.
ADR-004Infisical shared, folder + machine identity per tenantAccepted (D2)Per-tenant Infisical too heavy.
ADR-005Coolify project per tenant + core-infra + tenant-data-poolAccepted (D4)Atomic teardown, clear scope.
ADR-006LiveKit shared; token broker signs exact-room tokens; tenants never hold the API secretProposedLiveKit has no prefix grants or per-key authZ. Cost: CP on the join path.
ADR-007Webhook router in CP re-signs to tenant go-meetProposedOne LiveKit webhook stream; custom per-egress callback not relied on.
ADR-008Bucket per tenant + scoped key; presigned URLs; lifecycle expiryAcceptedHard boundary, instant erase.
ADR-009Encryption: SSE-S3 first; per-tenant keys via a RustFS-supported KMS laterProposedInfisical is not a documented RustFS KMS backend.
ADR-010DB per tenant on sharded Postgres pool; separate core PostgresAcceptedHard boundary; blast radius per shard.
ADR-011Pulumi stack per tenant, state in Postgres backend, dynamic providers over adaptersProposedSingle lifecycle model; adapters keep Coolify authoritative for runtime.
ADR-012go-meet per tenant (container), Redis per tenantAccepted~20 MB, process isolation.
ADR-013Persistent in-call chat via Matrix room; LiveKit data channels not used for chatProposedSingle text record; guest bridge open (Q-06).
ADR-014Orchestrator references stored generically (orchestrator_type, resource_id)AcceptedCoolify → Dokploy/K8s is an adapter.

Corrections to the discussions​

These points were stated in the exploratory chats and are not carried over because they conflict with vendor documentation or with later decisions.

Claim in discussionReality / resolution
LiveKit tokens support RoomPrefix (so one tenant admin token can cover tenant-*)No: room is an exact match. → broker with exact-room tokens (ADR-006)
Per-key webhook routing/limits in livekit.yaml give tenant isolationOfficial docs do not establish per-key authZ or per-key webhook routing; multiple keys only distinguish signers. → CP owns tenant authZ
Egress CustomBaseUrl delivers egress events to the tenantNot verified in current docs. → router for all events (ADR-007)
LiveKit tokens can be refreshed/revoked server-sideSelf-hosted removal/permission changes do not revoke issued tokens. → short TTLs
Infisical can serve as RustFS's KMS for SSERustFS documents local, Vault KV2 and Vault Transit KMS backends. → Q-07
Keycloak orgs/claims; Go control plane; Infisical per tenantSuperseded by Zitadel, TypeScript control plane, shared Infisical
Coolify API at /api/v4/...Coolify's REST API is /api/v1
Pulumi state "in PostgreSQL" vs "S3 bucket" (both said)Postgres DIY backend is documented; use it (no dependency on RustFS for control state)
Zitadel org claim urn:zitadel:iam:org:id as "the tenant id"Home-org is …user:resourceowner:id; org:id:{id} is a scope enforcing membership; role grants are separate claims
Rocket.Chat and Tuwunel both plannedReconcile via ADR-002

Open questions​

IDQuestionNeeded byOwner/next step
Q-01Platform domain, regions, hosting provider(s) for public VPS + private hostbefore stagingproduct
Q-02Pricing tiers ↔ isolation tiers (Standard / Dedicated data / Enterprise)before provisioning codeproduct
Q-03Is a pulumiverse/community Zitadel provider good enough, or write a dynamic provider over the management API?CP spikeengineering spike
Q-04Zitadel role/group → go-meet team_ids mapping format (project roles vs organization metadata)go-meet Zitadel adaptergo-meet
Q-05Tuwunel OIDC: native vs delegated; supported appservice features and admin API surface; backup methodbefore chat workspike
Q-06Guest in-call chat: bridge (data channel → Matrix) or no chatwith Matrix workproduct
Q-07Per-tenant SSE keys: OpenBao/Vault Transit KMS for RustFS, or SSE-S3 onlybefore recordings in prodsecurity
Q-08Files/storage product: build on RustFS directly or integrate an open-source drive? Euro-Office storage backend?roadmapproduct
Q-09Mail: Stalwart per tenant or shared multi-domain? Public SMTP ports/IP reputation under frproadmapengineering
Q-10Billing/metering source of truth (Zitadel, CP, usage events)laterproduct
Q-11pg-boss vs Temporal for sagas as complexity growsafter first sagaengineering
Q-12Pulumi CLI availability/packaging inside the worker image and state-locking behavior with Postgres backend under concurrencyCP spikeengineering spike
Q-13Broker SLO/replica policy and whether to give Enterprise tenants a dedicated LiveKit key + nodebroker designengineering
Q-14Rocket.Chat retained for any customer segment?ADR-002product

Suggested sequence​

  1. Spikes (1–2 weeks): Pulumi Automation + dynamic provider against Coolify; Zitadel org/grant/service-account via API; broker + one go-meet joining through it; Tuwunel OIDC.
  2. Walking skeleton: provision one tenant end to end (Zitadel org → DB → bucket → Coolify stack → login → call → recording).
  3. Harden: reconciler, suspension/offboarding, observability, backups with a restore drill.
  4. Chat integration, then SSO self-service, then modules (mail, files).

Mapping to the repository​

ConcernTodayChange
DocsAGENTS.md, go-meet/*.mdThis folder is the architecture reference; AGENTS.md points here
Deployment draftsdeployment/See table in 09
Prototypego-meet/See table in 06
New code—control-plane/ (TS monorepo: api, worker, console, packages/ports)