React Starter Kit deploys as three Cloudflare Workers backed by a Neon PostgreSQL database. Infrastructure is managed with Terraform.
| Component | Target | Description |
|---|---|---|
| Web Worker | Cloudflare Workers | Edge router – receives all traffic, routes to app/api via service bindings |
| App Worker | Cloudflare Workers | Serves the React SPA and static assets |
| API Worker | Cloudflare Workers | Hono + tRPC server, authentication, database access |
| Database | Neon PostgreSQL | Managed Postgres with Hyperdrive connection pooling |
| Infrastructure | Terraform | Hyperdrive configurations, optional R2 storage |
See Architecture Overview for how these components connect.
brew install terraform or download)| Environment | Intended trigger | URL pattern | Purpose |
|---|---|---|---|
| Development | bun dev |
localhost:5173 |
Local development |
| Staging | Push to main |
staging.example.com |
Pre-production validation |
| Production | Manual dispatch | example.com |
Live environment |
Staging and production each have their own Wrangler configuration, Hyperdrive bindings, and Terraform workspace. Development is local and provisions no cloud resources. See CI/CD for deployment triggers. The checked-in deployment step is disabled until Cloudflare credentials are configured.
BETTER_AUTH_SECRET and RESEND_API_KEY, plus secrets for any optional integrations you enable, via Wrangler. See Cloudflare Workers for the full listbun run build # Build all deployable workspaces
bun api:deploy --env="" # Deploy production API worker
bun app:deploy --env="" # Deploy production App worker
bun web:deploy --env="" # Deploy production Web worker