Installation
Clone the Prood monorepo, install dependencies, migrate the database, and start development servers.
Prood uses a pnpm + Turborepo monorepo. All applications live under apps/ and shared libraries under packages/.
Prerequisites
Install the following before proceeding:
- Node.js 24+ — required by all apps (
engines.node >= 24) - pnpm 10 — package manager (
corepack enableornpm i -g pnpm) - Neon Postgres — provision a database and copy the connection string
Optional services for full functionality:
| Service | Used by | Purpose |
|---|---|---|
| Upstash Redis | apps/checkout | Checkout session persistence |
| Vercel Blob or S3 | @prood/storage-* | Product image uploads |
| Stripe / Easypay / Ifthenpay | Payment providers | Live payment flows |
Step 1 — Clone and install
git clone <your-repo-url>
cd prood-commerce-platform
pnpm installThis installs all workspace packages and runs postinstall hooks (including fumadocs-mdx for the docs app).
Step 2 — Environment configuration
Copy the example env file and fill in required values:
cp .env.example .env.local
pnpm env:linkAt minimum, set:
DATABASE_URL="postgresql://user:password@host/db?sslmode=require"
BETTER_AUTH_SECRET="<openssl rand -base64 32>"
DEFAULT_TENANT_ORG_ID="org_demo"See Environment variables for the complete reference.
Step 3 — Database setup
Run the combined setup script:
pnpm db:setupThis executes:
| Script | What it does |
|---|---|
pnpm db:migrate | Runs @prood/platform migrations, applies RLS policies, seeds demo catalog |
pnpm db:auth | Pushes Better Auth schema via Drizzle (pnpm --filter storefront db:push) |
Verify the seed
Connect to your database and confirm products exist:
SELECT set_config('app.current_org_id', 'org_demo', false);
SELECT id, name FROM products LIMIT 5;RLS requires app.current_org_id to be set — this is what @prood/commerce withTenant() does automatically.
Step 4 — Start development
pnpm devTurbo runs all apps in parallel. Individual apps can also be started:
pnpm --filter storefront dev # :3000
pnpm --filter dashboard dev # :3002
pnpm --filter checkout dev # :3004
pnpm --filter api dev # :3005
pnpm --filter docs dev # :3003Monorepo structure
Drag to pan · Scroll to zoom
Build and quality scripts
| Command | Description |
|---|---|
pnpm build | Build all apps and packages via Turbo |
pnpm typecheck | TypeScript check across the monorepo |
pnpm lint | ESLint across the monorepo |
pnpm --filter @prood/platform build | Build the platform package only |
Adding UI components
Shared shadcn primitives live in @prood/ui:
pnpm dlx shadcn@latest add button -c packages/uiCommerce-specific components (product grid, cart drawer, checkout stepper, etc.) are in packages/ui/src/components/ and imported as @prood/ui/components/<name>.
Troubleshooting
DATABASE_URL not set
Every app that touches auth or commerce requires DATABASE_URL. Ensure .env.local exists at the repo root and pnpm env:link has been run.
Checkout sessions fail to create
apps/checkout requires Upstash Redis. Set UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN in .env.local. Without Redis, session creation returns 500.
Storefront shows 404 in production
If no tenant matches the request host and DEFAULT_TENANT_ORG_ID is unset, the storefront calls notFound(). In development, it falls back to the demo org.
Auth tables missing
Run pnpm db:auth or the full pnpm db:setup. Auth tables are separate from the commerce schema and must be pushed via Drizzle.