ProtoBurn was originally built for Cloudflare Workers + D1. This is the simplest deployment path.
- Node.js 22+
- Bun
- A Cloudflare account with Workers enabled
-
Clone and install
git clone https://github.com/MrDemonWolf/protoburn.git cd protoburn bun install -
Configure Alchemy
bun cf:setup
-
Set environment variables
Create a
.envfile in the project root:API_KEY=your-secret-api-key SITE_URL=https://protoburn.your-domain.workers.dev API_PLAN=Max BILLING_RENEWAL_DAY=6 # Optional DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
-
Deploy
bun cf:deploy
This deploys:
- Web: Static SPA to
protoburn.your-domain.workers.dev - Server: API Worker to
protoburn-api.your-domain.workers.dev - D1: SQLite database with auto-migrations
- Web: Static SPA to
-
Sync your usage
export PROTOBURN_API_KEY=your-secret-api-key export PROTOBURN_API_URL=https://protoburn-api.your-domain.workers.dev bun sync
A Cloudflare Cron Trigger runs daily at midnight UTC. On your billing renewal day, it aggregates old daily rows into monthly summaries and cleans up the daily table.
bun cf:destroy