Add the dj-live app server: sessions, passcodes, guest sign-in #36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/live-app-server"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Guests need to follow a set and make requests without ever reaching the DJ console. The console has no auth and drives live playback (see
docs/adr/0001). Nothing public exists yet to hold online sessions.Solution
A standalone tRPC app server under
app/server/, run withbun run live:incarnadine-djsgroup opens an online session for a set with a passcode, and can close it. Passcodes are single-use across all sessions. Going online again for the same set with the same passcode reopens that set's session.verifyCallernever throws, and anything it can't verify is treated as anonymous. Authentik doesn't restrict login by group, so the group check here is the only gate.AUTH_MODE=testaccepts self-signed DJ tokens so tests need no IdP./live/trpcand a health check at/live/healthshare one port, viatrpc-bun-adapter.trpc-bun-adapter,joseandzod, matching lunacycle's versions.This is Slice 1 of
projects/2026-09-27-dj-online-companion/plan.md.Testing
bun test app/server: 26 pass. That covers the database constraints, auth, events and the full session lifecycle, plus one test against a realBun.servethat checks health, the DJ opening a session and the guest signing in.bun test: 131 pass, andbun run checkis clean.AUTH_MODE=test GUEST_TOKEN_SECRET=… bun run live, thencurl /live/healthreturnsok.🤖 Generated with Claude Code
092fd1235bto0ce95d02c4