Skip to content

Dev Deployment Checklist ​

Local pnpm dev is development-only. This checklist covers deploying to a development/staging environment (including app.neemias.app / api.neemias.app when those are in dev mode, e.g. with ENVIRONMENT=dev).


1. Local Development (pnpm dev) ​

No checklist needed — just run pnpm dev for the frontend and pnpm dev:worker for the API.

  • Frontend: http://localhost:5173
  • Worker: http://localhost:8788

2. Dev Environment Deployment Checklist ​

Use this when deploying to a dev/staging instance. Production has a separate, stricter checklist in production-checklist.md.

2.1 Build & Tests ​

2.2 CSP & Security (dev mode) ​

2.3 Environment Variables (Cloudflare Dashboard) ​

These must be set in Cloudflare Dashboard → Workers & Pages.

VariableServiceRequiredDev value
AUTH_MODEWorkerYesdev (accepts dev tokens)
AUTH_DEV_ADMIN_TOKENWorkerOptionalSet for local API testing
ENVIRONMENTWorkerNo (leave unset)Defaults to dev — seed endpoint works
DEPLOY_ENVPagesNo (leave unset)Defaults to dev — frontend seed runs

Zero as any constraint: No as any in production code (app/src/, workers/src/, packages/). Only test files (__tests__/) may use casts. Pre-commit hook checks with scripts/count-as-any.sh.

2.4 Deploy Steps ​

bash
# 1. Build frontend (generates _headers with dev-mode CSP)
pnpm build:app

# 2. Commit and push (Pages auto-deploys from git)
git add -A && git commit -m "deploy: ..."
git push

# 3. Deploy Worker separately
pnpm deploy:worker

# 4. Apply D1 migrations (if any)
pnpm db:migrate:remote

2.5 Post-Deploy Verification ​

2.6 Known Dev-Only Behaviors ​

BehaviorWhyImpact
VITE_BACKEND_URL must be setWorker runs on different portAPI calls fail silently
CSP uses nonce + unsafe-inlineVite HMR injects inline stylesSame as production but less strict
Seed runs automaticallyDEPLOY_ENV=dev (default)Demo users created on first visit

Distribuído sob licença MIT.