Documentation
Build and Development

Build and Run

Run the app locally and configure the environment. The app uses real Supabase data only.

Prerequisites

You need Node.js 18+ and npm (or pnpm/yarn). A GitHub or local clone of the repository is required. Configure Supabase (and optionally Stripe) for auth, database, and billing.

Quick setup

From the project root:

  1. Clone the repo (if you haven't already).
  2. npm install
  3. Copy env.example to .env.local.
  4. Fill in Supabase URL and keys in .env.local (required for auth and data). Add other API keys as needed.
  5. npm run dev
  6. Open http://localhost:3000. Visit /demo or /dashboard to use the app.

Scripts

Main npm scripts:

  • npm run dev — Start the Next.js dev server (Turbopack). Default port 3000.
  • npm run build — Production build.
  • npm run start — Run the production server after build.
  • npm run lint — Run ESLint.
  • npm run mcp — Run the Cedar MCP server (for AI agents).
  • npm run blog:agent — Run the blog content agent.

For more details, see the Scripts doc.

Key environment variables

Required for auth and data:

  • NEXT_PUBLIC_SUPABASE_URL / NEXT_PUBLIC_SUPABASE_ANON_KEY / SUPABASE_SERVICE_ROLE_KEY — Supabase project; middleware protects dashboard and onboarding.
  • OPENAI_API_KEY — Used for audit pipeline, probes, and agents.
  • STRIPE_* — For billing (checkout, webhook, price IDs).

Full list: Environment Variables.

Troubleshooting

Port already in use

Use npm run dev -- -p 3002 (or dev:3002 if configured) to run on another port.

Missing env / build errors

Ensure .env.local exists and required keys are set. For build-only, you can leave optional keys empty; the app may log warnings but should still build.

Audit or API errors

Check that OpenAI, Firecrawl, and any other API keys used by the audit pipeline are valid. See Environment Variables and the repo env.example.