Search

Search Kavel...

Documentation menu

Quick Start

Scaffold a new app, run it locally, and see the API and web app talk to each other in a couple of minutes.

Prerequisites

  • Bun 1.3 or newer, the package manager and runtime
  • A Cloudflare account (the free tier is enough to start)

1. Create your app

Run the scaffolder and pick the modules you want when prompted:

bash
bun create kavel@latest my-app

The CLI clones the template, assembles only the modules you selected, installs dependencies, seeds a local .dev.vars, generates types, and initializes a git repository.

2. Start the dev servers

bash
cd my-app
bun dev

Turbo boots both apps in parallel: the API on localhost:8787 and the web app on localhost:3000. Open the web app and you're running.

Tip

The API serves an interactive reference at /rpc/docs in development. It's disabled automatically when ENVIRONMENT is production.

3. Set up the database

If you picked a module that uses the database (auth, email, or payments), generate and apply the local migrations:

bash
cd apps/api
bun db:generate
bun db:migrate

db:generate turns your Drizzle schema into SQL migrations; db:migrate applies them to the local D1 database. Never hand-write migrations, edit the schema and regenerate.

4. Fill in secrets as you go

Modules run with sensible no-ops until you add credentials, you can sign up and click around before configuring anything. When you're ready, open apps/api/.dev.vars and fill in the keys for the services you use. See Configuration for the full list.

Next steps