This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is Cal.com (formerly Calendso), an open-source Calendly successor built as a monorepo scheduling infrastructure. It's a TypeScript/Next.js application with:
- Multi-workspace monorepo structure using Yarn workspaces and Turbo
- Prisma ORM with PostgreSQL database
- tRPC for type-safe APIs
- Tailwind CSS for styling
- Multiple apps including web, API v1/v2, and UI playground
# Start development server (requires .env setup)
yarn dev
# Start with database setup (Docker required)
yarn dx
# Run specific workspaces
yarn dev:api # Web + API development
yarn dev:console # Web + Console development
yarn dev:all # All apps development# Run unit tests
yarn test
# Run E2E tests (requires database seeding)
yarn test-e2e
# Run playwright tests
yarn test-playwright
# Open test UI
yarn test:ui# Run Prisma migrations
yarn workspace @calcom/prisma db-migrate # Development
yarn workspace @calcom/prisma db-deploy # Production
# Seed database
yarn db-seed
# Open Prisma Studio
yarn db-studio# Build for production
yarn build
# Start production server
yarn start
# Type checking
yarn type-check
# Linting
yarn lint
yarn lint:fix# Create new app
yarn create-app
# Edit existing app
yarn edit-app
# Build app store
yarn app-store:build- apps/: Main applications
web/: Primary Cal.com web application (Next.js)api/v1/: REST API v1api/v2/: NestJS-based API v2ui-playground/: Component documentation
- packages/: Shared packages
prisma/: Database schema and migrationstrpc/: tRPC router definitionsfeatures/: Feature modules (bookings, auth, etc.)app-store/: Integration appsembeds/: Embedding functionalityemails/: Email templates and utilitiesplatform/: Platform SDK and atoms
- Database schema:
packages/prisma/schema.prisma - Turbo configuration:
turbo.json - Environment setup:
.env.example(copy to.env) - App Store config:
.env.appStore.example(copy to.env.appStore)
Required for basic operation:
DATABASE_URL: PostgreSQL connection stringNEXTAUTH_SECRET: Authentication secret (generate withopenssl rand -base64 32)CALENDSO_ENCRYPTION_KEY: Encryption key (generate withopenssl rand -base64 32)NEXT_PUBLIC_WEBAPP_URL: Application URL
- Unit tests: Vitest (
*.test.ts,*.test.tsx) - E2E tests: Playwright (
playwright/*.e2e.ts) - Test utilities in
tests/libs/ - Mock data in
tests/libs/mockData.ts
- v1 API: Traditional REST endpoints in
apps/api/v1/ - v2 API: NestJS-based modern API in
apps/api/v2/ - tRPC: Type-safe internal APIs in
packages/trpc/
Major features are modularized in packages/features/:
bookings/: Booking flow and managementauth/: Authentication and authorizationee/: Enterprise edition featuresinsights/: Analytics and reportingworkflows/: Automation workflows
- Always run
yarnafter pulling changes to ensure dependencies are updated - Use
yarn dxfor quick local development with Docker-managed PostgreSQL - Database migrations must be run after schema changes
- The monorepo uses Turbo for build orchestration - respect dependency order
- Feature flags and enterprise features are managed through licensing
- Test files should be colocated with source files when possible