Skip to content

Installation

Step-by-step setup for local development and buyer fresh install. See Package Structure if you received a marketplace ZIP.

Buyer checklist: clone/unzip → configure .env → migrate database → run API → run frontend → use mock mode first → enable real providers when ready.

Requirements

RequirementVersionNotes
Node.js20+LTS recommended
npm9+Ships with Node
PostgreSQL14+Required for auth and modules
Redis6+Optional — only when QUEUES_ENABLED=true

Mock providers by design

Billing, AI, and email use mock adapters so you can install without Stripe, OpenAI, or SMTP keys. Connect real providers later using the prepared module foundations.

Backend

bash
cd backend   # or launchkit-pro-backend
npm ci
cp .env.example .env

Edit .envrequired before register/login:

  • DATABASE_URL — see Database Setup
  • JWT_ACCESS_SECRET and JWT_REFRESH_SECRET — replace placeholders with long random strings
  • FRONTEND_URL=http://localhost:3000 (frontend origin for CORS)
  • QUEUES_ENABLED=false (simplest setup; no Redis workers)

Then:

bash
npx prisma generate
npx prisma migrate deploy
npm run build
npm run start:prod

Verify:

bash
curl -s http://localhost:4000/health

Do not use npm ci --omit=dev before build

NestJS runs nest build, which needs @nestjs/cli from devDependencies. Use full npm ci, build, then optionally npm prune --omit=dev after a successful build on production servers.

Frontend

bash
cd frontend   # or launchkit-pro-frontend
npm ci
cp .env.example .env.local

Edit .env.local:

env
NEXT_PUBLIC_API_URL=http://localhost:4000

Then:

bash
npm run build
npm run start

Open http://localhost:3000 → register → log in → dashboard.

If /auth/register returns 500, check backend terminal logs, JWT secrets, migrations, and DATABASE_URL. See Troubleshooting and Deployment Gotchas.


1. Clone or extract source

From git:

bash
git clone <your-launchkit-pro-backend-repo> launchkit-pro-backend
git clone <your-launchkit-pro-frontend-repo> launchkit-pro-frontend

From a marketplace ZIP, use the included backend/ and frontend/ folders.

Optional: launchkit-pro-docs (this site — can be read offline from the package without deploying a public docs URL).


2. PostgreSQL (before migrations)

Create database and app user — see Database Setup for grants, pgAdmin fields, and permission notes.

Placeholder example:

sql
CREATE USER launchkit_user WITH PASSWORD 'replace_with_secure_password';
CREATE DATABASE launchkit_app OWNER launchkit_user;
GRANT ALL PRIVILEGES ON DATABASE launchkit_app TO launchkit_user;

3. Install dependencies

Backend: npm ci (recommended) or npm install
Frontend: npm ci or npm install


4. Copy environment files

Backend: cp .env.example .env
Frontend: cp .env.example .env.local

See Environment Variables for the full reference.


5. Prisma generate and migrate

From backend folder:

bash
npx prisma generate
npx prisma migrate deploy
CommandWho should use it
migrate deployBuyers, production, RC/fresh install
migrate devDevelopers changing schema locally (may need shadow DB — see Database Setup)

TIP

Never run prisma migrate dev on production. Buyers should always use migrate deploy.


6. Start the backend

Development:

bash
npm run start:dev

Production-style:

bash
npm run build
npm run start:prod

7. Start the frontend

Development:

bash
npm run dev

Production-style:

bash
npm run build
npm run start

8. (Optional) Run buyer docs locally

This documentation ships in your package. You do not need to deploy a public docs site to develop your product.

bash
cd launchkit-pro-docs   # or docs/ in buyer ZIP
npm ci
npm run dev

Local preview: http://localhost:5173 (VitePress).


Production build order (backend)

bash
npm ci
npx prisma generate
npx prisma migrate deploy
npm run build
npm prune --omit=dev

Checklist

  • [ ] PostgreSQL database created with correct user permissions
  • [ ] .env and .env.local configured (not committed)
  • [ ] JWT secrets set in backend .env
  • [ ] npx prisma generate and migrate deploy applied
  • [ ] GET /health returns OK
  • [ ] Frontend loads; register and login work
  • [ ] QUEUES_ENABLED=false unless Redis is configured (Redis & Queues)

See Troubleshooting if anything fails.

LaunchKit Pro by LaunchKit Labs — buyer documentation. No secrets in this site.