Get started

Quickstart

Run it on your machine and check a change.

  1. Install the dependencies.

    Terminal
    npm install
  2. Create the local database. It applies every migration to a local copy of D1.

    Terminal
    npm run db:migrate:local
  3. Add local secrets. Create .dev.vars next to package.json.

    .dev.vars
    EDIT_PASSCODE=choose-a-long-passcode
  4. Start the app and open http://localhost:3000.

    Terminal
    npm run dev

Checks before a change

Terminal
npm run typecheck
npm run lint
npm run build

Development

Terminal
npm ci
npm run db:migrate:local
npm run dev

Validation

Terminal
npm run cf-typegen
npm run typecheck
npm run lint
npm audit --audit-level=high
npm run build:cloudflare
npx wrangler deploy --dry-run

Cloudflare Workers Builds can use the repository root with npm run build:cloudflare as its build command and npx opennextjs-cloudflare deploy as its deploy command. The shared editor shell is committed under vendor/, so no sibling repository checkout is required.

Last updated 2 November 2026