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
+5 -6
View File
@@ -6,12 +6,11 @@ export type Env = SharedHonoEnv & {
// with `await env.JWT_SECRET.get()`; all workers bind the same store so tokens
// signed by `auth` verify here.
JWT_SECRET: SecretsStoreSecret
// Per-player presence (the room instance they're currently in). Written by
// matchmake/goto, read by the heartbeat, cleared on login — mirrors the
// reference server's HeartbeatDB.
RECFLARE_MATCH_PRESENCE: KVNamespace
// Shared rooms DB (owned by the `rooms` worker). Read-only here to resolve a
// room's real scene/subroom when matchmaking into it.
// Shared `recflare` DB. Resolves room scenes for matchmaking (read), writes a
// player's personal dorm room on first entry, and holds player presence — the
// room instance each player is currently in (written by matchmake/heartbeat,
// read by the heartbeat and the batch `/player` lookup). See @repo/domain's
// presence-db (table owned/migrated by the `rooms` worker).
DB: D1Database
}