<h1 align="center">
<a href="https://prompts.chat">
This file contains domain knowledge about the Cal.diy product and codebase. For coding guidelines and rules, see [`rules/`](rules/).
Loading actions...
<a href="https://prompts.chat">
TypeScript and ESLint rules that MUST be followed when creating, modifying, or reviewing any file under apps/frontend/, including .ts, .tsx, .js, and .jsx files. Also apply when discussing frontend linting, type safety, or ESLint configuration.
risks
This file contains domain knowledge about the Cal.diy product and codebase. For coding guidelines and rules, see rules/.
When a managed event type is created, we create:
teamId set in EventType table)userId set in EventType table)Example: If we create a managed event type and assign Alice and Bob, three rows will be inserted in the EventType table (1 parent + 2 children).
Important: Only child managed event types can be booked.
Both organizations and teams are stored in the Team table:
isOrganization set to trueparentId set (pointing to the organization)There are two types of OAuth clients:
| Type | Table | Purpose |
|---|---|---|
| OAuth client | OAuthClient | Allows 3rd party apps to connect users' cal.com accounts |
| Platform OAuth client | PlatformOAuthClient | Used by platform customers integrating cal.com scheduling directly in their platforms |
If someone says "platform OAuth client" they mean the one in the PlatformOAuthClient table.
The whole repository is a monorepo. The main web app is in apps/web folder.
When setting up local development database, it creates test users. The passwords are the same as the username:
free:freepro:proControl logging verbosity by setting NEXT_PUBLIC_LOGGER_LEVEL in .env:
Cal.diy events in Google Calendar can be identified by checking if the iCalUID ends with @Cal.diy (e.g., [email protected]). This identifier is used to distinguish Cal.diy bookings from other calendar events for data storage and privacy purposes.
apps/web/modules/event-types/views/event-types-listing-view.tsxapps/web/modules/bookings/views/bookings-view.tsxRefer to the DataTable guide at packages/features/data-table/GUIDE.md for implementation patterns and best practices.
Reuse existing code in packages/features/bookings/lib/getLuckyUser.ts which handles:
Check if existing functions can be extended before creating new implementations.
The calendar cache system follows specific patterns in packages/features/calendar-cache-sql. When implementing provider-specific calendar cache services (like for Outlook/Office365), place the provider-specific code in the corresponding provider directory (e.g., packages/app-store/office365calendar).
The OpenAPI specification at docs/api-reference/v2/openapi.json is auto-generated from NestJS controllers. Manual edits will be wiped out.
To make persistent changes to API documentation, use NestJS decorators (@ApiQuery, @ApiOperation, etc.) in the controller files at apps/api/v2/src/modules/*/controllers/*.controller.ts.
Workflows and webhooks are two completely separate features in Cal.diy with different implementations and file structures:
packages/features/ee/workflows/lib/constants.tsWhen working on workflow triggers, do not reference or use webhook trigger implementations - they are distinct systems.