move presence to d1

This commit is contained in:
Devin Zuczek
2026-07-11 12:37:22 -04:00
parent aad184181b
commit fb553c2fd0
16 changed files with 452 additions and 131 deletions
+3 -5
View File
@@ -3,12 +3,10 @@ import type { SharedHonoEnv, SharedHonoVariables } from '@repo/hono-helpers/src/
export type Env = SharedHonoEnv & {
// Shared rooms/accounts D1 database. The `auth` worker owns the `accounts`
// table (creates accounts on signup, seeds the system + Coach accounts).
// table (creates accounts on signup, seeds the system + Coach accounts). Also
// seeds new players' presence to the Orientation room (the shared `presence`
// table, see @repo/domain) so the match heartbeat keeps them there.
DB: D1Database
// Shared match-presence KV (owned by the `match` worker). On account creation
// the new player's presence is seeded to the Orientation room so the match
// heartbeat keeps them there instead of bouncing them to the dorm.
RECFLARE_MATCH_PRESENCE: KVNamespace
// Shared Secrets Store binding for the HS256 signing key. Resolve the value with
// `await env.JWT_SECRET.get()`. Every worker binds the same store, so tokens
// signed here verify in all of them. Provisioned via `wrangler secrets-store`;