docs: purge remaining Upstash references and sync to DO storage

Drop /admin/migrate-from-upstash from public API docs, replace deprecated
UPSTASH_* env vars with ALLOWED_ORIGINS/ENVIRONMENT, update Worker
conventions to reflect DO bindings (env.CANVAS_ROOM) instead of Redis
client patterns, and rewrite system-architecture security/data-flow
sections to cover cookie+IP identity, transactionSync atomicity, WS
Origin allowlist, per-identity WS cap, and broadcast sequence numbers.
This commit is contained in:
tiennm99 committed 2026-05-11 15:59:50 +07:00
1 parent 4f02d30393
commit 9f50237a3c
5 files changed
+63 -86

No files matched your search

+4 -3
View File
@@ -26,10 +26,11 @@ src/
### Worker (src/worker.js, src/lib/*)
- Functions receive `env` parameter for Cloudflare bindings (Redis credentials, DO bindings)
- Functions receive `env` parameter for Cloudflare bindings (DO bindings, vars)
- No global state — Workers are stateless between requests
- Use `@upstash/redis/cloudflare` (REST-based, not TCP)
- Bitfield operations use builder pattern: `redis.bitfield(key).set().exec()`
- Durable Object access via `env.CANVAS_ROOM.get(env.CANVAS_ROOM.idFromName('main'))`
- Identity flows through `resolveIdentity(request, env)` (cookie-first, IP fallback)
- Edge handlers validate input before forwarding to the DO; the DO re-validates at the trust boundary
### Client (src/client/*)