Chapter II
Welcome to the `Cal.diy` Codebase
Cal.diy is the MIT-licensed, community-maintained fork of Cal.com with enterprise-only code stripped out. It's a Yarn/Turborepo monorepo: apps/web is the Next.js scheduling app, apps/api/v2 is a NestJS public REST API, and most business logic (booking creation, availability, calendar sync) lives in shared packages/features and packages/app-store libraries consumed by both. Start by tracing a booking end-to-end — it touches the booker UI, an API route, a DI-resolved service, calendar/video integrations, and outbound webhooks.
Booking creation: from `Booker` UI to calendar sync and webhooks
Slot availability service…ewer/slots/getSchedule.handler.ts
Booker UI…les/bookings/hooks/useBookings.ts
`/api/book/event` routeapps/web/pages/api/book/event.ts
`RegularBookingService`…/service/RegularBookingService.ts
`Booking` persistence…handleNewBooking/createBooking.ts
`EventManager`…ures/bookings/lib/EventManager.ts
Webhook dispatch…kings/lib/handleWebhookTrigger.ts
App Store integrations…ures/bookings/lib/EventManager.ts