From 3b2e3351c4b46dc0ea9a694f1eaeb96f1f99794f Mon Sep 17 00:00:00 2001 From: Lauris Skraucis Date: Thu, 29 Jan 2026 12:18:23 +0100 Subject: [PATCH] docs: api v2 and examples app setup (#27290) * docs: api v2 and examples app setup * docs: api v2 and examples app setup * fix: address Cubic AI review feedback - Fix env file path typo in README.md (apps/api/v2.env -> apps/api/v2/.env) - Write generated secrets to file instead of logging to console - Add .generated-secrets to gitignore - Update README-PLATFORM.md to reflect new secret generation behavior Co-Authored-By: unknown <> * chore: update locale * chore: update docs --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Ryukemeister --- apps/api/v2/.env.example | 46 ++++-- apps/api/v2/.gitignore | 3 + apps/api/v2/README-PLATFORM.md | 156 ++++++++++++++++++ apps/api/v2/README.md | 133 +++++---------- apps/api/v2/package.json | 1 + apps/api/v2/scripts/generate-secrets.ts | 13 ++ apps/web/public/static/locales/en/common.json | 19 ++- packages/platform/examples/base/.env.example | 24 ++- 8 files changed, 289 insertions(+), 106 deletions(-) create mode 100644 apps/api/v2/README-PLATFORM.md create mode 100644 apps/api/v2/scripts/generate-secrets.ts diff --git a/apps/api/v2/.env.example b/apps/api/v2/.env.example index 46d919c9d7..180443cdb7 100644 --- a/apps/api/v2/.env.example +++ b/apps/api/v2/.env.example @@ -1,14 +1,34 @@ -NODE_ENV= -API_PORT= -API_URL= -DATABASE_READ_URL= -DATABASE_WRITE_URL= -LOG_LEVEL= -NEXTAUTH_SECRET= -DATABASE_URL= -JWT_SECRET= +# these are the environment variables you absolutely need for api v2 to work +# NODE_ENV, API_PORT, REDIS_URL, DATABASE_URL, DATABASE_READ_URL, DATABASE_WRITE_URL, NEXTAUTH_SECRET, JWT_SECRET, STRIPE_API_KEY, STRIPE_WEBHOOK_SECRET, CALENDSO_ENCRYPTION_KEY + +# we set environmnet as development so that right environment file is loaded and swagger is generated +NODE_ENV="development" +API_PORT=5555 +API_URL="http://localhost" +# url to Postgres running in Docker. Postgres is setup in packages/prisma/docker-compose.yml +DATABASE_READ_URL="postgresql://postgres:@localhost:5450/calendso" +DATABASE_WRITE_URL="postgresql://postgres:@localhost:5450/calendso" +LOG_LEVEL=DEBUG +# the same value as in the root .env - it is used by api-auth.strategy.ts to validate requests authenticated with next token. If you already have a value +# in the root .env then you can paste it here. It is important that they are the same. +NEXTAUTH_SECRET="RbyBOfiZFt/IsBL2E2Zy2idcKRH+WclnHEiu1FmRdf0=" +DATABASE_URL="postgresql://postgres:@localhost:5450/calendso" +DATABASE_DIRECT_URL="postgresql://postgres:@localhost:5450/calendso" +# used by JwtService to sign and decode tokens +JWT_SECRET="asjdijI1JIO12I3O89198jojioSAJDU" SENTRY_DSN= +# mailhog setup. Make sure its running - see instructions in apps/api/v2/README.md +EMAIL_SERVER_HOST='localhost' +EMAIL_SERVER_PORT=1025 + +# used to manage encrypt and decrypt third party tokens +CALENDSO_ENCRYPTION_KEY="Lmqy57DlHKPvwwrtkwjL/8QtxJWxC/OV" +# Service Account Encryption Key for encrypting/decrypting service account keys +CALCOM_SERVICE_ACCOUNT_ENCRYPTION_KEY="LDBFYLEVICRZBYQZUZCSTZRJFZUKZMEI" +# url to redis instance running in Docker and used to cache data. Redis is setup in apps/api/v2/docker-compose.yaml +REDIS_URL="rediss://localhost:6379" + # KEEP THIS EMPTY, DISABLE SENTRY CLIENT INSIDE OF LIBRARIES USED BY APIv2 NEXT_PUBLIC_SENTRY_DSN= @@ -19,13 +39,19 @@ STRIPE_PRICE_ID_ESSENTIALS= STRIPE_PRICE_ID_ESSENTIALS_OVERAGE= STRIPE_PRICE_ID_ENTERPRISE= STRIPE_PRICE_ID_ENTERPRISE_OVERAGE= +# since these two values are required for api v2 to start, you can put a dummy value here if you don't need Stripe functionality +# this can be any random string value eg: STRIPE_API_KEY="sk_test_1234567890" and STRIPE_WEBHOOK_SECRET="whsec_1234567890" STRIPE_API_KEY= STRIPE_WEBHOOK_SECRET= +# used to know where to direct people when managing platform billing WEB_APP_URL=http://localhost:3000/ +# to setup license key see apps/api/v2/README.md CALCOM_LICENSE_KEY= +# when request is authenticated with an api key we need to remove the prefix. See code in api-auth.strategy.ts API_KEY_PREFIX=cal_ -GET_LICENSE_KEY_URL="https://console.cal.com/api/license" +GET_LICENSE_KEY_URL="https://goblin.cal.com/v1/license" +# we disable workers when running e2e and enable them while running locally IS_E2E=false DOCS_URL= diff --git a/apps/api/v2/.gitignore b/apps/api/v2/.gitignore index d60b8f7f21..05ba9f2389 100644 --- a/apps/api/v2/.gitignore +++ b/apps/api/v2/.gitignore @@ -44,3 +44,6 @@ lerna-debug.log* !.env.appStore.example /client/* /generated/prisma/* + +# Generated secrets file +.generated-secrets diff --git a/apps/api/v2/README-PLATFORM.md b/apps/api/v2/README-PLATFORM.md new file mode 100644 index 0000000000..68136255a5 --- /dev/null +++ b/apps/api/v2/README-PLATFORM.md @@ -0,0 +1,156 @@ +# Local development + +## Local development - part 1 +This setup will allow you to develop with api v2 locally and also test platform atoms with the examples app. + +Open `apps/api/v2/README.md` and do all the steps except step 6 where you setup prisma. + +## Local development - part 2 (platform variables shared between api v2 and examples app) +We now need to setup platform OAuth client and OAuth 2.0 client that can be tested in the platform example app `packages/platform/examples/base`. + +### If you want to create clients by seeding the database automatically + +1. Setup root environment that are re-used in the root `.env` and in the platform examples app - open the root `.env` and set values for the platform OAuth client. The id and secret can be random values. +``` +SEED_PLATFORM_OAUTH_CLIENT_ID= +SEED_PLATFORM_OAUTH_CLIENT_SECRET= +``` +Then you need to copy these values to the platform examples app environment. +- Rename `packages/platform/examples/base/.env.example` to `packages/platform/examples/base/.env`. There will be many environment variables already populated to make it easier for you. +- copy the value of `SEED_PLATFORM_OAUTH_CLIENT_ID` into `packages/platform/examples/base/.env` `NEXT_PUBLIC_X_CAL_ID` +- copy the value of `SEED_PLATFORM_OAUTH_CLIENT_SECRET` into `packages/platform/examples/base/.env` `X_CAL_SECRET_KEY` + +Then, we need to setup platform OAuth 2.0 client. We will need an id, and then hashed and plain secrets. To generate them you can: +``` +cd apps/api/v2 +yarn generate-secrets +``` + +and then the secrets will be written to `apps/api/v2/.generated-secrets` file containing: +``` +plain - +hashed - +``` + +In the root `.env` set the following environment variables: +``` +SEED_OAUTH2_CLIENT_ID= +SEED_OAUTH2_CLIENT_SECRET_HASHED= +``` +where CLIENT_ID can be random but SECRET_HASHED is hashed secret above. +Then in the `packages/platform/examples/base/.env` set the `NEXT_PUBLIC_OAUTH2_CLIENT_ID` to be equal to `SEED_OAUTH2_CLIENT_ID` and `OAUTH2_CLIENT_SECRET_PLAIN` to the plain secret generated above. + + +### If you want to create clients manually +1. Create new oauth client in the PlatformOAuthClient table manually. Here is example json. You can set id and secret to random values. +``` + { + "id": "clxyyy21o0003sbk7yw5z6tzg", + "name": "Acme", + "secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiQWNtZSAiLCJwZXJtaXNzaW9ucyI6MTAyMywicmVkaXJlY3RVcmlzIjpbImh0dHA6Ly9sb2NhbGhvc3Q6NDMyMSJdLCJib29raW5nUmVkaXJlY3RVcmkiOiIiLCJib29raW5nQ2FuY2VsUmVkaXJlY3RVcmkiOiIiLCJib29raW5nUmVzY2hlZHVsZVJlZGlyZWN0VXJpIjoiIiwiYXJlRW1haWxzRW5hYmxlZCI6dHJ1ZSwiaWF0IjoxNzE5NTk1ODA4fQ.L5_jSS14fcKLCD_9_DAOgtGd6lUSZlU5CEpCPaPt41I", + "permissions": 1023, + "logo": null, + "redirectUris": "{http://localhost:4321}", + "organizationId": 1, + "createdAt": "2026-01-27 09:35:27.297", + "areEmailsEnabled": true, + "bookingCancelRedirectUri": null, + "bookingRedirectUri": null, + "bookingRescheduleRedirectUri": null, + "areDefaultEventTypesEnabled": true, + "areCalendarEventsEnabled": true + } +``` +Then you need to copy id and secret to the platform examples app environment. +- Rename `packages/platform/examples/base/.env.example` to `packages/platform/examples/base/.env` +- copy the client id into `packages/platform/examples/base/.env` `NEXT_PUBLIC_X_CAL_ID` +- copy the client secret into `packages/platform/examples/base/.env` `X_CAL_SECRET_KEY` + +Then, we need to setup platform OAuth 2.0 client. We will need an id, and then hashed and plain secrets. To generate them you can: +``` +cd apps/api/v2 +yarn generate-secrets +``` + +and then the secrets will be written to `apps/api/v2/.generated-secrets` file containing: +``` +plain - +hashed - +``` + +Then in the `packages/platform/examples/base/.env` set the `NEXT_PUBLIC_OAUTH2_CLIENT_ID` to be equal to a random id and `OAUTH2_CLIENT_SECRET_PLAIN` to the plain secret generated above. + +Then create a new entry in the OAuthClient table with the random id and hashed secret. It is important that the redirectUri is like below because that is where the examples app is running. +``` + { + "clientId": "1c70be53f35aa480a5e3146d361fd993d265e564d2d86a203df3adbd05186517", + "redirectUri": "http://localhost:4321", + "clientSecret": "970db2cf14112013ba3a510b945294fef8737d42ee58c32031d2351692068ce7", + "name": "atoms examples app oauth 2 client", + "logo": null, + "clientType": "confidential", + "isTrusted": false, + "createdAt": "2026-01-27 09:35:26.731", + "purpose": "test atoms examples app with oauth 2", + "rejectionReason": null, + "status": "approved", + "userId": 10, + "websiteUrl": "http://localhost:4321" + } +``` +I point userId to 10 aka `admin@example.com`. + +## Local development - part 3 +Proceed to `apps/api/v2/README.md` step 6 to setup prisma and seed database if you need to. + +## Local development - part 4 (Stripe) +If you want to test platform billing locally then please proceed to `packages/platform/atoms/STRIPE.md` tutorial. + +## Local development - part 5 +If you followed steps above then examples app environment is setup. + +If you also want to test apple connect calendar atom, then you need to create app specific password using your apple email and +set the following variables: +``` +ATOMS_E2E_APPLE_ID= +ATOMS_E2E_APPLE_CONNECT_APP_SPECIFIC_PASSCODE= +``` + +Finally, if you want that the examples app is tested using OAuth 2.0 client then you must set environment variable +`NEXT_PUBLIC_OAUTH2_MODE="true"` in `packages/platform/examples/base/.env`. If you want to test it using platform OAuth client then +comment this variable or set to false. + +# Running everything +1. Build atoms for local development: +cd packages/platform/atoms +yarn dev-on +yarn build-npm +``` +The dev-on command changes how atoms are built. Remember to run `yarn dev-off` when you are done testing atoms locally. If you update anything related to frontend, for example, Booker, then you need to run `yarn build-npm` again to rebuild atoms. + +2. Start api v2: +``` +Sometimes it happens that v2 api restarts because some unrelated log of build files changed, and if it makes examples app not wor you can just start it using: +``` +cd apps/api/v2 +yarn dev:build +yarn start +``` + +3. Setups examples app sqlite database. +``` +cd packages/platform/examples/base +rm -f prisma/dev.db && yarn prisma db push +``` +4. Run examples app and open localhost:4321 +``` +cd packages/platform/examples/base +yarn dev +``` + +If you have set `NEXT_PUBLIC_OAUTH2_MODE="true"` then here is how to test it: + +If you do test OAuth 2.0 using atoms then do below: +1. Start cal web app locally by running `yarn dev` in the root folder and login using any user into cal web app running locally. +2. Using client id and redirect_uri information above create /authorize url. Example http://localhost:3000/auth/oauth2/authorize?client_id=1c70be53f35aa480a5e3146d361fd993d265e564d2d86a203df3adbd05186517&redirect_uri=http://localhost:4321&state=texas or if you have setup localhost:3000 to map to app.cal.local http://app.cal.local:3000/auth/oauth2/authorize?client_id=1c70be53f35aa480a5e3146d361fd993d265e564d2d86a203df3adbd05186517&redirect_uri=http://localhost:4321&state=texas and authorize test OAuth client. You will be redirected to localhost:4321?code=abc and this route will exchange the authorization code for access and refresh tokens for the logged in cal user and store them in the examples app SQLite database. +3. Examples app is ready to use. If you update, let's say an availability, then it will be reflected in the availability of admin@example.com in the web app running locally. diff --git a/apps/api/v2/README.md b/apps/api/v2/README.md index a6dd8ab878..45aff8e698 100644 --- a/apps/api/v2/README.md +++ b/apps/api/v2/README.md @@ -1,95 +1,68 @@ -

- Nest Logo -

+Cal.com api v2 is a [Nest.js](https://github.com/nestjs/nest) project. -[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456 -[circleci-url]: https://circleci.com/gh/nestjs/nest - -

A progressive Node.js framework for building efficient and scalable server-side applications.

-

-NPM Version -Package License -NPM Downloads -CircleCI -Coverage -Discord -Backers on Open Collective -Sponsors on Open Collective - - Support us - -

- - -## Description - -Cal.com is using the [Nest](https://github.com/nestjs/nest) framework TypeScript starter repository. - -## Installation +# Local development +This setup will allow you to develop with api v2 locally. If you want to also test atoms locally with platform's example app, +then proceed to `apps/api/v2/README-PLATFORM.md` instead. +1. Install dependencies ```bash $ yarn install ``` - -## Prisma setup - +2. Download and install Docker on your computer and then make sure it is running. You simply need to open Docker dashboard. +3. Make sure that mailhog is running - it is used by v2 to send emails locally. You can start it by: ```bash -$ yarn prisma generate +$ cd packages/emails && yarn dx +``` +4. Setup api v2 environment - make a copy of `apps/api/v2/.env.example` and rename it to `apps/api/v2/.env` - it has almost all the required values setup - ones you need to add will be explained below. +- Then copy the value of `NEXTAUTH_SECRET` from there to the root `.env` `NEXTAUTH_SECRET`. If you have `NEXTAUTH_SECRET` already in the root `.env` then you can paste that value in `apps/api/v2/.env`. +``` +Note: make sure that the value of `NEXTAUTH_SECRET` is the same in both the root `.env` and in the api v2 `.env`. +``` +5. Setup license key. In the Deployment table in database create the following entry: ``` - -## Env setup - -Copy `.env.example` to `.env` and fill values. - -## Add license Key to Deployment table in DB - id, logo, theme, licenseKey, agreedLicenseAt:- 1, null, null, '00000000-0000-0000-0000-000000000000', '2023-05-15 21:39:47.611' - -Replace with your actual license key. - -your CALCOM_LICENSE_KEY env var need to contain the same value - -.env -CALCOM_LICENSE_KEY=00000000-0000-0000-0000-000000000000 - -## Running the app - -# Development - +``` +Then in the `apps/api/v2/.env` set the license key environment variable: +``` +CALCOM_LICENSE_KEY="00000000-0000-0000-0000-000000000000" +``` +6. (optional) Prisma setup and database seeding - if you need to setup and seed database you can do it: ```bash -$ yarn run start +$ cd packages/prisma +$ yarn prisma generate +$ yarn prisma migrate dev +$ yarn db-seed +``` +7. Proceed to the next section to start api v2 + +# Running api v2 + +Start api v2 using: +```bash +$ yarn dev ``` -OR if you don't want to use docker, you can run following command. - -```bash -$ yarn dev:no-docker +Sometimes it happens that v2 api restarts because some unrelated log of build files changed if you are running it while cal web app is running. If it happens and is annoying you, you can just build it and then run without watch mode: +``` +cd apps/api/v2 +yarn dev:build +yarn start ``` -Additionally you can run following command(in different terminal) to ensure that any change in any of the dependencies is rebuilt and detected. It watches platform-libraries, platform-constants, platform-enums, platform-utils, platform-types. +Api v2 depends on various platform packages "platform-libraries, platform-constants, platform-enums, platform-utils, platform-types" so if any of them change you might need to restart api v2 so it rebuild these dependencies and picks up the changes. + +Notably, you can run following command(in different terminal) to ensure that any change in any of the dependencies is rebuilt and detected. It watches platform-libraries, platform-constants, platform-enums, platform-utils, platform-types. ```bash $ yarn run dev:build:watch ``` -If you are making changes in packages/platform/libraries, you should run the following command too that would connect your local packages/platform/libraries to the api/v2 - +OR if you don't want to use docker, you can run following command. ```bash -$ yarn local +$ yarn dev:no-docker ``` -# watch mode -$ yarn run start:dev - -# production mode -$ yarn run start:prod -``` - - - - ## Test ```bash @@ -99,17 +72,14 @@ $ yarn run test # e2e tests $ yarn run test:e2e -# e2e tests in watch mode -$ yarn test:e2e:watch - # run specific e2e test file in watch mode -$ yarn test:e2e:watch --testPathPattern=filePath +$ yarn run test:e2e some-file.e2e-spec.ts # test coverage $ yarn run test:cov ``` -## Conventions +# Conventions ### Guards 1. In case a guard would return "false" for "canActivate" instead throw ForbiddenException with an error message containing guard name and the error. @@ -117,16 +87,3 @@ $ yarn run test:cov 3. If you use ApiAuthGuard but want that only specific auth method is allowed, for example, api key, then you also need to add `@ApiAuthGuardOnlyAllow(["API_KEY"])` under the `@UseGuards(ApiAuthGuard)`. Shortly, use `ApiAuthGuardOnlyAllow` to specify which auth methods are allowed by `ApiAuthGuard`. If `ApiAuthGuardOnlyAllow` is not used or nothing is passed to it or empty array it means that all auth methods are allowed. -## Support - -Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). - -## Stay in touch - -- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com) -- Website - [https://nestjs.com](https://nestjs.com/) -- Twitter - [@nestframework](https://twitter.com/nestframework) - -## License - -Nest is [MIT licensed](LICENSE). diff --git a/apps/api/v2/package.json b/apps/api/v2/package.json index e6c8000bcb..5310c8eb75 100644 --- a/apps/api/v2/package.json +++ b/apps/api/v2/package.json @@ -34,6 +34,7 @@ "generate-schemas": "yarn prisma generate && yarn prisma format", "copy-swagger-module": "ts-node -r tsconfig-paths/register src/swagger/copy-swagger-module.ts", "generate-swagger": "yarn copy-swagger-module && yarn build && node ./dist/apps/api/v2/src/swagger/generate-swagger-script.js", + "generate-secrets": "ts-node scripts/generate-secrets.ts", "prepare": "yarn run snyk-protect", "snyk-protect": "snyk-protect" }, diff --git a/apps/api/v2/scripts/generate-secrets.ts b/apps/api/v2/scripts/generate-secrets.ts new file mode 100644 index 0000000000..b239a68c09 --- /dev/null +++ b/apps/api/v2/scripts/generate-secrets.ts @@ -0,0 +1,13 @@ +import fs from "node:fs"; +import path from "node:path"; + +import { generateSecret } from "@calcom/platform-libraries"; + +const [hashed, plain] = generateSecret(); + +const outputPath = path.join(__dirname, "..", ".generated-secrets"); +const content = `plain - ${plain}\nhashed - ${hashed}\n`; + +fs.writeFileSync(outputPath, content); + +process.stdout.write(`Secrets written to: ${outputPath}\n`); diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index a79898784f..57b7245b83 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -410,6 +410,7 @@ "info": "Info", "welcome": "Welcome", "welcome_back": "Welcome back", + "welcome_back_sign_in": "Welcome back! Sign in to continue", "welcome_to_calcom": "Welcome to {{appName}}", "personal_welcome_description": "You're all set! Start scheduling meetings and managing your calendar.", "unlimited_calendars": "Unlimited calendars", @@ -2180,8 +2181,8 @@ "member_already_invited": "Member has already been invited", "already_in_use_error": "Username already in use", "enter_email_or_username": "Enter an email or username", - "enter_email": "Enter an email", - "enter_emails": "Enter emails", + "enter_email": "Enter an email", + "enter_emails": "Enter emails", "too_many_invites": "You are limited to inviting a maximum of {{nbUsers}} users at once.", "team_name_taken": "This name is already taken", "must_enter_team_name": "Must enter a team name", @@ -3040,9 +3041,13 @@ "time_range": "Time range", "automatically_add_all_team_members": "Add all team members, including future members", "redirect_to": "Redirect to", - "having_trouble_finding_time": "Having trouble finding a time?", - "show_more": "Show more", - "forward_params_redirect": "Forward parameters such as ?email=...&name=.... and more", + "having_trouble_finding_time": "Having trouble finding a time?", + "show_more": "Show more", + "signup_with_google": "Sign up with Google", + "signup_with_microsoft": "Sign up with Microsoft", + "signin_with_microsoft": "Sign in with Microsoft", + "continue_with_microsoft": "Continue with Microsoft", + "forward_params_redirect": "Forward parameters such as ?email=...&name=.... and more", "assignment_description": "Schedule meetings when everyone is available or rotate through members on your team", "lowest": "lowest", "low": "low", @@ -3958,7 +3963,7 @@ "pbac_desc_view_routing_forms": "View routing forms", "pbac_desc_update_routing_forms": "Update routing forms", "pbac_desc_delete_routing_forms": "Delete routing forms", - "pbac_opt_in_title":"Enable Roles & Permissions for your organization", + "pbac_opt_in_title": "Enable Roles & Permissions for your organization", "pbac_opt_in_description": "Take control of your organization with customizable roles and granular permissions for your team members.", "pbac_opt_in_custom_roles_title": "Custom roles", "pbac_opt_in_custom_roles_desc": "Create custom roles tailored to your organization's unique workflow", @@ -4520,5 +4525,5 @@ "set_organizer_as_contact_owner": "Set booking organizer as contact owner", "overwrite_existing_contact_owner": "Overwrite existing contact owner", "calendar_events_disabled_video_limitation": "When calendar events are disabled, meeting links cannot be generated for apps whose link generation is tied to calendar event creation, for example, Google Meet and Microsoft Teams. Other video apps like Cal Video will continue to work.", - "ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS":"↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your new strings above here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑" + "ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your new strings above here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑" } diff --git a/packages/platform/examples/base/.env.example b/packages/platform/examples/base/.env.example index 6af644be70..c28fad8c29 100644 --- a/packages/platform/examples/base/.env.example +++ b/packages/platform/examples/base/.env.example @@ -1,4 +1,26 @@ +# if you want to test examples app with platform oauth client, these are the values you need to set +# NEXT_PUBLIC_X_CAL_ID, X_CAL_SECRET_KEY, NEXT_PUBLIC_CALCOM_API_URL, ORGANIZATION_ID + +# if you want to test examples app with OAuth 2.0 client, these are the values you need to set +# NEXT_PUBLIC_OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET_PLAIN, OAUTH2_REDIRECT_URI, NEXT_PUBLIC_OAUTH2_MODE, NEXT_PUBLIC_CALCOM_API_URL + NEXT_PUBLIC_X_CAL_ID="" X_CAL_SECRET_KEY="" +# need these for booker embed atom NEXT_PUBLIC_CALCOM_API_URL="http://localhost:5555/api/v2" -ORGANIZATION_ID= \ No newline at end of file +VITE_BOOKER_EMBED_OAUTH_CLIENT_ID="clywuonwt0001regwyzy6subr" +VITE_BOOKER_EMBED_API_URL="http://localhost:5555/api/v2" + +# you can find this one in the platform dashboard, your oauth will have an org id +ORGANIZATION_ID=1 +# only required for e2e tests for apple connect atom +# if you want to just run the examples app, you can leave this empty +ATOMS_E2E_APPLE_ID= +ATOMS_E2E_APPLE_CONNECT_APP_SPECIFIC_PASSCODE= + +# only required if you want to test atoms with OAuth 2.0 client +NEXT_PUBLIC_OAUTH2_CLIENT_ID="" +OAUTH2_CLIENT_SECRET_PLAIN="" +OAUTH2_REDIRECT_URI="http://localhost:4321" + +NEXT_PUBLIC_OAUTH2_MODE="" \ No newline at end of file