This guide walks you through everything needed to run both the public marketing site and the authenticated ERP dashboard on your local machine. By the end you’ll have a fully functional development environment with live Supabase connectivity, seeded test data, and hot-module replacement running atDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ency07/B2B/llms.txt
Use this file to discover all available pages before exploring further.
http://localhost:3000.
Prerequisites before you begin:
- Node.js 20.x or later — 22.x LTS is recommended for best performance
- npm 10+ — ships with Node.js 22
- A Supabase project — either a local Supabase instance (
npx supabase start) or a free cloud project at supabase.com
Hardware Requirements
| Resource | Dev (Minimum) | Dev (Recommended) | Prod (Minimum) | Prod (Recommended) |
|---|---|---|---|---|
| RAM | 8 GB | 16 GB | 2 GB | 4 GB |
| CPU | 4 cores | 8 cores | 2 cores | 4 cores |
| Storage | 10 GB free | 20 GB SSD | 20 GB SSD | 40 GB SSD |
| Node.js | 20.x | 22.x | 20.x LTS | 22.x LTS |
| OS | macOS / Linux / Windows (WSL2) | — | — | — |
The primary performance bottleneck is Supabase (Postgres + storage), not the Next.js frontend. For high-traffic workloads (>10k req/min), use Vercel Pro or horizontal scaling with containers.
Steps
Install dependencies
^ ranges — ensuring every developer and CI run resolves identical packages. A full install takes roughly 60–90 seconds on a cold cache. Do not run npm update without first consulting docs/15_frontend/DEPENDENCY_GUIDE.md.Key pinned versions installed:next16.2.9 ·react19.2.4 ·typescript5.9.3@supabase/supabase-js2.108.2 ·zod4.4.3 ·vitest3.1.3tailwindcss4.3.1 ·framer-motion12.40.0 ·recharts3.8.1
Configure your environment
Copy the example file to create your local environment:Then open You can find
.env.local and fill in the four required variables:NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, and SUPABASE_SERVICE_ROLE_KEY in your Supabase project dashboard under Project Settings → API.Run database migrations
Apply all SQL migrations to your Supabase project:This executes every file in
supabase/migrations/ in timestamp order. Make sure .env.local is pointing to the correct Supabase project before running. After the command completes, verify integrity:Seed test data (optional)
Populate the database with two pre-configured tenants (To remove all seeded data later:
acme and apex) plus test users for each role:Start the development server
/— Public marketing landing page/wizard— Lead generation multi-step wizard/portal— Public tenant portal/dashboard— Authenticated ERP dashboard (requires login)
Available npm Scripts
| Script | Command | Description |
|---|---|---|
dev | next dev | Start dev server with standard HMR |
dev:turbo | next dev --turbo | Start dev server with Turbopack (faster HMR) |
build | next build | Production build |
start | next start | Serve the production build |
test:unit | vitest run | Run all unit tests once |
test:watch | vitest | Run tests in interactive watch mode |
test:coverage | vitest run --coverage | Run tests with V8 coverage report |
lint | eslint | Run ESLint across the codebase |
audit:security | npm audit --audit-level=high | Fail on high+ CVEs |
deps:pin | node scripts/pin-versions.js | Re-pin all versions from package-lock.json |