Local Setup
The local setup order matters more than most people expect.
Use this order:
- Clerk
- Convex
- Stripe
If you skip the order, the app can look close to working while the paid-access handoff is still broken.
Before you start
Have these ready:
- Node.js LTS
bun- a Clerk account
- a Convex account
- a Stripe account
- a Vercel account for deployment later
- a GitHub account if you plan to use the Build starter-template path later
First local boot
Install the repo and copy the local env template:
bun install
cp apps/web/.env.local.example apps/web/.env.localThen connect the repo to your hosted Convex dev deployment:
bun run dev:convexThat command runs convex dev and writes NEXT_PUBLIC_CONVEX_URL, NEXT_PUBLIC_CONVEX_SITE_URL, and CONVEX_DEPLOYMENT into apps/web/.env.local for your per-developer hosted Convex dev deployment.
Then follow the provider wiring pages in this order:
Once those values are in place, start the local app:
bun run devIf you are actively testing checkout or the purchase-to-access handoff, run the full local environment instead:
bun run dev:fullOpen http://localhost:3000.
Which local command to use
Use these commands intentionally:
bun run dev
bun run dev:full
bun run dev:web
bun run dev:convex
bun run dev:stripebun run devstarts the app locally and keeps your hosted Convex dev deployment syncedbun run dev:fullstarts the app, hosted Convex dev sync, and Stripe webhook forwarding togetherbun run dev:webstarts only the Next.js sidebun run dev:convexconnects or refreshes your hosted Convex dev deployment and keeps the backend syncedbun run dev:stripewaits for hosted Convex dev env values, checks the pinned Stripe CLI projectship-by-sunday, warns withstripe login --project-name ship-by-sundayif the local CLI context drifted, then starts the Stripe listener from the appSTRIPE_SECRET_KEY
This repo does not support Convex’s local backend mode as a separate development mode.
The fastest way to confirm the setup
Once the app boots, validate the basics:
bun run build
bun run stripe:dev:doctorbun run stripe:dev:doctor compares the app Stripe account in apps/web/.env.local against the pinned Stripe CLI project ship-by-sunday. If that profile is missing or points at the wrong account, repair it with:
stripe login --project-name ship-by-sundayThen finish the real flow with Local QA.
What success looks like
You are ready for real customization when:
- the marketing page loads locally
/docsloads locally- you can reach sign-in
- Convex connects cleanly to your hosted dev deployment
- Stripe listener setup does not report account or secret drift
- the app can complete the local QA flow without fake shortcuts
If this breaks
- Auth issues: go to Clerk + Convex Auth
- Checkout/access issues: go to Stripe Checkout + Webhook
- Access still does not appear: go to Troubleshooting Access