Skip to main content

Main commands

CommandPurpose
npm run devStart the dev server
npm run buildBuild for production
npm run startRun the production build
npm run lintRun ESLint
npm run typecheckRun TypeScript without emitting files
npm testRun the full Vitest suite once
npm run test:watchRun tests in watch mode
npm run e2eRun Playwright smoke tests
npm run e2e:headedRun Playwright with a visible browser
npm run env:checkAudit environment variable readiness

What the repository already tests

Unit and route tests

Vitest covers:
  • payment providers,
  • webhook handlers,
  • AI middleware,
  • rate limits,
  • MDX helpers,
  • auth-related hooks,
  • key route handlers.

DOM tests

Testing Library is used for certain components and hooks such as auth forms, the contact form, the payment hook, and the subscription hook.

End-to-end smoke tests

Playwright is used to verify core public routes.

GitHub Actions CI

The current CI workflow runs on push and pull_request to main, then executes:
  1. npm ci
  2. npm run lint
  3. npm run typecheck
  4. npm test
  5. npm run build
  6. npx playwright install --with-deps chromium
  7. npm run e2e
The build and E2E stages use placeholder env values for services that are not always active in CI.

Pre-deploy checklist

  1. npm run env:check
  2. npm run lint
  3. npm run typecheck
  4. npm test
  5. npm run build
  6. check GET /api/health
  7. verify auth callbacks and webhook URLs with the production domain

Production deployment checklist

CheckWhy it matters
NEXT_PUBLIC_APP_URL is correctIt is used for callbacks and order URLs
Supabase redirect URLs are correctAuth and password reset flows will fail without them
Midtrans or Doku webhook URLs are correctPayments will not finalize subscriptions without working webhooks
SUPABASE_SERVICE_ROLE_KEY is presentBilling, admin, audit, avatar, and persistent rate limits need it
EMAIL_FROM is validEmail will not send correctly if the sender domain is not verified

Deployment target

This repository fits Vercel naturally because it uses Next.js App Router, but it is not locked to Vercel. Whatever platform you choose, you still need:
  • the correct env values,
  • the correct domain,
  • the correct auth redirects,
  • the correct webhook endpoints.

Lightweight post-deploy checks

After deployment, check at least:
  • the landing page,
  • login and signup,
  • the dashboard,
  • the billing flow,
  • one webhook test,
  • GET /api/health.
If you intentionally enable only part of the boilerplate, your testing and health checks should focus on the features that actually remain active.
If you want manual testing playbooks by feature, read Testing recipes. If your main deployment target is Vercel, continue to Vercel deployment.