TeleporterDash's backend server. Built on Cloudflare Workers with KV and R2.
┌────────────────────────────────────────────┐
│ TDServer Worker │
│ │
│ Routes: │
│ ├─ GET /levels │
│ ├─ GET /level/:id │
│ ├─ POST /level │
│ ├─ POST /level/:id/rating │
│ ├─ POST /level/:id/comment │
│ ├─ GET /music │
│ ├─ GET /music/:id │
│ ├─ POST /music │
│ └─ DELETE /music/:id │
│ │
│ Storage: │
│ ├─ KV TELEPORTER_LEVELS -> level data │
│ ├─ KV TELEPORTER_MUSIC -> music catalog │
│ └─ R2 TELEPORTER_AUDIO -> audio files │
└────────────────────────────────────────────┘
wrangler kv namespace create TELEPORTER_LEVELS
wrangler kv namespace create TELEPORTER_MUSICCopy the returned IDs into wrangler.toml.
wrangler r2 bucket create teleporterdash-audioUpdate the bucket_name in wrangler.toml.
npm install
wrangler deployPublishes to https://tdserver.neeljaiswal23.workers.dev.
Import the 65 existing levels from the archived TDLevels repo:
npx tsx scripts/migrate-levels.ts- Built-in level songs stay in the game repo (
Sound/Level Soundtracks/) - User-uploaded songs are stored in R2 (
teleporterdash-audiobucket) - Catalog metadata is stored in KV (
TELEPORTER_MUSIC)
Supported formats: OGG (preferred), MP3.
- CORS: Domain-scoped to
teleporterdash.github.io(configurable viaALLOWED_ORIGIN) - Reads: Open
- Writes: Open but rate-limited (10 requests/hour per IP)
- No HTML served — pure JSON API
Free tier covers everything. Cloudflare Workers KV: 100k reads/day, 1k writes/day. R2: 10GB storage, 10M reads/month.