This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
# Install dependencies
pnpm install
# Development (runs all apps except email dev server)
pnpm dev
# Focused development
pnpm dev:app # App + Auth + MailDev + Prisma Studio
pnpm dev:auth # Auth + MailDev + Prisma Studio
pnpm dev:web # Web marketing site only
pnpm dev:email # Email template preview server
# Database
pnpm dev:setup # Docker up + migrate + seed
pnpm dev:nuke # Tear down Docker volumes
pnpm --filter @propsto/data db-migrate # Create new migration
pnpm --filter @propsto/data db-studio # Open Prisma Studio
# Build & Checks
pnpm build # Build all apps/packages
pnpm health # Lint + type-check workspace
pnpm lint
pnpm type-check
pnpm format # Prettier with sorted imports
# Testing
pnpm test # Vitest unit/integration tests
pnpm setup:e2e # Install Playwright browsers (one-time)
pnpm e2e # Run Playwright E2E suitesApps (Next.js 16 + React 19):
apps/app- Main authenticated product experience (port 3000)apps/auth- Auth.js identity/onboarding flows (port 3002)apps/web- Marketing site (port 3001)apps/docs- GitBook-backed documentation
Packages:
@propsto/data- Prisma schema, migrations, database client, and repository layer@propsto/constants- Environment validation via@t3-oss/env-core, exportsconstServerandconstClient@propsto/email- React Email templates, Resend/Nodemailer transport, MailDev for local dev@propsto/ui- Design system using shadcn/ui + Atomic Design (atoms/molecules)@propsto/config- Shared ESLint configs and TypeScript configs@propsto/logger- Structured logging helpers
E2E Testing:
e2e/app- Playwright tests for authenticated appe2e/auth- Playwright tests for sign-in/onboarding
Database Access:
- Prisma Client is instantiated only in
packages/data/db.ts - Repository functions live in
packages/data/repos/*.tsand export typed operations - ESLint enforces that
@prisma/clientimports are restricted todb.tsanddbimports are restricted to repo files
Environment Variables:
- Defined and validated in
packages/constants/server.ts(server) andclient.ts(client) - All env vars must pass Zod validation before app starts
- Key vars:
DATABASE_URL,AUTH_SECRET,AUTH_URL,PROPSTO_ENV,EMAIL_FROM
UI Components:
- Atoms: Basic shadcn/ui primitives (
packages/ui/atoms/) - Molecules: Composed components (
packages/ui/molecules/) - Tailwind CSS 4 with config in
packages/ui/tailwind.config.ts
Auth:
- Auth.js (next-auth beta) with Prisma adapter
- Supports email/password + Google OAuth
- Auth routes handled in
apps/auth, shared session across subdomains viaPROPSTO_HOST
Option A: Localhost (simpler, no hosts file needed)
Set PROPSTO_HOST="localhost" and hostname vars to "localhost" in .env:
http://localhost:3000- Product apphttp://localhost:3002- Auth apphttp://localhost:3001- Marketing site
Option B: Custom domain with subdomains (enables SSO testing)
After running sudo pnpm setup:hosts:
http://app.props.local:3000- Product apphttp://auth.props.local:3002- Auth apphttp://props.local:3001- Marketing site
Shared services (both options):
http://0.0.0.0:1080- MailDev inboxhttp://localhost:5555- Prisma Studio
The restrict-import local rule enforces:
PrismaClientcan only be imported inpackages/data/db.tsdbfrom@propsto/datacan only be imported inpackages/data/repos/**/*.ts
- Unit/integration tests use Vitest
- E2E tests use Playwright with
start-server-and-testto spin up apps - E2E runs against built apps (
pnpm buildrequired first)