mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 14:41:28 -07:00
c33919bc67
And a few other minor things, but primarily, the balance table exists and also consumable/inventory table.
match
Matchmaking Worker served on the match subdomain. A Hono app for matchmaking.
Database queries are stubbed for now — no real bindings yet.
Behavior
- Auth-gated routes (
/player/heartbeat,/goto/room/:room) validate the Bearer JWT issued by theauthworker (same dev secret, seesrc/jwt.ts) and 401 when it's missing/invalid. GET /playeralways returns the inlinedJSON/getplayer.jsondefault (falls back to that file when the account/room instance isn't found).POST /goto/nonereturns the static offline-dorm instance with a freshphotonRoomId.POST /goto/room/:roomsynthesizes the room-instance response (no Rooms binding yet). The dorm gets its known scene id and a private instance; other rooms get an emptylocationand respect the postedJoinMode(2 = private).POST /player/heartbeatechoes the posted heartbeat fields;roomInstanceis always null andisOnlinefalse until there's a DB binding./player/login,/player/statusvisibility,/roominstance/:id/reportjoinresultreturn empty 200s.
TODO before production
- Wire a DB binding (D1/DO) for
Accounts,Rooms/SubRooms,RoomInstances. - Implement
/goto/room/:room(resolve room, upsert instance) and the per-account/player+/player/heartbeatroom-instance lookups. - Move the JWT secret to a shared secret binding (shared with
auth).