Skip to content

SDD Plan — EP-23 Cloud / Open-Core

Branch: feat/ep23-cloud-core Base: feat/cli-ep22-alpha Status: In Progress

Complete the Cloud / Open-Core commercial layer (v2.8 target). RoomfulScript (EP-24) is excluded.

Each package runs in its own git worktree with a dedicated subagent.


AspectDetail
Worktree.worktrees/wp1-lint
GoalFix all 40+ lint errors in relay and cloud-api packages
Filesrelay/src/management/api.ts, store.ts, types.test.ts, index.ts
Exit criteriapnpm --filter @roomful/relay lint passes, pnpm --filter @roomful/cloud-api lint passes

AspectDetail
Worktree.worktrees/wp2-api-tests
GoalAchieve >90% coverage on relay/src/management/api.ts (currently ~5%)
Filesrelay/src/management/api.test.ts (new)
What to testAll REST endpoints: list/create/get/update/delete projects, rooms, quota CRUD, usage fetch, JWT auth header parsing, CORS preflight, route matching, validation errors, duplicate project/room errors, project-not-found errors, authorization callback, edge cases (empty body, malformed JSON, unknown routes)
Exit criteriapnpm --filter @roomful/relay test passes; api.ts coverage >90%

AspectDetail
Worktree.worktrees/wp3-pg-store
GoalImplement PostgresManagementStore implementing ManagementStore interface
Filesrelay/src/management/pg-store.ts, relay/src/management/pg-store.test.ts (new)
WhatPostgreSQL implementation of ManagementStore using a connection pool. Schema migration SQL for projects, rooms, quotas tables. Inline tests using testcontainers or a lightweight pg test helper.
Exit criteriaImplemented, typechecks, tests pass (can mark as integration/skip in CI)

WP-4: Relay Integration — Mount Management API

Section titled “WP-4: Relay Integration — Mount Management API”
AspectDetail
Worktree.worktrees/wp4-relay-integration
GoalMount createManagementApi into the relay HTTP server
Filesrelay/src/server.ts, relay/src/management/index.ts
WhatAdd managementApiPrefix config option to relay. Mount the management API handler on the relay’s HTTP server. Ensure OPTIONS preflight and auth flow work alongside existing relay WebSocket upgrade logic. Update relay/src/index.ts exports.
Exit criteriaRelay starts with management API enabled; GET /api/v1/projects returns 200 with owner filtering

WP-5: Cloud API — ProjectStore Integration

Section titled “WP-5: Cloud API — ProjectStore Integration”
AspectDetail
Worktree.worktrees/wp5-cloud-integration
GoalWire InMemoryProjectStore into the cloud-api package fully, add missing exports
Filescloud-api/src/index.ts, cloud-api/src/api-keys.ts, cloud-api/src/metering.ts
WhatEnsure all cloud-api exports are consistent. Add UpdateRoomInput to the Room model if missing. Ensure ProjectStore interface methods align with what InMemoryProjectStore implements.
Exit criteriapnpm --filter @roomful/cloud-api test passes; pnpm --filter @roomful/cloud-api typecheck passes

AspectDetail
Worktree.worktrees/wp6-docs
GoalUpdate hosted-relay-beta-architecture.md with implementation status
Filesdocs/project/hosted-relay-beta-architecture.md, ROADMAP.md
WhatUpdate architecture doc to reflect current implementation state. Update ROADMAP.md EP-23 status from Planned to In Progress / Released as appropriate. Add API reference docs for management endpoints.
Exit criteriaArchitecture doc accurately reflects implementation; ROADMAP updated

WP-1 (lint) ───────┐
├──> sequential (must pass for merge)
WP-2 (api tests) ──┘
WP-3 (pg-store) ───┐ (parallel with WP-4, WP-5, WP-6)
WP-4 (integration) ─┤
WP-5 (cloud-api) ───┤
WP-6 (docs) ────────┘
All merge → PR → rebase onto feat/ep23-cloud-core
  1. Each worktree’s branch: wp-N/feat/ep23-cloud-core
  2. After all pass: merge into feat/ep23-cloud-core sequentially
  3. Run full test suite on merged result
  4. Push and open PR against feat/cli-ep22-alpha