Cal.com architecture.
Cal.com is an open-source scheduling platform. Nodeway mapped the calcom/cal.com repository at commit ae027bb, from 13 November 2026, and found 4,403 source files, 9,479 functions, classes and components, 344 routes and 101 database tables. This page is drawn from that map.
- Source files
- 4,403
- Functions and classes
- 9,479
- Confirmed calls
- 10,821
- Routes
- 344
- Tables
- 101
How the code is laid out
Most of it is TypeScript: 4,355 files of 4,403, followed by JavaScript (36), Shell (9) and PHP (1).
The repository is split into 117 packages: folders with their own manifest, such as a package.json, pyproject.toml or go.mod. The largest are apps/web (838 files), packages/features (767 files), packages/app-store (727 files), apps/api (552 files), apps/api/v2 (551 files) and packages/trpc (398 files).
These are its top-level folders by number of source files, with 7 more files at the root. The biggest ones show their own largest folders underneath.
- packages/2,973 files4 routes · 101 tables
- features/package767 files
- app-store/package727 files
- trpc/package398 files
- platform/348 files4 routes · 1 table
- lib/package237 files
- ui/package174 files
- apps/1,397 files338 routes
- web/package838 files162 routes
- api/package552 files175 routes
- docs/package7 files1 route
- scripts/15 files
- example-apps/credential-sync/package6 files2 routes
- pages/3 files2 routes
- lib/1 file
- __checks__/2 files
- deploy/2 files
- codespaces/1 file
- .snaplet/1 file
Where the code starts
Nodeway looked for files that define a main function, and for files named like a starting point (main, server, app, cli and similar) that at most one other file imports, then for index files that nothing imports. Ranked that way, then by how many files each one reaches through its imports:
| File | Reaches |
|---|---|
| apps/api/v2/src/main.ts | 1,200 files |
| scripts/seed.tsdefines main | 101 files |
| scripts/seed-app-store.tsdefines main | 93 files |
| packages/prisma/delete-app.tsdefines main | 11 files |
| packages/embeds/embed-core/src/embed-iframe.tsdefines main | 10 files |
| packages/platform/libraries/scripts/postpublish.jsdefines main | 1 file |
Routes
Nodeway found 344 routes, 79 of them pages, and linked 234 to the function that handles them. The rest by HTTP method: GET 106, POST 74, ALL 45, DELETE 21, PATCH 18, PUT 1. Most are under apps/api (175), apps/web (162) and packages/platform (4).
Some of them
| Route | Method |
|---|---|
| /v2/megetMe · apps/api/v2/src/platform/me/me.controller.ts | GET |
| /healthgetHealth · apps/api/v2/src/app.controller.ts | GET |
| /api/ipGET · apps/web/app/api/ip/route.ts | GET |
| /api/meGET · apps/web/app/api/me/route.ts | GET |
| /v2/slotsgetAvailableSlots · apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/slots.controller.ts | GET |
| /api/csrfGET · apps/web/app/api/csrf/route.ts | GET |
| /api/linkGET · apps/web/app/api/link/route.ts | GET |
| /api/logoGET · apps/web/app/api/logo/route.ts | GET |
Data model
Nodeway found 101 database tables, defined with Prisma. Code in the repository reads or writes 80 of them. The most used:
| Table | Used by |
|---|---|
| User45 columns · links to Profile and Team · packages/prisma/schema.prisma | 162 read81 write |
| Credential12 columns · links to App, DelegationCredential and Team · packages/prisma/schema.prisma | 94 read75 write |
| Booking40 columns · links to DestinationCalendar, EventType and User · packages/prisma/schema.prisma | 123 read44 write |
| EventType85 columns · links to Profile, Schedule and SecondaryEmail · packages/prisma/schema.prisma | 102 read32 write |
| Membership8 columns · links to Role, Team and User · packages/prisma/schema.prisma | 65 read11 write |
| Team33 columns · links to PlatformOAuthClient · packages/prisma/schema.prisma | 54 read20 write |
| Schedule4 columns · links to User · packages/prisma/schema.prisma | 26 read14 write |
| Profile7 columns · links to Team and User · packages/prisma/schema.prisma | 23 read13 write |
One request, traced
Nodeway followed PATCH /v2/atoms/event-types/:eventTypeId from its route to the code that handles it, then along confirmed calls until it reached the Schedule table.
- PATCH /v2/atoms/event-types/:eventTypeIdroute · apps/api/v2/src/modules/atoms/controllers/atoms.event-types.controller.ts
- updateAtomEventTypemethod · apps/api/v2/src/modules/atoms/controllers/atoms.event-types.controller.ts:143
- updateEventTypemethod · apps/api/v2/src/modules/atoms/services/event-types-atom.service.ts:128
- checkCanUpdateEventTypemethod · apps/api/v2/src/platform/event-types/event-types_2024_06_14/services/event-types.service.ts:328
- checkUserOwnsSchedulemethod · apps/api/v2/src/platform/event-types/event-types_2024_06_14/services/event-types.service.ts:368
- getScheduleByIdAndUserIdmethod · apps/api/v2/src/platform/schedules/schedules_2024_06_11/schedules.repository.ts:99
- Scheduletable · read here
The most-called code
Ranked by how many different functions call each one, counting only calls the analyzer could confirm from the code. These are often the helpers worth reading first.
| Function | Callers |
|---|---|
| useLocalehook · packages/lib/hooks/useLocale.ts | 566 |
| classNamesfunction · packages/ui/classNames.ts | 281 |
| cnfunction · packages/coss-ui/src/lib/utils.ts | 227 |
| safeStringifyfunction · packages/lib/safeStringify.ts | 157 |
| showToastfunction · packages/ui/components/toast/showToast.tsx | 110 |
| GetUserfunction · apps/api/v2/src/modules/auth/decorators/get-user/get-user.decorator.ts | 95 |
| _generateMetadatafunction · apps/web/app/_utils.tsx | 62 |
| getAppKeysFromSlugfunction · packages/app-store/_utils/getAppKeysFromSlug.ts | 56 |
Open this repo in Nodeway
Nodeway is a desktop app that draws this map on your own computer, so you can click into any folder, read the code beside the map and trace a request yourself. Clone the repository:
git clone https://github.com/calcom/cal.com.git- Install Nodeway for macOS, Windows or Linux: the getting started guide has every installer.
- Open the cloned folder. The first map is drawn on your machine and nothing is uploaded.
- Search for
useLocaleand trace what it calls, or pick a route and follow it to the database.
New to reading a codebase this size? See how to understand a large codebase and how to read a call graph.
Questions
What language is Cal.com written in?
Mostly TypeScript: 4,355 of its 4,403 source files at commit ae027bb, then JavaScript with 36.
Where does the Cal.com code start?
The entry point that reaches the most code is apps/api/v2/src/main.ts, which leads to 1,200 files through its imports.
How many routes does Cal.com have?
Nodeway found 344 routes, 234 of them linked to a handler. The most are under apps/api.
What database tables does Cal.com use?
101 tables, defined with Prisma. The most used are User, Credential and Booking.
How this page was made
Generated from a map Nodeway's analyzer (version 18) made of calcom/cal.com at commit ae027bb, committed on 13 November 2026. Tests, dependencies and build output are mostly left out. A call counts only when the analyzer could confirm its target from the code, so real totals are higher. The project will have changed since.