Skip to content
All guides

Installation

Clone the private repository, configure the environment, apply the database migrations and run every documented check.

Updated 2026-10-25

Prerequisites

Bun 1.4 or newer. The repository ships a Bun lockfile and the documented scripts assume Bun.

A purchase of the kit, and the GitHub account you connected after paying. The source is cloned from a private repository your account has read access to.

A Cloudflare account for Workers hosting and the D1 database.

A payment provider account for checkout (Dodo Payments, Lemon Squeezy or Stripe). Test mode keys work before the account is verified.

Get the source and install the dependencies

After paying, open the customer portal from the Dodo Payments receipt, click Connect next to GitHub access, and accept the invitation GitHub sends. Your account then has read access to the private repository.

Clone it into a new project and point the remote at a repository of your own, so your product has its own history and git pull from the original still brings in the updates.

  1. Clonegit clone the private repository the invitation names, into a directory named after your product.
  2. Keep the updatesRename the original remote to upstream, add your own repository as origin, and merge upstream when a release lands.
  3. Installbun install
terminalbash
git clone <the repository the invitation names> my-product
cd my-product
git remote rename origin upstream
git remote add origin <your own repository>
bun install

Configure the environment

Copy the example environment file and fill in the values. The variables the checkout and the authentication flows need are listed below, and .env.example documents every variable the application reads. None of them are required for a local run except the ones the feature needs.

The application refuses to start a production deployment without an explicit payment environment, so a live charge is never enabled by accident.

  • DODO_PAYMENTS_API_KEY: the Dodo Payments API key. Required for checkout.
  • DODO_PAYMENTS_ENVIRONMENT: test_mode or live_mode. Required in production.
  • DODO_PAYMENTS_RETURN_URL and DODO_PAYMENTS_CANCEL_URL: first party HTTPS URLs.
  • DODO_PAYMENTS_PORTAL_RETURN_URL: where the customer portal returns to.
  • DODO_PAYMENTS_WEBHOOK_KEY: the signing secret from the Dodo Payments dashboard.
  • PAYMENTS_PROVIDER, EMAIL_PROVIDER and AUTH_PROVIDERS: which provider each concern uses. The payments and authentication guides list the options.
  • NEXTAUTH_SECRET: the session signing secret.
  • GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET: only needed to keep Google sign in enabled.

Apply the database migrations

The migrations live in the migrations/ directory. Wrangler creates the local D1 database when the first migration is applied.

terminalbash
bun run db:migrate:local

Run the checks

A clean checkout should pass every documented check before you change anything.

terminalbash
bun run lint
bun run typecheck
bun run test
bun run build