Run it locally
The commands that take you from an empty folder to the app, the API and an admin account running on your machine.
Updated · 3 min read
You can have the starter running on your machine in about fifteen minutes. You need Node.js 24, pnpm and Docker, then six commands: copy, install, configure, start the database, migrate and run.
Before you start
- Node.js 24 or later. Check with
node --version. Older versions print an "Unsupported engine" warning and aren't supported. - pnpm through Corepack, which ships with Node 24:
corepack enable. - Docker with Docker Compose, for the local database. Docker Desktop includes both.
- The GitHub CLI (
gh) if you want to create your copy in one command.
Stripe, Loops and PostHog are optional. The app runs without them.
Get the code and install
Create a private repository from the template and clone it:
gh repo create my-app --private --template dougwithseismic/react-saas-starter --clone
cd my-app
Without the GitHub CLI, open the repository on GitHub, click Use this template → Create a new repository, make it private, then git clone it.
Install every workspace:
corepack enable && pnpm install
pnpm's version is pinned in package.json, so Corepack fetches the right one. The install also sets up git hooks that lint on commit and type-check on push.
Configure and start the database
Copy the example settings for the API and the web app:
cp apps/server/.env.example apps/server/.env && cp apps/web/.env.example apps/web/.env
Open apps/server/.env and replace BETTER_AUTH_SECRET with a fresh secret:
openssl rand -base64 48
Leave everything else as it is. The defaults point at the local database on port 5433, the web app on 4300 and the API on 4301. The .env files are already in .gitignore; never commit them.
Start Postgres 17 in Docker, then create the tables:
docker compose up -d --wait
DATABASE_URL=postgresql://starter:starter@localhost:5433/starter pnpm db:migrate
The migration ends with "migrations applied successfully".
Run it
pnpm dev
This starts the web app and the API together. Open http://localhost:4300/health/ready: it says {"status":"ready"} once the API can reach the database. The interactive API reference is at http://localhost:4300/docs/api.
Open http://localhost:4300/sign-up and create your account. Without Loops, no emails are sent and you can sign in straight away.
Make yourself an admin
The admin role can't be granted through the app, so the first admin is set in the database. In a second terminal, with your own email:
docker compose exec postgres psql -U starter -d starter -c "UPDATE \"user\" SET role = 'admin' WHERE email = 'you@example.com';"
It prints UPDATE 1. Reload the app and Admin appears in the sidebar. From then on you can make other people admins, or read-only viewers, in Admin → Users.
Then open Admin → Pages and click Install site template. It adds the home page, pricing, features, blog, guides, changelog and legal pages, and publishes them. Open http://localhost:4300 to see the site. See Edit pages in place for the editor.
Make it yours
- The name. The marketing copy lives in the pages you installed, so change it in the editor. The product name also appears in a handful of files in the web app.
- Plans and prices. Plan names, the prices shown and what each plan unlocks are in
packages/contracts/src/billing.ts. The amounts charged come from Stripe. See Plans and billing.
Before every deploy, run pnpm verify. It runs the linter, the type checks, the unit tests and the production builds.
If something goes wrong
| What you see | What to do |
|---|---|
| Port 5433 is already allocated | Another Postgres is using it. Change the left side of 5433:5432 in compose.yaml, and the port in DATABASE_URL in apps/server/.env and in the migrate command. |
pnpm db:migrate can't connect | The database isn't up yet. Run docker compose ps and wait for "healthy". |
| The API stops at start-up with a validation error | A required setting is missing or malformed in apps/server/.env. The error names it under path. |
http proxy error lines when pnpm dev starts | The web app started before the API. They stop once the API is up. |
/admin says you can't open it | Run the admin step again with the exact email you signed up with, then reload. |
Something unclear or missing? Ask us and we'll answer, then fix the page.


