feat: enable microsoft sign ups (#28080)
fix: trigger lingo.dev by removing duplicate value
under progress
wow this worked
migrate schema
fix types
fix import for google login
Add onboarding tests for Azure (Microsoft sign up)
add comments back
fix failing test
fix: update Outlook login configuration and improve type safety in authentication adapter
- Set OUTLOOK_LOGIN_ENABLED to false in .env.example
- Refactor getServerSideProps to directly use samlTenantID and samlProductID
- Update linkAccount method in next-auth-custom-adapter for better type handling
- Remove redundant comment in next-auth-options related to Azure AD email verification
remove log
remove debug log from signin callback in next-auth options
fixup
chore: standardize naming
chore: add primary calendar for outlook, verify email and auto link org for outlook
chore: helper fns
chore: implement cubic feedback
cleanup
chore: implement cubic feedback again
WIP design#
feat: login design
fix: map identity provider names correctly
32px of mt
fix: login UI
fix: type check
fix: fix type check again
chore: update OAuth login tests
fixup
fix: bad import
chore: update tests
fixup
fix: locales test
chore: implement PR feedback and fix minor issues
fix: revert token spreading change
fix: merge conflicts
chore: revert signup view changes
fixup: bring back reverted changes because of merge conflicts
fix: disable email input when microsoft sign in is in progress
chore: implement cubic feedback
cleanup: unused variables
fix: address Cubic AI review feedback (confidence >= 9/10)
- Remove userId (PII) from log payloads in updateProfilePhotoMicrosoft.ts
- Replace text selectors with data-testid in locale.e2e.ts and oauth-provider.e2e.ts
- Restore callbackUrl redirect parameter in signup link in login-view.tsx
- Add data-testid=’login-subtitle’ to login page subtitle element
Co-Authored-By: unknown <>
- fix: use empty alt for decorative icon images in login view
MicrosoftIcon and GoogleIcon are decorative (adjacent to text labels), so they should have empty alt attributes per accessibility best practices.
Co-Authored-By: unknown <>
chore: implement cubic feedback
cleanup
fixup
chore: implement PR feedback
chore: implement feedback
fix: address PR review feedback - type safety and centralize constants
- Replace non-null assertions (!) with proper null checks for OUTLOOK_CLIENT_ID/SECRET
- Replace
as anycasting withRecord<string, unknown>for OAuth profile claims- Remove non-null assertion on account.access_token by adding conditional check
- Centralize Outlook env constants in @calcom/lib/constants alongside MICROSOFT_CALENDAR_SCOPES
- Add explanatory comment for getNextAuthProviderName usage in get.handler.ts
Co-Authored-By: unknown <>
- Revert “fix: address PR review feedback - type safety and centralize constants”
This reverts commit 91ace141e6a28a23deea5897f7f9d6ad80319d84.
chore: implement feedback
chore: cleanup
chore: implement feedback
fix: merge conflicts
fix: revert formatting-only changes in packages/lib/constants.ts
Co-Authored-By: unknown <>
- fix: revert IdentityProvider enum location change in schema.prisma
Co-Authored-By: unknown <>
chore: implement more PR feedback
fix: restore database-derived profileId from determineProfile in OAuth JWT
The profileId regression was identified by Cubic AI (confidence 9/10).
Previously, determineProfile’s returned id was used to set profileId in the JWT via ‘profileResult.id ?? token.profileId ?? null’. A recent refactor changed this to ‘token.profileId ?? null’, which drops the database-derived profile ID. On first OAuth login (or when profile switcher is disabled), token.profileId is likely null, so profileId would incorrectly be set to null even though determineProfile returned a valid profile with an id.
This commit restores the correct priority chain: visitorProfileId ?? token.profileId ?? null
Co-Authored-By: bot_apk apk@cognition.ai
- refactor: revert pure formatting and import reordering changes
Co-Authored-By: rajiv@cal.com sahalrajiv6900@gmail.com
- fix: normalize determineProfile return type to use consistent ‘id’ field
The determineProfile function returned a union type where one branch used ‘id’ and the other used ‘profileId’. This caused TS2339 when destructuring ‘id’ from the result. Normalize the token.upId branch to also return ‘id’ (mapped from token.profileId) so the return type is consistent.
Co-Authored-By: bot_apk apk@cognition.ai
chore: add tests
reveret: profileId changes should be in a separate PR
fix: avoid logging entire existingUser object in OAuth JWT callback
Revert to logging only { userId, upId } instead of the full existingUser object, which contains PII (email, name, identity provider details). This restores the previous safe logging pattern.
Co-Authored-By: bot_apk apk@cognition.ai
- chore: remove profileId related tests
Co-authored-by: amrit iamamrit27@gmail.com Co-authored-by: Devanshu Sharma devanshusharma658@gmail.com Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Sean Brydon sean@cal.com Co-authored-by: bot_apk apk@cognition.ai
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
Cal.com
The open-source Calendly successor.
Learn more »
Discussions · Website · Issues · Roadmap
About the Project
Scheduling infrastructure for absolutely everyone
The open source Calendly successor. You are in charge of your own data, workflow, and appearance.
Calendly and other scheduling tools are awesome. It made our lives massively easier. We’re using it for business meetings, seminars, yoga classes, and even calls with our families. However, most tools are very limited in terms of control and customization.
That’s where Cal.com comes in. Self-hosted or hosted by us. White-label by design. API-driven and ready to be deployed on your own domain. Full control of your events and data.
Recognition
Hacker News
Product Hunt
This project is tested with browserstack
Built With
Contact us
Meet our sales team for any commercial inquiries.
Stay Up-to-Date
Cal.com officially launched as v.1.0 on the 15th of September 2021 and we’ve come a long way so far. Watch releases of this repository to be notified of future updates:
Getting Started
To get a local copy up and running, please follow these simple steps.
Prerequisites
Here is what you need to be able to run Cal.com.
Development
Setup
Clone the repo (or fork https://github.com/calcom/cal.com/fork). The code is licensed under AGPLv3, which requires you to provide source code to users who interact with the software over a network. For commercial use without these requirements, acquire a commercial license
Go to the project folder
Install packages with yarn
Set up your
.envfile.env.exampleto.envopenssl rand -base64 32to generate a key and add it underNEXTAUTH_SECRETin the.envfile.openssl rand -base64 24to generate a key and add it underCALENDSO_ENCRYPTION_KEYin the.envfile.Setup Node If your Node version does not meet the project’s requirements as instructed by the docs, “nvm” (Node Version Manager) allows using Node at the version required by the project:
You first might need to install the specific version and then use it:
You can install nvm from here.
Quick start with
yarn dxDefault credentials created:
free@example.comfreepro@example.comprotrial@example.comtrialadmin@example.comADMINadmin2022!onboarding@example.comonboardingYou can use any of these credentials to sign in at http://localhost:3000
Development tip
Add
export NODE_OPTIONS=“--max-old-space-size=16384”to your shell script to increase the memory limit for the node process. Alternatively, you can run this in your terminal before running the app. Replace 16384 with the amount of RAM you want to allocate to the node process.Add
NEXT_PUBLIC_LOGGER_LEVEL={level}to your .env file to control the logging verbosity for all tRPC queries and mutations.Where {level} can be one of the following:
0for silly1for trace2for debug3for info4for warn5for error6for fatalWhen you set
NEXT_PUBLIC_LOGGER_LEVEL={level}in your .env file, it enables logging at that level and higher. Here’s how it works:The logger will include all logs that are at the specified level or higher. For example: \
NEXT_PUBLIC_LOGGER_LEVEL=2, it will log from level 2 (debug) upwards, meaning levels 2 (debug), 3 (info), 4 (warn), 5 (error), and 6 (fatal) will be logged. \NEXT_PUBLIC_LOGGER_LEVEL=3, it will log from level 3 (info) upwards, meaning levels 3 (info), 4 (warn), 5 (error), and 6 (fatal) will be logged, but level 2 (debug) and level 1 (trace) will be ignored. \for Logger level to be set at info, for example.
Gitpod Setup
Click the button below to open this project in Gitpod.
This will open a fully configured workspace in your browser with all the necessary dependencies already installed.
Manual setup
Configure environment variables in the
.envfile. Replace<user>,<pass>,<db-host>, and<db-port>with their applicable valuesIf you don't know how to configure the DATABASE_URL, then follow the steps here to create a quick local DB
Download and install postgres in your local (if you don’t have it already).
Create your own local db by executing
createDB <DB name>Now open your psql shell with the DB you created:
psql -h localhost -U postgres -d <DB name>Inside the psql shell execute
\conninfo. And you will get the following info.Now extract all the info and add it to your DATABASE_URL. The url would look something like this
postgresql://postgres:postgres@localhost:5432/Your-DB-Name. The port is configurable and does not have to be 5432.If you don’t want to create a local DB. Then you can also consider using services like railway.app, Northflank or render.
Copy and paste your
DATABASE_URLfrom.envto.env.appStore.Set up the database using the Prisma schema (found in
packages/prisma/schema.prisma)In a development environment, run:
In a production environment, run:
Run mailhog to view emails sent during development
Run (in development mode)
Setting up your first user
Approach 1
Open Prisma Studio to look at or modify the database content:
Click on the
Usermodel to add a new user record.Fill out the fields
email,username,password, and setmetadatato empty{}(remembering to encrypt your password with BCrypt) and clickSave 1 Recordto create your first user.Open a browser to http://localhost:3000 and login with your just created, first user.
Approach 2
Seed the local db by running
The above command will populate the local db with dummy users.
E2E-Testing
Be sure to set the environment variable
NEXTAUTH_URLto the correct value. If you are running locally, as the documentation within.env.examplementions, the value should behttp://localhost:3000.Resolving issues
E2E test browsers not installed
Run
npx playwright installto download test browsers and resolve the error below when runningyarn test-e2e:Upgrading from earlier versions
Pull the current version:
Check if dependencies got added/updated/removed
Apply database migrations by running one of the following commands:
In a development environment, run:
(This can clear your development database in some cases)
In a production environment, run:
Check for
.envvariables changesStart the server. In a development environment, just do:
For a production build, run for example:
Enjoy the new version.
AI-Assisted Development
This repository includes configuration for AI coding assistants. All AI configuration lives in the
agents/directory as a single source of truth.Structure
Tool Configuration
We use symlinks to share configuration across tools:
Using Other Tools
If you prefer other AI tools (Windsurf, Goose, OpenCode, etc.), you can create your own dot folders and exclude them from git:
This keeps the repository clean while allowing personal tool preferences.
Deployment
Docker
Official support: Our team will begin to officially support the Dockerfile and docker-compose resources in this repository.
Important: Cal.com will not be supporting installations that use these Docker resources. While we provide and maintain the Docker configurations, support for Docker-based installations is the responsibility of the user.
This image can be found on DockerHub at https://hub.docker.com/r/calcom/cal.com.
Note for ARM Users: Use the {version}-arm suffix for pulling images. Example:
docker pull calcom/cal.com:v5.6.19-arm.Requirements
Make sure you have
docker&docker composeinstalled on the server / system. Both are installed by most docker utilities, including Docker Desktop and Rancher Desktop.Note:
docker composewithout the hyphen is now the primary method of using docker-compose, per the Docker documentation.(Most users) Running Cal.com with Docker Compose
If you are evaluating Cal.com or running with minimal to no modifications, this option is for you.
Clone calcom/cal.com
Change into the directory
Prepare your configuration: Rename
.env.exampleto.envand then update.envMost configurations can be left as-is, but for configuration options see Important Run-time variables below.
Push Notifications (VAPID Keys) If you see an error like:
This means your environment variables for Web Push are missing. You must generate and set
NEXT_PUBLIC_VAPID_PUBLIC_KEYandVAPID_PRIVATE_KEY.Generate them with:
Then update your
.envfile:Do not commit real keys to
.env.example— only placeholders.Update the appropriate values in your .env file, then proceed.
(optional) Pre-Pull the images by running the following command:
This will use the default image locations as specified by
image:in the docker-compose.yaml file.Note: To aid with support, by default Scarf.sh is used as registry proxy for download metrics.
Start Cal.com via docker compose
(Most basic users, and for First Run) To run the complete stack, which includes a local Postgres database, Cal.com web app, and Prisma Studio:
To run Cal.com web app and Prisma Studio against a remote database, ensure that DATABASE_URL is configured for an available database and run:
To run only the Cal.com web app, ensure that DATABASE_URL is configured for an available database and run:
Note: to run in attached mode for debugging, remove
-dfrom your desired run command.Open a browser to http://localhost:3000, or your defined NEXT_PUBLIC_WEBAPP_URL. The first time you run Cal.com, a setup wizard will initialize. Define your first user, and you’re ready to go!
Updating Cal.com
Stop the Cal.com stack
Pull the latest changes
Update env vars as necessary.
Re-start the Cal.com stack
(Advanced users) Build and Run Cal.com
Clone calcom/docker.
Change into the directory
Update the calcom submodule. This project depends on the Cal.com source code, which is included here as a Git submodule. To make sure you get everything you need, update the submodule with the command below.
Note: DO NOT use recursive submodule update, otherwise you will receive a git authentication error.
Rename
.env.exampleto.envand then update.envFor configuration options see Build-time variables below. Update the appropriate values in your .env file, then proceed.
Build the Cal.com docker image:
Note: Due to application configuration requirements, an available database is currently required during the build process.
a) If hosting elsewhere, configure the
DATABASE_URLin the .env file, and skip the next stepb) If a local or temporary database is required, start a local database via docker compose.
Build Cal.com via docker compose (DOCKER_BUILDKIT=0 must be provided to allow a network bridge to be used at build time. This requirement will be removed in the future)
Start Cal.com via docker compose
(Most basic users, and for First Run) To run the complete stack, which includes a local Postgres database, Cal.com web app, and Prisma Studio:
To run Cal.com web app and Prisma Studio against a remote database, ensure that DATABASE_URL is configured for an available database and run:
To run only the Cal.com web app, ensure that DATABASE_URL is configured for an available database and run:
Note: to run in attached mode for debugging, remove
-dfrom your desired run command.Open a browser to http://localhost:3000, or your defined NEXT_PUBLIC_WEBAPP_URL. The first time you run Cal.com, a setup wizard will initialize. Define your first user, and you’re ready to go!
Configuration
Important Run-time variables
These variables must also be provided at runtime
postgresql://unicorn_user:magical_password@database:5432/calendsohttp://localhost:3000{NEXT_PUBLIC_WEBAPP_URL}/api/authsecretsecretBuild-time variables
If building the image yourself, these variables must be provided at the time of the docker build, and can be provided by updating the .env file. Currently, if you require changes to these variables, you must follow the instructions to build and publish your own image.
Updating these variables is not required for evaluation, but is required for running in production. Instructions for generating variables can be found in the Cal.com instructions
postgresql://unicorn_user:magical_password@database:5432/calendsosecretsecrethttp://localhost:3000https://cal.com/termshttps://cal.com/privacy1to disable)Troubleshooting
SSL edge termination
If running behind a load balancer which handles SSL certificates, you will need to add the environmental variable
NODE_TLS_REJECT_UNAUTHORIZED=0to prevent requests from being rejected. Only do this if you know what you are doing and trust the services/load-balancers directing traffic to your service.Failed to commit changes: Invalid ‘prisma.user.create()’
Certain versions may have trouble creating a user if the field
metadatais empty. Using an empty json object{}as the field value should resolve this issue. Also, theidfield will autoincrement, so you may also try leaving the value ofidas empty.CLIENT_FETCH_ERROR
If you experience this error, it may be the way the default Auth callback in the server is using the WEBAPP_URL as a base url. The container does not necessarily have access to the same DNS as your local machine, and therefore needs to be configured to resolve to itself. You may be able to correct this by configuring
NEXTAUTH_URL=http://localhost:3000/api/auth, to help the backend loop back to itself.Railway
You can deploy Cal.com on Railway using the button above. The team at Railway also have a detailed blog post on deploying Cal.com on their platform.
Northflank
You can deploy Cal.com on Northflank using the button above. The team at Northflank also have a detailed blog post on deploying Cal.com on their platform.
Vercel
Currently Vercel Pro Plan is required to be able to Deploy this application with Vercel, due to limitations on the number of serverless functions on the free plan.
Render
Elestio
Roadmap
See the roadmap project for a list of proposed features (and known issues). You can change the view to see planned tagged releases.
License
Cal.com, Inc. is a commercial open source company, which means some parts of this open source repository require a commercial license. The concept is called “Open Core” where the core technology (99%) is fully open source, licensed under AGPLv3 and the last 1% is covered under a commercial license (“/ee” Enterprise Edition) which we believe is entirely relevant for larger organisations that require enterprise features. Enterprise features are built by the core engineering team of Cal.com, Inc. which is hired in full-time. Find their compensation on https://cal.com/open.
Repo Activity
Contributing
We ❤️ contributions! Whether it’s fixing a typo, improving documentation, or building new features, your help makes Cal.com better.
Even small improvements matter — thank you for helping us grow!
Good First Issues
We have a list of help wanted that contain small features and bugs which have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process.
Bounties
Contributors
Translations
Don’t code but still want to contribute? Join our Discussions and join the #Translate channel and let us know what language you want to translate.
Enabling Content Security Policy
Single Org Mode
Refer to docs here for a detailed documentation with screenshots.
Integrations
Obtaining the Google API Credentials
.../auth/calendar.events,.../auth/calendar.readonlyand select Update.<Cal.com URL>/api/integrations/googlecalendar/callbackand<Cal.com URL>/api/auth/callback/googlereplacing Cal.com URL with the URI at which your application runs..envfile as the value forGOOGLE_API_CREDENTIALSkey.Adding google calendar to Cal.com App Store
After adding Google credentials, you can now Google Calendar App to the app store. You can repopulate the App store by running
You will need to complete a few more steps to activate Google Calendar App. Make sure to complete section “Obtaining the Google API Credentials”. After that do the following
<Cal.com URL>/api/auth/callback/googleObtaining Microsoft Graph Client ID and Secret
<Cal.com URL>/api/integrations/office365calendar/callbackreplacing Cal.com URL with the URI at which your application runs.Obtaining Zoom Client ID and Secret
.envfile into theZOOM_CLIENT_IDandZOOM_CLIENT_SECRETfields.<Cal.com URL>/api/integrations/zoomvideo/callbackreplacing Cal.com URL with the URI at which your application runs.meeting:write:meeting.user:read:settings.Obtaining Daily API Credentials
.envfile into theDAILY_API_KEYfield in your.envfile.DAILY_SCALE_PLANvariable totruein order to use features like video recording.Obtaining Basecamp Client ID and Secret
<Cal.com URL>/api/integrations/basecamp3/callbackreplacing Cal.com URL with the URI at which your application runs.BASECAMP3_CLIENT_IDandBASECAMP3_CLIENT_SECRETfields.BASECAMP3_CLIENT_SECRETenv variable to{your_domain} ({support_email}). For example,Cal.com (support@cal.com).Obtaining HubSpot Client ID and Secret
.envfile into theHUBSPOT_CLIENT_IDandHUBSPOT_CLIENT_SECRETfields.<Cal.com URL>/api/integrations/hubspot/callbackreplacing Cal.com URL with the URI at which your application runs.crm.objects.contactsandcrm.lists.Obtaining Webex Client ID and Secret
See Webex Readme
Obtaining ZohoCRM Client ID and Secret
.envfile into theZOHOCRM_CLIENT_IDandZOHOCRM_CLIENT_SECRETfields.<Cal.com URL>/api/integrations/zohocrm/callbackreplacing Cal.com URL with the URI at which your application runs.Obtaining Zoho Calendar Client ID and Secret
Follow these steps
Obtaining Zoho Bigin Client ID and Secret
Follow these steps
Obtaining Pipedrive Client ID and Secret
Follow these steps
Rate Limiting with Unkey
Cal.com uses Unkey for rate limiting. This is an optional feature and is not required for testing or self-hosting.
If you want to enable rate limiting:
ratelimit.create_namespaceandratelimit.limit.envfile into theUNKEY_ROOT_KEYfieldNote: If you don’t configure Unkey, Cal.com will work normally without rate limiting enabled.
Workflows
Setting up SendGrid for Email reminders
.envfile into theSENDGRID_API_KEYfield.envfile into theSENDGRID_EMAILfield.envfile into theNEXT_PUBLIC_SENDGRID_SENDER_NAMEfield (fallback is Cal.com)Setting up Twilio for SMS reminders
.envfile into theTWILIO_SIDfield.envfile into theTWILIO_TOKENfield.envfile into theTWILIO_PHONE_NUMBERfield.envfile into theNEXT_PUBLIC_SENDER_IDfield (fallback is Cal.com).envfile into theTWILIO_MESSAGING_SIDfield.envfile into theTWILIO_VERIFY_SIDfieldChangesets
We use changesets to generate changelogs and publish public packages (packages with
private: trueare ignored).An example of good readme is atoms readme. Every public package must:
❗️Breaking changeAcknowledgements
Special thanks to these amazing projects which help power Cal.com:
Cal.com is an open startup and Jitsu (an open-source Segment alternative) helps us to track most of the usage metrics.