Bun is required for running the backend. Install it based on your operating system:
macOS or Linux:
curl -fsSL https://bun.sh/install | bashWindows: Install via Windows Subsystem for Linux (WSL):
- Install WSL if you haven't already
- Run the above curl command in your WSL terminal
- Backend Setup
cd backend
bun install-
Getting your cloudflare api keys
-
Create a
.envby copying.env.examplefile in the backend directory , and fill it in with the following variables:
CLOUDFLARE_ACCOUNT_ID=your_account_id
CLOUDFLARE_DATABASE_ID=your_database_id
CLOUDFLARE_D1_TOKEN=your_d1_tokencd backend
bun run dev- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" in the top right
- Click "Load unpacked" and select the project's root directory
cd backend
bun run deployThe backend will be deployed to Cloudflare Workers using the configuration in wrangler.toml.
Once the backend is running, you can access the API documentation at:
- Swagger UI:
/ui - OpenAPI spec:
/doc