Scheduling for teams.
Round-robin, weighted routing and collective events. Open source.
Website
·
Docs
·
Issues
·
Contributing
Tikket is open-source scheduling for teams, licensed under MIT. It is a fork of Cal.diy, the MIT community edition of Cal.com without the enterprise features (teams, organizations, insights, workflows, routing forms, SSO). Tikket adds team scheduling back under MIT: teams, roles and invites, shared team event types, round-robin with weights and priorities, and collective events. A hosted version runs at tikket.dev. You can run the open-source edition on your own server without the hosted features (billing, plan limits).
Built with:
You need these tools:
- Node.js 18 or newer
- PostgreSQL 13 or newer
- Yarn 4
- Docker and Docker Compose (for
yarn dx)
If your Node.js version is too old, nvm (Node Version Manager) can switch to the correct version. Run nvm use in the project folder. If that version is not installed, run nvm install && nvm use. You can install nvm from github.com/nvm-sh/nvm.
If you want to use an integration, you need credentials for it. See Integrations.
-
Clone the repository, go to the project folder and install the packages.
git clone https://github.com/threos/tikket.dev.git cd tikket.dev yarnIf you are on Windows, clone with this command instead, in Git Bash with admin privileges:
git clone -c core.symlinks=true https://github.com/threos/tikket.dev.git -
Create the
.envfile withcp .env.example .env. Then generate two keys and add them to.env:- Run
openssl rand -base64 32and put the result inNEXTAUTH_SECRET. - Run
openssl rand -base64 24and put the result inCALENDSO_ENCRYPTION_KEY.
If you are on Windows, replace the
packages/prisma/.envsymlink with a real copy. In Git Bash or WSL, runrm packages/prisma/.env && cp .env packages/prisma/.env. This prevents the Prisma errorunexpected character / in variable name. - Run
-
Start the development stack.
yarn dx
This command starts Postgres in Docker, applies the migrations, seeds test users and starts the web app. The console shows the credentials of the test users.
| Password | Role | |
|---|---|---|
free@example.com |
free |
Free user |
pro@example.com |
pro |
Pro user |
trial@example.com |
trial |
Trial user |
admin@example.com |
ADMINadmin2022! |
Admin user |
onboarding@example.com |
onboarding |
Onboarding incomplete |
Sign in with one of these users at http://localhost:3000. To see all seeded users, run yarn db-studio and open http://localhost:5555.
Use this path when you have your own PostgreSQL server and do not use yarn dx. Do steps 1 and 2 of Quick start first.
-
In
.env, setDATABASE_URL. Replace<user>,<pass>,<db-host>and<db-port>with your values.DATABASE_URL='postgresql://<user>:<pass>@<db-host>:<db-port>'If you do not have a database yet, create a local one:
- Download and install PostgreSQL.
- Create a database with
createdb <DB name>. - Open the psql shell for this database:
psql -h localhost -U postgres -d <DB name>. - In the psql shell, run
\conninfo. The output names the database, the user, the host and the port. - Put these values in
DATABASE_URL, for examplepostgresql://postgres:postgres@localhost:5432/Your-DB-Name. The port does not have to be 5432.
You can also use a hosted PostgreSQL database from railway.app, Northflank or Render.
-
Copy
DATABASE_URLfrom.envto.env.appStore. -
Apply the Prisma schema (
packages/prisma/schema.prisma) to the database. In development, runyarn workspace @calcom/prisma db-migrate. In production, runyarn workspace @calcom/prisma db-deploy.On Windows with PowerShell, this step can fail with
Environment variable not found: DATABASE_DIRECT_URL. Turbo then did not inject the root.envvariables. Run the commands from the prisma package folder instead:cd packages/prisma $env:DATABASE_URL="postgresql://postgres:YOUR_PASSWORD@localhost:5432/postgres"; $env:DATABASE_DIRECT_URL="postgresql://postgres:YOUR_PASSWORD@localhost:5432/postgres" npx prisma db push cd ../..
-
Run mailhog to read the emails that the app sends in development. Mailhog is required when
E2E_TEST_MAILHOG_ENABLEDis "1".docker pull mailhog/mailhog docker run -d -p 8025:8025 -p 1025:1025 mailhog/mailhog
-
Start the web app in development mode with
yarn dev.
You can create the first user by hand, or you can seed test users.
To create the user by hand:
- Open Prisma Studio to view and edit the database content:
yarn db-studio. - Click the
Usermodel and add a new record. - Fill in
email,usernameandpassword. Encrypt the password with BCrypt first. Setmetadatato{}. Then clickSave 1 Record. New users get theTRIALplan by default. You can change this inpackages/prisma/schema.prisma. - Open http://localhost:3000 and sign in with this user.
To seed test users instead, run yarn db-seed in the packages/prisma folder.
Add NEXT_PUBLIC_LOGGER_LEVEL={level} to .env to control how much the app logs for tRPC queries and mutations. The levels are 0 silly, 1 trace, 2 debug, 3 info, 4 warn, 5 error and 6 fatal.
The logger writes all logs at the given level and higher. With NEXT_PUBLIC_LOGGER_LEVEL=2, it writes debug, info, warn, error and fatal. With NEXT_PUBLIC_LOGGER_LEVEL=3, it writes info, warn, error and fatal, and it skips debug and trace. For example, echo 'NEXT_PUBLIC_LOGGER_LEVEL=3' >> .env sets the level to info.
If the Node.js process runs out of memory, add export NODE_OPTIONS="--max-old-space-size=16384" to your shell profile. You can also run this line in the terminal before you start the app. Replace 16384 with the amount of RAM, in megabytes, that you want to give the process.
Make sure that NEXTAUTH_URL has the correct value. For a local run, .env.example gives http://localhost:3000.
# Run the end-to-end tests:
yarn test-e2e
# Open the last HTML report:
yarn playwright show-report test-results/reports/playwright-html-reportIf yarn test-e2e stops with the error below, the test browsers are not installed. Run npx playwright install to download them.
Executable doesn't exist at /Users/alice/Library/Caches/ms-playwright/chromium-1048/chrome-mac/Chromium.app/Contents/MacOS/Chromium
- Pull the current version with
git pull. - Install added, updated or removed dependencies with
yarn. - Apply the database migrations with one of these commands. In development, run
yarn workspace @calcom/prisma db-migrate. This command can clear your development database in some cases. In production, runyarn workspace @calcom/prisma db-deploy. - Run
yarn predevto make sure that your.envfile has all variables that the new version needs. - Start the server. In development, run
yarn dev. For a production build, runyarn build, thenyarn start.
Tikket runs on any host with Node.js and PostgreSQL. Build with yarn build and start with yarn start. The sections below cover Docker and Vercel.
No Tikket image is published. You build the image from this repository. The docker-compose.yml file still references the upstream Cal.diy image, so build the image before you start the stack. You need docker and docker compose on the server. Docker Desktop and Rancher Desktop install both. Use docker compose without the hyphen. Docker names it as the primary command.
-
Clone the repository and go to the project folder (see Quick start).
-
Create
.envwithcp .env.example .envand update it. See Run-time variables and Build-time variables below.Generate values for
NEXTAUTH_SECRET(cookie encryption key) andCALENDSO_ENCRYPTION_KEY(32 bytes for AES256). Do not keep the defaultsecretplaceholder in production. It is a security risk.openssl rand -base64 32 # NEXTAUTH_SECRET openssl rand -base64 24 # CALENDSO_ENCRYPTION_KEY
Put the results in
.envasNEXTAUTH_SECRET=<your_generated_secret>andCALENDSO_ENCRYPTION_KEY=<your_generated_key>.If the app stops with
Error: No key set vapidDetails.publicKey, the Web Push variables are missing. Generate them withnpx web-push generate-vapid-keys. Put them in.envasNEXT_PUBLIC_VAPID_PUBLIC_KEYandVAPID_PRIVATE_KEY. Do not commit real keys to.env.example. Only placeholders belong there. -
Give the build a database. The build needs a reachable database because of the application configuration. If the database runs elsewhere, set
DATABASE_URLin.envand go to step 4. If you need a local or temporary database, start one withdocker compose up -d database. -
Build the image.
DOCKER_BUILDKIT=0lets the build use a network bridge. This requirement will go away in a later version.DOCKER_BUILDKIT=0 docker compose build calcom
-
Start the stack with one of these commands. For the last two, make sure that
DATABASE_URLpoints to the remote database. To run in attached mode for debugging, remove-d.docker compose up -d # complete stack: local Postgres, Tikket web app, Prisma Studio docker compose up -d calcom studio # web app and Prisma Studio, remote database docker compose up -d calcom # web app only, remote database
-
Open http://localhost:3000, or the
NEXT_PUBLIC_WEBAPP_URLthat you set. On the first run, a setup wizard starts. Create your first user there. The wizard shows a "Connect your Calendar" step that looks required. To skip it, go to<NEXT_PUBLIC_WEBAPP_URL>/event-types. You can add a calendar later on the Settings > Integrations page.
To update a Docker installation, do these steps:
- Stop the stack with
docker compose down. - Pull the current source with
git pull. - Build the image again (step 4).
- If the new version needs new variables, add them to
.env. - Start the stack again (step 5).
The container needs these variables at run time.
| Variable | Description | Required | Default |
|---|---|---|---|
| DATABASE_URL | Database URL with credentials. If you use a connection pooler, point this variable at the pooler. | required | postgresql://unicorn_user:magical_password@database:5432/calendso |
| NEXT_PUBLIC_WEBAPP_URL | Base URL of the site. If this value differs from the build-time value, the container start takes longer, because it updates the static files. | optional | http://localhost:3000 |
| NEXTAUTH_URL | Location of the auth server. By default, this is the Tikket container itself. | optional | {NEXT_PUBLIC_WEBAPP_URL}/api/auth |
| NEXTAUTH_SECRET | Cookie encryption key. Must match the build variable. Generate with openssl rand -base64 32. |
required | secret |
| CALENDSO_ENCRYPTION_KEY | Authentication encryption key (32 bytes for AES256). Must match the build variable. Generate with openssl rand -base64 24. |
required | secret |
The build needs these variables. Set them in .env before you build. If you change one of them later, you must build the image again.
| Variable | Description | Required | Default |
|---|---|---|---|
| DATABASE_URL | Database URL with credentials. If you use a connection pooler, point this variable at the pooler. | required | postgresql://unicorn_user:magical_password@database:5432/calendso |
| MAX_OLD_SPACE_SIZE | Memory limit for the Node.js build | required | 4096 |
| NEXTAUTH_SECRET | Cookie encryption key | required | secret |
| CALENDSO_ENCRYPTION_KEY | Authentication encryption key | required | secret |
| NEXT_PUBLIC_WEBAPP_URL | Base URL written into the static files | optional | http://localhost:3000 |
| NEXT_PUBLIC_WEBSITE_TERMS_URL | Custom URL of the terms and conditions page | optional | |
| NEXT_PUBLIC_WEBSITE_PRIVACY_POLICY_URL | Custom URL of the privacy policy page | optional | |
| CALCOM_TELEMETRY_DISABLED | Anonymous usage data collection. Set to 1 to disable it. |
optional |
SSL edge termination. If a load balancer in front of Tikket handles the SSL certificates, set NODE_TLS_REJECT_UNAUTHORIZED=0. Without it, the app rejects the requests. Only do this when you trust the services and load balancers that send traffic to Tikket.
Failed to commit changes: Invalid 'prisma.user.create()'. Some versions cannot create a user when the metadata field is empty. Set the field to the empty JSON object {}. The id field increments by itself, so you can also leave id empty.
CLIENT_FETCH_ERROR. The default auth callback on the server uses the WEBAPP_URL as its base URL. The container does not always have the same DNS as your local machine, so it must resolve to itself. Set NEXTAUTH_URL=http://localhost:3000/api/auth so that the backend loops back to itself. The error looks like this:
docker-calcom-1 | @calcom/web:start: [next-auth][error][CLIENT_FETCH_ERROR]
docker-calcom-1 | @calcom/web:start: https://next-auth.js.org/errors#client_fetch_error request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost {
docker-calcom-1 | @calcom/web:start: error: {
docker-calcom-1 | @calcom/web:start: message: 'request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost',
docker-calcom-1 | @calcom/web:start: stack: 'FetchError: request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost\n' +
docker-calcom-1 | @calcom/web:start: ' at ClientRequest.<anonymous> (/calcom/node_modules/next/dist/compiled/node-fetch/index.js:1:65756)\n' +
docker-calcom-1 | @calcom/web:start: ' at ClientRequest.emit (node:events:513:28)\n' +
docker-calcom-1 | @calcom/web:start: ' at ClientRequest.emit (node:domain:489:12)\n' +
docker-calcom-1 | @calcom/web:start: ' at Socket.socketErrorListener (node:_http_client:494:9)\n' +
docker-calcom-1 | @calcom/web:start: ' at Socket.emit (node:events:513:28)\n' +
docker-calcom-1 | @calcom/web:start: ' at Socket.emit (node:domain:489:12)\n' +
docker-calcom-1 | @calcom/web:start: ' at emitErrorNT (node:internal/streams/destroy:157:8)\n' +
docker-calcom-1 | @calcom/web:start: ' at emitErrorCloseNT (node:internal/streams/destroy:122:3)\n' +
docker-calcom-1 | @calcom/web:start: ' at processTicksAndRejections (node:internal/process/task_queues:83:21)',
docker-calcom-1 | @calcom/web:start: name: 'FetchError'
docker-calcom-1 | @calcom/web:start: },
docker-calcom-1 | @calcom/web:start: url: 'http://testing.localhost:3000/api/auth/session',
docker-calcom-1 | @calcom/web:start: message: 'request to http://testing.localhost:3000/api/auth/session failed, reason: getaddrinfo ENOTFOUND testing.localhost'
docker-calcom-1 | @calcom/web:start: }
A Vercel Pro plan is required, because the free plan limits the number of serverless functions.
In each section, replace <Tikket URL> with the URL where your Tikket instance runs.
- Open the Google API Console. If your Google Cloud subscription has no project, create one first. On the Dashboard pane, select Enable APIS and Services.
- Type "calendar" in the search box and select the Google Calendar API result.
- Enable the selected API.
- Open the OAuth consent screen from the side pane. Select the app type (Internal or External) and enter the basic app details on the first page.
- On the second page (Scopes), select Add or Remove Scopes. Search for "Calendar.event", select the scopes
.../auth/calendar.eventsand.../auth/calendar.readonly, and select Update. - On the third page (Test Users), add the Google accounts that you will use. Make sure that the details on the last page of the wizard are correct. The consent screen is then configured.
- Select Credentials from the side pane, select Create Credentials, then select OAuth Client ID.
- Select Web Application as the Application Type.
- Under Authorized redirect URIs, select Add URI and add
<Tikket URL>/api/integrations/googlecalendar/callbackand<Tikket URL>/api/auth/callback/google. - Google creates the key and returns you to the Credentials page. Select the new client ID under OAuth 2.0 Client IDs.
- Select Download JSON. Paste the whole JSON string into
.envas the value ofGOOGLE_API_CREDENTIALS.
To add the Google Calendar app to the App Store, run yarn seed-app-store in the packages/prisma folder. This fills the App Store again. Then do these two steps to activate the app:
- Add the extra redirect URL
<Tikket URL>/api/auth/callback/google. - Under OAuth consent screen, click "PUBLISH APP".
- Open Azure App Registration and select New registration.
- Name your application.
- Set "Who can use this application or access this API?" to "Accounts in any organizational directory (Any Azure AD directory - Multitenant)".
- Set the Web redirect URI to
<Tikket URL>/api/integrations/office365calendar/callback. - Put the Application (client) ID in
.envasMS_GRAPH_CLIENT_ID. - Click Certificates & secrets, create a new client secret, and put its value in
.envasMS_GRAPH_CLIENT_SECRET.
- Open the Zoom Marketplace and sign in with your Zoom account.
- On the upper right, click "Develop", then "Build App".
- Select "General App" and click "Create".
- Name your app.
- Under "Select how the app is managed", select "User-managed app".
- If Zoom asks, deselect the option to publish the app on the Zoom App Marketplace.
- Copy the Client ID and the Client Secret into
.envasZOOM_CLIENT_IDandZOOM_CLIENT_SECRET. - Under "OAuth Information", set the "OAuth Redirect URL" to
<Tikket URL>/api/integrations/zoomvideo/callback. - Add the same redirect URL to the allow list and enable "Subdomain check". Make sure that the form says "saved" below it.
- Skip the basic information about your app. Click "Scopes", then "+ Add Scopes". On the left, click the category "Meeting" and select the scope
meeting:write:meeting. Then click the category "User" and select the scopeuser:read:settings. - Click "Done". You can now add the Zoom integration on the Tikket Settings page.
- Open Daily.co and create an account.
- In your dashboard, go to the developers tab.
- Copy your API key.
- Put the API key in
.envasDAILY_API_KEY. - If you have the Daily Scale Plan, set
DAILY_SCALE_PLANtotrue. This enables features like video recording.
- Open the 37 Signals Integrations Dashboard and sign in.
- Click the "Register one now" link to register a new application.
- Fill in your company details.
- Select Basecamp 4 as the product to integrate with.
- Set the Redirect URL for OAuth to
<Tikket URL>/api/integrations/basecamp3/callback. - Click "done". Copy the Client ID and the secret into
.envasBASECAMP3_CLIENT_IDandBASECAMP3_CLIENT_SECRET. - Set the
BASECAMP3_CLIENT_SECRETvariable to{your_domain} ({support_email}).
- Open HubSpot Developer and sign in, or create an account.
- On the home page of the developer account, go to "Manage apps".
- Click "Create legacy app" at the top right and select "public app".
- Fill in the "App info" tab as you like.
- Go to the "Auth" tab.
- Copy the Client ID and the Client Secret into
.envasHUBSPOT_CLIENT_IDandHUBSPOT_CLIENT_SECRET. - Set the Redirect URL for OAuth to
<Tikket URL>/api/integrations/hubspot/callback. - In the "Scopes" section at the bottom of the page, select "Read" and "Write" for the scopes
crm.objects.contactsandcrm.lists. - Click "Save" at the bottom. Tikket now creates a meeting in HubSpot for each booking with your contacts.
- Open the Zoho API Console and sign in, or create an account.
- In the API console, go to "Applications".
- Click "ADD CLIENT" at the top right and select "Server-based Applications".
- Fill in the "Client Details" tab as you like.
- Go to the "Client Secret" tab.
- Copy the Client ID and the Client Secret into
.envasZOHOCRM_CLIENT_IDandZOHOCRM_CLIENT_SECRET. - Set the Redirect URL for OAuth to
<Tikket URL>/api/integrations/zohocrm/callback. - If you want the same OAuth credentials for all data centers, select "Multi-DC" in the "Settings" section.
- Click "Save" or "UPDATE" at the bottom. You can now add the Zoho CRM integration on the Tikket Settings page.
Each of these apps has its own readme with the steps:
Tikket uses Unkey for rate limiting. Rate limiting is optional. Without Unkey, Tikket works normally without rate limiting. To enable it:
- Create an account at unkey.com.
- Create a Root key with the permissions
ratelimit.create_namespaceandratelimit.limit. - Put the root key in
.envasUNKEY_ROOT_KEY.
Set CSP_POLICY="non-strict" in .env to enable Strict CSP, except for unsafe-inline in style-src. If your instance has custom changes, you can need to adapt your code to make it CSP-compatible. Strict CSP is enabled only on the login page. On other SSR pages, it runs in report-only mode to find possible problems. SSG pages do not support it yet.
Contributions are welcome, from a typo fix to a new feature. Read the Contributing Guide for the steps, the coding standards and the commit message conventions. The help wanted issues are small features and bugs with a limited scope. They are a good place to start. You can also help without code: translate Tikket into your language.
Tikket is open source under the MIT License. Tikket is built on Cal.diy and Cal.com. Cal.diy and Cal are registered trademarks of Cal.com, Inc.
Tikket exists because the Cal.com team built Cal.com in the open for years and then released Cal.diy under the MIT license. The booking engine, the availability logic, the calendar and video integrations, the embeds and the API that Tikket runs on are their work, and the work of the hundreds of people who contributed to those projects.
We did not write most of this code. We inherited it, and we are grateful for it. Tikket adds team scheduling back on top of that foundation and keeps the result open source, in the same spirit.
If you need a hosted scheduling product with enterprise features, support and a company behind it, Cal.com is the original and the best place to start: cal.com.
Tikket also depends on these projects: