Skip to content

Setup & Development

Prerequisites

  • Node.js 22+
  • pnpm (enable via Corepack: corepack enable && corepack prepare pnpm@latest --activate)
  • Docker Desktop (for PostgreSQL and other services)
  • Git

Quick Start

bash
# 1. Clone and install
git clone <repo-url> planner
cd planner
pnpm install

# 2. Start infrastructure (PostgreSQL)
docker compose up -d db

# 3. Set up environment
cp apps/backend/.env.example apps/backend/.env
# Edit .env if needed (defaults work for local Docker)

# 4. Push database schema
cd apps/backend
npx prisma db push
cd ../..

# 5. Start all apps in development mode
pnpm dev

This starts:

Environment Variables

Backend (apps/backend/.env)

env
DATABASE_URL="postgresql://planner:planner@localhost:5432/planner?schema=public"
JWT_SECRET="your-secret-key"
JWT_REFRESH_SECRET="your-refresh-secret-key"
UPLOAD_DIR="./uploads"

Running Individual Apps

bash
# Backend only
pnpm --filter @planner/backend dev

# Frontend only
pnpm --filter @planner/frontend dev

# Website only
pnpm --filter @planner/website dev

# Docs only
pnpm --filter @planner/docs dev

Useful Commands

bash
# Type checking
pnpm --filter @planner/backend typecheck
pnpm --filter @planner/frontend typecheck
pnpm --filter @planner/website build  # website has typecheck in build

# Testing
pnpm --filter @planner/backend test    # 145+ unit tests

# Build
pnpm --filter @planner/backend build
pnpm --filter @planner/frontend build
pnpm --filter @planner/website build
pnpm --filter @planner/docs build

# Lint (entire monorepo)
pnpm lint

# Database schema changes
cd apps/backend
npx prisma db push      # Apply schema to dev DB
npx prisma generate     # Regenerate Prisma client

Docker Development

bash
# Start all services
docker compose up -d

# Rebuild a specific service
docker compose build --no-cache backend

# View logs
docker compose logs -f backend frontend

# Stop everything
docker compose down

Project Scripts

ScriptDescription
pnpm devStart all apps in dev mode
pnpm buildBuild all apps
pnpm lintRun linter across monorepo
pnpm formatFormat code with Prettier