Start here if this is your first project with the boilerplate. The goal is to get a working local app first, then enable Stripe, AI, B2B workspaces, analytics, and production-only services in small steps.

Recommended first-project path
  1. Local foundation — install dependencies, run npm run init, connect Supabase, then start npm run dev.
  2. Authentication check — request a magic link or OTP from /login and confirm your admin email reaches /admin-dashboard.
  3. Billing check — add Stripe test keys, run stripe listen, complete one test checkout, then verify credits in credit_transactions.
  4. Product choice — choose businessModel (b2c or b2b) and billingModel (subscription, license, or hybrid) in config/app.ts.
  5. Production hardening — set legal metadata, salts, webhook secrets, email provider keys, analytics consent settings, and deployment env vars before launch.
Prerequisites
  • Node.js 20+ and npm
  • A Supabase project (free tier works) — you'll need its direct Postgres connection string for the wizard
  • A Stripe account (test mode is fine) for billing
  • At least one LLM provider key (OpenAI / Anthropic / Google) — OpenAI is required if you use RAG embeddings
  • An email provider account (Brevo or Mailjet) for transactional email
  1. Clone the repository

    Download the boilerplate from the provided repository link and open it in your code editor.

  2. Install dependencies

    Run npm install from the project root to install all required packages.

  3. Run the setup wizard

    Execute npm run init to launch the interactive configuration wizard. It will guide you through all steps to configure every service.

  4. Start the development server

    Run npm run dev to start the application at http://localhost:3777. Open it in a browser — you should see the landing page below, ready to be customized.

Default Boilerplate Stack landing page running at localhost:3777
The full landing page on first run — hero, features, pricing, testimonials, FAQ, and newsletter sections are wired in by default.
If you want to... Read next First verification
Run locally Automatic Setup http://localhost:3777 renders with no console errors
Configure B2B teams B2C vs B2B and User Onboarding A new B2B user is auto-bootstrapped into a workspace at signup via ensureWorkspaceForUser, then completes checkout against that workspace account
Sell subscriptions or licenses Payments & Billing Stripe test checkout uses the price_... IDs from config/pricing.ts and grants credits through the ledger
Enable AI and RAG AI Integration One chat request streams and decrements exactly provider-reported tokens
Prepare production Deployment, Data Privacy & GDPR, and Error Logs /api/health, auth, checkout, email, logs, and scheduled jobs all pass smoke tests

New project configuration checklist

Use this checklist after npm run init. It covers the files and dashboards that usually matter before the first real deployment.

Area Where to configure What to decide First check
Brand and URLs config/app.ts, .env.local App name, production URL, support/contact emails, legal company metadata Landing page and legal pages show your real brand, not placeholders
Business model config/app.ts businessModel: 'b2c' for personal accounts or 'b2b' for workspaces B2B checkout targets an auto-bootstrapped workspace account
Billing model config/app.ts subscription, license, or hybrid Pricing page shows only the purchase types you intend to sell
Stripe prices config/pricing.ts + Stripe Dashboard Plans, credit packs, licenses, currencies, test/live price_... IDs, payment methods Test checkout uses a configured Price ID and webhook grants credits via add_credits
Supabase Supabase Dashboard, .env.local, supabase/schema.sql, supabase/cms-schema.sql Project URL, publishable key, secret key, database schema, storage bucket /api/health passes and auth signup creates profile/account rows
Email .env.local, Brevo/Mailjet dashboard Provider, sender identity, newsletter list, verified domain Magic-link email arrives and transactional fallback queues failures
AI config/ai.ts, provider API keys Enabled providers, model IDs, agent defaults, RAG embedding provider A chat stream completes and credits decrease by provider-reported tokens
Jobs and cron JOBS_SECRET_KEY, Supabase Vault, /admin-dashboard/jobs Jobs API URL, pg_cron/pg_net, retries, deletion and email queue handlers Run a safe job manually and confirm a successful job_runs row
Privacy and compliance LEGAL_*, CMS legal pages, consent settings, GDPR pages Company details, processor list, cookie categories, export/deletion policy NEXT_PUBLIC_INDEXABLE=true only after placeholders are gone
Production observability LOGS_ENABLED, LOGS_SALT, LOGS_RETENTION_DAYS, Upstash Redis Error log dashboard, IP hashing salt, retention, production rate limiting /admin-dashboard/logs is reachable only when enabled
Interactive Setup

The npm run init wizard will guide you through all configuration steps including Supabase setup, Stripe integration, and more.

Verify your setup
  • http://localhost:3777 renders the landing page with no console errors
  • GET /api/health returns OK
  • Request a magic link on /login and complete sign-in (link or 6-digit code)
  • The email whose address you set as admin_email can reach /admin-dashboard
  • With stripe listen running, a test checkout grants credits and a row appears in credit_transactions

What the wizard configures

Step Description
1. Branding App name, description, production URL
2. Business Model B2C (individuals) or B2B (teams)
2b. Billing & Currency Subscription/license/hybrid, default currency (EUR/USD/GBP/CAD/CHF)
2c. Features Newsletter, blog, prelaunch mode
3. Admin Email Super admin account
4. Contact Info Contact and support emails
5. Social Links Twitter, GitHub, LinkedIn, Discord
6. Legal Info Company name, address, registration
7. Email Provider Choose Brevo / Mailjet / noop, sender name & address, newsletter list
8. Integrations Crisp, GTM, Meta Pixel, Stripe mode
9. Supabase Project URL, keys, connection string
10. Database Automatic schema creation + CMS media storage bucket
11. Files Creates .env.local, config/app.ts, updates config/pricing.ts currency