Deployment Guide
1. Backend API (Worker)
The backend is a Cloudflare Worker.
npm run deploy
This runs wrangler deploy, which bundles the code and pushes it to Cloudflare. Ensure all secrets (API tokens, DB IDs) are set in the dashboard.
2. Admin Panel (Pages)
The admin panel is a Next.js app deployed to Cloudflare Pages.
npm run admin:deploy
This performs a two-step process:
npm run admin:build: Uses@cloudflare/next-on-pagesto compile the app for the Edge.wrangler pages deploy: Uploads the static assets and the_worker.jsfunction.
3. Database Migrations
To update the schema:
- Local:
npm run d1:migrate - Production:
npm run d1:migrate:prod