Deploy docs + playground (Tamer)
Public docs (docs/, VitePress) and the in-browser playground (clients/studio with the wasm engine) deploy to Cloudflare Workers through Tamer.
This stack hosts documentation and the playground only. It is not a hosted Eelden database API or multi-tenant cloud backend. No app secrets are declared for these workers — skip tamer secrets until an API worker lands.
| Surface | Prod host | Worker |
|---|---|---|
| Docs | eelden.dev | eelden-docs |
| Playground | play.eelden.dev | eelden-playground |
Non-prod envs get {env}. prefixes (dev.…, pr-42.…) via Tamer route expansion. workers.dev URLs stay enabled as a fallback.
Prerequisites
- Node.js 22+ and Bun (the
tamerbin has a Bun shebang) - Stable Rust +
wasm32-unknown-unknown(playground wasm build) - Cloudflare account with
CLOUDFLARE_ACCOUNT_ID+CLOUDFLARE_API_TOKEN - Zone
eelden.devon that account (custom domains)
Token scopes: at least Workers Scripts: Edit, Workers Routes: Edit, Account Settings: Read, Zone: Read (and DNS edit if you also manage records via Tamer). See Tamer’s installation guide.
One-time bootstrap
# Repo root
bun install
npm ci --prefix docs
npm ci --prefix clients/studio
# Credentials (gitignored)
cat > .env <<'EOF'
CLOUDFLARE_ACCOUNT_ID=…
CLOUDFLARE_API_TOKEN=…
EOF
bunx tamer doctor --env dev
bunx tamer bootstrap # once per account: tamer-state + tamer-artifacts + tamer-secretsApply + deploy
bunx tamer apply --env dev
bunx tamer deploy --env dev
# → https://dev.eelden.dev
# → https://dev.play.eelden.dev
bunx tamer apply --env prod
bunx tamer deploy --env prodRoot package.json also exposes tamer:apply:* / tamer:deploy:* scripts.
tamer deploy for each worker:
- Writes
wrangler.jsonunder the workerpath - Spawns the build with resolved vars as env
- docs:
npm run build(VitePress; bakesVITE_PLAYGROUND_URLinto nav) - playground:
npm run build:deploy(wasm + Vite withVITE_PLAYGROUND=1)
- docs:
wrangler deployuploads assets
Local development (no Tamer)
# Docs
cd docs && npm install && npm run dev
# Playground (same UI the deploy serves)
cd clients/studio && npm run build:wasm && npm run dev:playground
# open http://127.0.0.1:5173/?local=1Product Studio against a local engine is separate: run eelden serve and npm run dev in clients/studio — see consumer Studio docs.
CI
Workflows under .github/workflows/:
tamer-prod-deploy.yml— push toapex→apply+deploy --env prodtamer-pr-preview.yml— PR opened/sync →pr-<n>env + comment URLstamer-pr-cleanup.yml— PR closed →tamer destroythat env
GitHub configuration:
| Name | Type | Purpose |
|---|---|---|
CLOUDFLARE_API_TOKEN | secret | CF API token |
CLOUDFLARE_ACCOUNT_ID | variable | CF account id |
Config layout
tamer/
project.config.ts # stack identity + workers
workers/
docs/{base,env/*}.ts
playground/{base,env/*}.tsTamer docs: SPA build, SPA with API, CI workflows.