* manual: app-directory-boilerplate-calcom
* manual: import components directly
* manual: move files to correct route groups and add metadata
* manual: Change structure & Refactor to make code up to date
* manual: refactors
* Fix
* manual: fix type of arg of getData
* manual: fix type error
* fix type bugs
* fix
* fixing the build
* wip
---------
Co-authored-by: Greg Pabian <35925521+grzpab@users.noreply.github.com>
* add check for already used slug
* Update _patch.ts
Removed comment that added no value based on the code. Renamed const
---------
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
* fix the fluctuations in sidebar when we scroll main content
* fix: reduced vertical padding instead of
TOP_BANNER_HEIGHT
---------
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
* add utcOffset in webhook
* add utcOffset in webhook
* fix type
* fix type
* fix function error
* fix: UTCOffset DST
* getUTCOffsetByTimezone support date param
* add startTime in `getUTCOffsetByTimezone` func
---------
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
* intuita codemod: remove-get-static-props
* intuita codemod: app-directory-boilerplate-calcom
* manual: refactor and add metadata title/description
* manual: Change structure & Refactor to make code up to date
* intuita codemod: app-directory-boilerplate-calcom
* manual: move folders to (settings-layout) route group
* manual: add title/description metadata
* manual: Change structure & Refactor to make code up to date
* intuita codemod: app-directory-boilerplate-codemod
* manual: move to (settings-layout) route group
* manual: add title/description metadata
* manual: Change structure & Refactor to make code up to date
* feat-profile-forwarding
* fix for promises of handling
* fix badge success color
* clean up
* fix suggested changes
* Changed design on booking-forward pages and moar test
* taking care of suggested changes, trpc errors and code cleaning
* improve text
* fix conflicting data-testid
* fix unique data-testid
* fix error css-global, email button styles, error conditional
* rename files to match functionality, remove away ui
* Add translations and migration
* remove log
* small fixes + improvements
* fix styles to match new design
* merge fixes
* Fix styles dark mode
* Solving merge conflicts from earlier
* Fix/change test to match new elements
* use trash icon button insted of dots (design issues)
* only send email if toUserId is set
* Fix date picker dark mode
* merge with remote
* removed status field from table and email its now for notify
* small text improvement in email
* check for team plan not paid plan
* fixes and clean up due to removing status
* fix old send request name to new behaviour
* more naming improvements and text
* remove status from handle-type
* code clean up
* fix type error
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
* fix: Button re-enables on sluggish networks whilst re-direct is happening
* Add explanatory comment
* fix: Booking form validation can take a while
---------
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* intuita codemod: app-directory-boilerplate-calcom
* manual: add title and description metadata for each page
* manual: move between folders
* manual: finalize migration
* manual: fix client components
* manual: Change structure & Refactor to make code up to date
---------
Co-authored-by: Benny Joo <sldisek783@gmail.com>
* Update UserAvatar and remove org avatar
* Update Imports
* Fix imports to use calcom/ui
* type: fix imports
* fix: use testId on profile
* test: use image src instead of innerHTML
* fix: Allow alt on useravatar
* test: add testId to org profile
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* Move orgMigration routes to app to allow them to be tested as they are here to stay for longer tim
* move to Form everywhere and fix session reading
---------
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
* fix: Ensure generated Cal Video link matches expected pattern on booking confirmation
* fix: missing Google Meet videoCallUrl in webhooks on booking confirmation
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: gitstart-calcom <gitstart-calcom@users.noreply.github.com>
Co-authored-by: GitStart-Cal.com <121884634+gitstart-calcom@users.noreply.github.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
* chore: Inherit secrets for assigning team labels
* Added workflow_call for testing
* Added this branch for testing
* Moved secrets label
* Trying to set permissions differently
* Removed testing branch
* feat: integrate formbricks in help feedback box
* Update yarn.lock
* Update yarn.lock
* fix: use formbricks/api@v1.1 & set user with userId linked to feedback
* fix: use separate env vars as suggested
* test: Add more orgs tests (#12241)
* feat: integrate formbricks in help feedback box
* Update yarn.lock
* fix: yarn lockfile
* fix: yarn lockfile again
* feat: link cal and formbricks user.id and add attributes of email and username to formbricks person object
* Update yarn.lock
* Update yarn.lock
* fix: type safety in enums
---------
Co-authored-by: Peer Richelsen <peer@cal.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* doc: Add Tunnelmole as an open source alternative to ngrok plus minor grammar fixes
* Update README.md
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
* add workflows to bookingScenario
* activate sandbox mode for unit/integreation tests
* add sendgrid specific code to SendgridProvider
* Refactor WIP
* remove duplicate sendgridProvider file
* first implementation for testing workflows
* revert unintended changes
* comment out Workflow trigger tests
* move sendgrid check after test mode
* Update signup.tsx
* fix esLint
* test webhooks on all tests in fresh-booking.test.ts
* fix subjectPattern as title can be different
* add workflow tests to reschedule.test.ts
* code clean up
* code clean up
* fix sendgrid credentials missing message
* code clean up
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
* Prevent two payment apps from being enabled
* Find the enabled payment app to update the event type
* Add string
* Add tests
* Type fix
* Abstract check for multiple payment app logic
* Type check
* Address feedback
* chore: Enable One Payment App Per Event Type (#12414)
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
Co-authored-by: Morgan Vernay <morgan@cal.com>
* Fix bug
* Fix test
* Clean up
* Fix test
* Fix test
---------
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Morgan Vernay <morgan@cal.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
* fix: managed event type string
* Update EventTypeSingleLayout.tsx
Updated the translation string with the right value.
* Update EventTypeSingleLayout.tsx
Bring back formMethods variable.
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
This reverts commit 0d3baee593.
Revert "fix: temp renamed app dir to prevent OOM"
This reverts commit 0d3baee593.
Revert "fix: temp renamed app dir to prevent OOM"
This reverts commit 0d3baee593.
Revert "fix: temp renamed app dir to prevent OOM"
This reverts commit 0d3baee593.
* fix: join subteam as their respective organization role
* refactor code
* fix: join subteam as their respective organization role
* fix: join subteam as their respective organization role for pending members
* fix: Set subteam role to admin when updating organization role to admin
* refactor: suggested changes and fix type error
* fix: type error
* fix: Correctly prefill username in case of non-org email invite in an org
* Update test
---------
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
* chore: Moved e2e suite to run on pushes to main
* Update yarn.lock
* Small cleanup
* Moved production build without database to pre-release
* Added name to script
* Added changes, lint and build dependencies
* Add metadata to bookingMinimalSelect
* add: Show link location in /bookings
* Refactor: Update variable declaration and conditional rendering in booking metadata
- Remove explicit type declaration in locationVideoCallUrl assignment
- Use conditional rendering for provider icon based on iconUrl existence
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
* Display URL location exclusively, omitting addresses
---------
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* fix: type error
* chore
* Dont run future tests
* Skip more tests
* Fix 404 text
* Fix more tests
---------
Co-authored-by: Hariom <hariombalhara@gmail.com>
* fix: allow API access to creating a team that you are a member of
* update roles allowed to create event types
* add back comment
* revert yarn.lock
---------
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* Fix toolbar
* Slide animation
* Animate out and fix selection model
* Disable on mobile - fix tablet position
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* fix: change booking page filter ui to match figma
* fix: style change for filters in mobile
* made all changes requested by reviewers
* fix: add clear filter
---------
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Udit Takkar <udit222001@gmail.com>
* test: booking and frequency limits e2e
* test: refactor limit e2e and check multiple
* test: move limits e2e to separate file
* fix: blocked day assertions
* chore: rename to booking-limits
* fix: use todo test util
* chore: un-DRY tests
* feat: create user with limits helper
* chore: move user limit helper to utils
* fix: multiple limits test
* feat: fail faster
* chore: event url helper
* fix: prismock count date comparisons
* chore: improve booking limit types in test utils
* test: add typed weekStart to getOrganizer helper
* test: add custom fromDate to getDate helper
* fix: correctly handle negative date increments
* test: add helper for partial weeks
* test: booking limits edge cases
* chore: remove booking limit e2e todos
* chore: normalize getDate return type and skip test
* Fix imports paths that are changes after main merge
* Fix failing types
* Skip failing test
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Hariom <hariombalhara@gmail.com>
* refactor booking details api middleware to use team member booking join
Signed-off-by: titanventura <aswath7862001@gmail.com>
* fix. security issue in previous commit. check for booking against current user. then check for team booking
Signed-off-by: titanventura <aswath7862001@gmail.com>
---------
Signed-off-by: titanventura <aswath7862001@gmail.com>
* fix: adding team members from organization tab that alredy exist
* changed organizations.listOtherTeamMembers from useQuery to useInfiniteQuery
* undo yarn.lock
* fix: invalidate the organizations.getMembers query on removeMember and inviteMember Mutation
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Hariom <hariombalhara@gmail.com>
* ignore original rescheduled booking for booking limits
* fix unit test
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
* fix divider border for addOnLeading
* fix primary button in dark mode and password input border
* signup dark mode and corner fix
* onboarding dark mode
* fix css var issue and use inline vars for light and dark mode
* Invert google icon on dark mode
* Fix typo
* fix eslint errors with yarn lint:fix
* use css vars on login page as well
* running lint manually
* Fix subtle
* Fix
* Fix
* linting
* linting
* chore: restore main yarn.lock
* fix: lint error
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Sean Brydon <sean@brydon.io>
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
Co-authored-by: sean-brydon <sean@cal.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* add wrapper for sentry and update functions in 'getUserAvailability'. Update tracesSampleRate to 1.0
* Make Sentry Wrapper utilize parent transaction, if it exists.
* Update wrapper for functions to inherit parameters from the child function
* add comment of when to use the wrapper
* check for sentry before wrapping, if not call unwrapped function
* refactored wrapper to have async and sync separate functions that utilize helpers for common behaviour
* update type of args to unknown
* fixed types of returns from wrapped functions
---------
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* feat: rate limit removeMember
* Remove optional type as its always there
* fix
---------
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* improved team upgrade screen to also show unpublished teams
* Update TeamsListing.tsx
* bunch of stuff
---------
Co-authored-by: Omar López <zomars@me.com>
## What does this PR do?
<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -->
In anticipation of refactoring `handleSeats` we need to abstract `createBooking` in order to get the return type. This PR is purposely aiming to do one thing so nothing is missed while refactoring `handleNewBooking`
Fixes # (issue)
<!-- Please provide a loom video for visual changes to speed up reviews
Loom Video: https://www.loom.com/
-->
## Requirement/Documentation
<!-- Please provide all documents that are important to understand the reason of that PR. -->
- If there is a requirement document, please, share it here.
- If there is ab UI/UX design document, please, share it here.
## Type of change
<!-- Please delete bullets that are not relevant. -->
- [x] Chore (refactoring code, technical debt, workflow improvements)
## How should this be tested?
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Write details that help to start the tests -->
- Are there environment variables that should be set?
- What are the minimal test data to have?
- What is expected (happy path) to have (input and output)?
- Any other important info that could help to test that PR
## Mandatory Tasks
- [ ] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.
## Checklist
<!-- Please remove all the irrelevant bullets to your PR -->
- I haven't read the [contributing guide](https://github.com/calcom/cal.com/blob/main/CONTRIBUTING.md)
- My code doesn't follow the style guidelines of this project
- I haven't commented my code, particularly in hard-to-understand areas
- I haven't checked if my PR needs changes to the documentation
- I haven't checked if my changes generate no new warnings
- I haven't added tests that prove my fix is effective or that my feature works
- I haven't checked if new and existing unit tests pass locally with my changes
* docs:add google credentials in example env
* docs: add a space after #
* chore: update .env.example
---------
Co-authored-by: Udit Takkar <udit222001@gmail.com>
* feat: Base implementation of v2 of avatars
* Make avatarUrl and logoUrl entirely optional
* Made necessary backwards compat changes
* fix: type errors
* Fix: OG image
* fix types
* Consistency with other behaviour, ux tweak
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* Inital UI + layout setup
* use booker approach of grid
* event-select - sidebar + store work
* adds get schedule by event-type-slug
* Calendar toggle
* Load schedule from event slug
* Add busy events to calendar
* useschedule
* Store more event info than just slug
* Add date override to calendar
* Changes sizes on smaller screens
* add event title as a tooltip
* Ensure header navigation works
* Stop navigator throwing errors on inital render
* Correct br
* Event duration fixes
* Add getMoreInfo if user is authed with current request.username
* Add calendar color map wip
* Add WIP comments for coloured outlines
* Revert more info changes
* Calculate date override correctly
* Add description option
* Fix inital schedule data not being populated
* Nudge overlap over to make it clearer
* Fix disabled state
* WIP on math logic
* Event list overlapping events logic
* NIT about width
* i18n + manage calendars link
* Delete old troubleshooter
* Update packages/features/calendars/weeklyview/components/event/EventList.tsx
* Remove t-slots
* Fix i18n & install calendar action
* sm:imrovments
* NITS
* Fix types
* fix: back button
* Month prop null as we control from query param
* Add head SEO
* Fix headseo import
* Fix date override tests
## What does this PR do?
<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -->
This PR adds the `credentialId` to payment app data. This fixes a bug where team installed payment apps were not working with team events.
Fixes # (issue)
<!-- Please provide a loom video for visual changes to speed up reviews
Loom Video: https://www.loom.com/
-->
## Requirement/Documentation
<!-- Please provide all documents that are important to understand the reason of that PR. -->
- If there is a requirement document, please, share it here.
- If there is ab UI/UX design document, please, share it here.
## Type of change
<!-- Please delete bullets that are not relevant. -->
- [x] Bug fix (non-breaking change which fixes an issue)
## How should this be tested?
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Write details that help to start the tests -->
- Install Stripe for the individual user
- Enable it for the individual's event type
- The `credentialId` should be saved to the metadata
- Install Stripe to the user's team
- Enable it in the team's event type
- The `credentialId` should be saved to the metadata
## Mandatory Tasks
- [ ] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.
## Checklist
<!-- Remove bullet points below that don't apply to you -->
- I haven't checked if new and existing unit tests pass locally with my changes
Fixes: https://github.com/calcom/cal.com/issues/12297
Fixes https://github.com/calcom/cal.com/issues/11234
- Displaying error message and X-Vercel-Id( Unique Request Id ) to user on book event form
- Improve error logging
- Add Error codes
Few things to discuss
1) How to handle calendar integration failures ?
Currently if for example google integration is broken and someone is trying to book that person then we log the error but don't inform the user that the google calendar is broken and the meeting goes through.
Should I throw error when integration is broken ?
<img width="758" alt="Screenshot 2023-11-12 at 12 52 36 AM" src="https://github.com/calcom/cal.com/assets/53316345/c4d921c4-9c8a-4b9b-82a2-bbe0fdbcb3d4">
2) How to handle conferencing app failures?
We just default to Cal Video as location if we are unable to generated conferencing url and log the error and not inform the user(organizer).
## What does this PR do?
Fixes that it can happen that Round Robin host is booked outside of availability.
I found and fixed the following two scenarios where this can happen:
- when host has a date override
- when host is available for only a part the event time (for example, booking time 9:00-11:00 and user is only available between 10:00-11:00)
Fixes#10315Fixes#11690
It also fixes that it can happen that round robin doesn't correctly pick the luck user (least recently booked). This happened when a user was an attendee of a booking before, then we always compared this booking and never the actual last booking of this user.
## Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
## How should this be tested?
#### Booked outside of availability:
1.
- Create Round Robin event and assign user1 and user2 as round robin hosts
- event duration: 120 minutes
- user 1 availability:
- Monday to Friday 9:00-17:00
- user2 availability:
- Monday to Friday 10:00-17:00
- Book event at a 9:00 slot -> check if i user1 is booked
- Book event again at a 9:00 slot -> check if user1 is booked again (user2 is not available at that time)
2.
- Change availability of user2
- Mark Monday as unavailable
- Add date override on any day this month
- Book any Monday this month -> see that user 1 is booked
- Again Book any Monday this month -> see that user 1 is booked again
#### Wrong lucky user
- Book event and add user1's email as the attendee email address
- Book several slots where both users should be available, and see that it alternates between user1 and user2 (before it ended up always booking user1)
## Mandatory Tasks
- [ ] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.
## What does this PR do?
- Adds AB tests middleware that redirects users to the app-dir pages with probability that is defined by env var
<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -->
Fixes # (issue)
<!-- Please provide a loom video for visual changes to speed up reviews
Loom Video: https://www.loom.com/
-->
## Requirement/Documentation
<!-- Please provide all documents that are important to understand the reason of that PR. -->
This PR requires new env variables:
`APP_ROUTER_EVENT_TYPES_ENABLED` - boolean that defines if app dir event-types page redirect is enabled
`AB_TEST_BUCKET_PROBABILITY` - number [0, 100] that defines the percentage of users getting redirected to the app dir pages
## Type of change
<!-- Please delete bullets that are not relevant. -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] Chore (refactoring code, technical debt, workflow improvements)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
## How should this be tested?
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Write details that help to start the tests -->
Does not requires testing, implements middleware as a dead code
## Mandatory Tasks
- [x] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.
* chore: Reduce API serverless memory configuration
* Only limit to slots for now
* Moved the vercel.json file to root
* More fun with vercel.json files
* Trying new pattern
* Using a pattern that matches the Vercel deployment summary function name
* Trying to set the memory directly in the handler file
* Trying it on all functions
* Changed glob
* Moved vercel.json file to root
* Trying a new glob
* Give me all functions
* Trying just * for all functions
* Trying again...
* Putting the config on the defaultResponder
* Seeing if web app takes setings
* Changed .js to .ts
* Changed root path
* Added back vercel.json now that the path is changed
* Reduced API slots memory to 512
* Removed unneeded code changes'
* Update defaultResponder.ts
* fix: getTeamOrThrow ran on every request
This creates unnecessary strain on the DB when someone is hitting the endpoint a lot.
* Add rate limit
* Update packages/trpc/server/routers/viewer/teams/inviteMember/inviteMember.handler.ts
---------
Co-authored-by: Sean Brydon <sean@cal.com>
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
* GCal set primary calendar on install
* Outlook set default calendar as selected cal
* Zoho create selected calendar on install
* Lark create selected cal on install
* added initial app
* created basic functionality for Shimmer Video app with tracking of Daily rooms
* changed the type config value in the shimmer video config.json
* re-fixed update to shimmer-video config type
* updated static images for shimmer video app
* fixed tracking Shimmer video event parameter
* Add zod files
* Allow query for "conferencing" apps
* Move to shimmer video
* Redirect to shimmer app
* Remove console.logs
* Remove legacy use of seed-app-store.
---------
Co-authored-by: Peer Richelsen <peer@cal.com>
Co-authored-by: Vik <vsreed@stanford.edu>
Co-authored-by: pathaksarvesh <sarvesh@incrediblevisibility.com>
Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: Hariom <hariombalhara@gmail.com>
Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
## What does this PR do?
<!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -->
Fix wrong import introduced in this pr: #11187
<!-- Please provide a loom video for visual changes to speed up reviews
Loom Video: https://www.loom.com/
-->
## Requirement/Documentation
<!-- Please provide all documents that are important to understand the reason of that PR. -->
- If there is a requirement document, please, share it here.
- If there is ab UI/UX design document, please, share it here.
## Type of change
<!-- Please delete bullets that are not relevant. -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Chore (refactoring code, technical debt, workflow improvements)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
## How should this be tested?
<!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Write details that help to start the tests -->
- Are there environment variables that should be set?
- What are the minimal test data to have?
- What is expected (happy path) to have (input and output)?
- Any other important info that could help to test that PR
## Mandatory Tasks
- [ ] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.
## Checklist
<!-- Remove bullet points below that don't apply to you -->
- I haven't read the [contributing guide](https://github.com/calcom/cal.com/blob/main/CONTRIBUTING.md)
- My code doesn't follow the style guidelines of this project
- I haven't commented my code, particularly in hard-to-understand areas
- I haven't checked if my PR needs changes to the documentation
- I haven't checked if my changes generate no new warnings
- I haven't added tests that prove my fix is effective or that my feature works
- I haven't checked if new and existing unit tests pass locally with my changes
* fix: Infinite loop in timezones on the negative side of UTC
* Update packages/features/calendars/lib/getAvailableDatesInMonth.test.ts
* Revert back to real system time after test
* Handle all dates as local time, given this all happens in the browser
* fix: allow dots in username
* test: added unit tests for slugify
* test: add test for username change
* tests: add test for username and dynamic booking
* fix: type error
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* Date add 1 day adds 24 hours, not 1 day, causing the last date to be lost on dst change
* Alternate fix with tests
* Extract logic so test file doesnt register tsx
* bump nextjs version in ai
* lowercase username and email
* onboarding email
* direct user to install app if not installed
* multiple suggested times for link flow
* summary of context prompt engineering
* specify the @username nuance and discourage Ids
* v1.2.0
* Update README
* Change title
* simplify and improve booking link flow
* add build:ai to package.json
* better onboarding copy
* onboarding touches
* remove console logs and temp hacks
* remove env vars in app store and token in AI app
* invited user id should be string
---------
Co-authored-by: tedspare <ted.spare@gmail.com>
## What does this PR do?
- Fix that the last day in Oktober was always shown as unavailable
This happened when availability was in Europe/London timezone
- Fix that the last day of November was always shown as unavailable
This happened also for other timezones
## Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
## How should this be tested?
I recommend testing it in staging instead of local, as I experienced some different behaviors on local
- Reproduce the 2 bugs as described before my fix
- If you were able to reproduce it, see if it is fixed with my fixes in this PR (last day of octber and November should be shown as available)
- Check if availability starts and ends at the correct time on days were DST happens
* Init header + login modal component
* Add calendar settings for authed user
* Local storage and using query params for toggle
* Toggle connect screen if query param present and no session
* Local storage + store + way more than that should be in single commit
* Display busy events on weekly view
* Confirm booking slot of overlap exists
* use chevron right when on column view
* Show hover card - overlapping date times
* Invalidate on switch
* FIx clearing local storage when you login to another account
* Force re-render on url state (atom quirks)
* Add loading screen
* Add dialog close
* Remove extra grid config
* Translations
* [WIP] - tests
* fix: google calendar busy times (#11696)
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
* New Crowdin translations by Github Action
* fix: rescheduled value DB update on reschedule and insights view cancelleds (#11474)
* v3.3.5
* fix minutes string (#11703)
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
* Regenerated yarn.lock
* Add error component + loader
* await tests
* disable tests - add note
* Refactor to include selected time
* use no-scrollbar
* Fix i18n
* Fix tablet toolbar
* overflow + i18n
* Export empty object as test is TODO
* Uses booker timezone
* Fix hiding switch too early
* Handle selected timezone
* Fix timezone issues
* Fix timezone issues
---------
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Peer Richelsen <peer@cal.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* add parentId
* Allow POST parentId
* adds eventtypeid of children
* add doc
* adds userId in children
* adds validations
* adds docstring
* fix status codes
* check fix for owners
* new logo for cal video
* fixed cal video and other inverted icons
* Discard changes to apps/web/components/eventtype/EventAdvancedTab.tsx
* moved function to lib
* For dynamic search users based on org
* Type fix
---------
Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: Leo Giovanetti <hello@leog.me>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
* add orgs upgrade badge to select
* don't allow updating to if no teams or orgs plan
* make sure only paying users can request verification codes
* add new action helper function
* remove kyc code
* code clean up
* fix verify button UI
* fix type errors
* add eventTypeRequiresConfirmation everywhere
* address feedback
---------
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
* fix: team members not showing up in org members list
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
* fix: use upsert
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
* Update apps/web/pages/api/auth/signup.ts
Co-authored-by: Leo Giovanetti <hello@leog.me>
---------
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
Co-authored-by: Leo Giovanetti <hello@leog.me>
* test: add test cases to `window.getEmbedNamespace`
* test: add test cases when window.name doesn't have cal-embed=
* test: add test case to `getembedTheme` returning the theme from embedStore
* test: add test to `getEmbedTheme` returning the theme from query params
* Small refactor to reduce the time taken by tests and fix missing typings for embed functions on window
* Fix weird test failure
* Fix type import error caught by api.test.test
---------
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
* Add booker info, event type title, and organizer info into Stripe metadata
* Add back bookingTitle in addition to eventTitle
* Remove .tool-versions
* Fix typo
---------
Co-authored-by: alannnc <alannnc@gmail.com>
* When creating new user, set email handle as username
* Accounting for external invited users
---------
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Leo Giovanetti <hello@leog.me>
* fix: multiple organizer address bug
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
* fix: add inPerson condition
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
* fix: change options
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
* Send _type along with the response to be able to determine what input was it. We can use that later
* Revert "Send _type along with the response to be able to determine what input was it. We can use that later"
This reverts commit c75ba57ad1.
* Update multiple organizer address test to verify the test fix
* Add a test to ensure that sending label would correctly add that label as location
---------
Signed-off-by: Udit Takkar <udit.07814802719@cse.mait.ac.in>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
* Reduce the unhandled promise
* Connect selected calendar to credential
* Write credential to selected calendar
* Type fix
* Handle catching promises in separate threads
* Only call to list calendars if there are no credentialIds
* Changed type of IntegrationCalendar from undef to null
* Adding missing property to getting started
* Also add calendars.tsx
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* feat: autolink org on provider signup
* Adding env var in example
* slugifying inferred org username
* Updated org README
* Optional env var for autolinking added to readme
* Typo
* md syntax correction
* Verifying user when autolinked
* Also verifying users invited to org
* Applying feedback
* Scoping to Google for now
* Updating comment
* Updating readme with Google scoping
* perf: pre-load booking data for all users
* Fixing property issues
* Fixes
* Removed unwanted console.log
* Made comment for intention of refactor more clear
* fix: types
* _count is optional
* Assign to const bookings
* Added mock for prisma booking
* Fixed unit tests
* Added lint ignore for prisma field
* Update bookingScenario.ts
* Fix linting
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* Pass organization name & logo
* Overflow hidden
* Show org icon on public page
* Add org logo to large user avatars
* Clean up
* Add org name and logo to context
* Get org logo from /avatar.png endpoint
* Do not query for logo
* Remove name and logo from session middleware
* Type fix
* Set user onboarding org logo
* feat: organization avatar component (#10788)
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
* Type fixes
* Type fix
* Transition to org slug for organization avatar
* Address feedback
* Clean up
* Clean up
* Type fix
* fix: set avatar cache control (#11163)
* test: Integration tests for handleNewBooking (#11044)
Co-authored-by: Shivam Kalra <shivamkalra98@gmail.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
* fix: booking_paid webhook and added new payment metadata (#11093)
* app store improvements, logos, dark mode, added screenshots, fixed author names (#11164)
* fix: mobile event types and avatars (#11184)
* New Crowdin translations by Github Action
* fix: updateProfile metadata overwrite (#11188)
Co-authored-by: alannnc <alannnc@gmail.com>
* New Crowdin translations by Github Action
---------
Co-authored-by: Sean Brydon <sean@cal.com>
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: Shivam Kalra <shivamkalra98@gmail.com>
Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Leo Giovanetti <hello@leog.me>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
* perf: Removed unused queries for user event types
* Added empty children array
* Refactor to clean up
* Fixing type issue
* Removed extra call to get raw event types
* Temporarily putting children back
* Removing include from children
* Added check for children
* Put children back for testing
---------
Co-authored-by: Alan <alannnc@gmail.com>
## What does this PR do?
Fixes https://github.com/calcom/cal.com/issues/11075
BEFORE:
Meeting has been rescheduled email and calendar event after submitting booking without confirming the meeting (require confirmation event type).
<img width="1086" alt="Screenshot 2023-09-05 at 7 45 44 PM" src="https://github.com/calcom/cal.com/assets/53316345/574c8d2f-3698-44ea-9466-aef162e09dd5">
AFTER:-
event scheduled email and calendar event created only after "awaiting approval" meeting has been confirmed.
<img width="1086" alt="Screenshot 2023-09-05 at 7 47 22 PM" src="https://github.com/calcom/cal.com/assets/53316345/af19ccea-d418-4a40-a9c6-88782522df53">
## Type of change
<!-- Please delete bullets that are not relevant. -->
- [x] Bug fix (non-breaking change which fixes an issue)
## How should this be tested?
1) Create a requires confirmation event type
2) open incognito tab or another browser and book a meeting (Attendee)
3) Confirm the booking (Organizer) and attendee would get meeting schedule email
4) Get the reschedule link from attendee's email and reschedule the booking
Both attendee and organiser shouldn't get booking email or calendar event before organiser has accepted the meeting
* current time in user timezone, let ai handle 401
* update agent.ts
* simple onboarding for non cal.com users
* reverting this line - unecessary
* v1.0.1
* Fixes username invite issue
* Ensure we only suggest email invites in org members
---------
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
* added feature:team admin can see connected apps of members
* fixed the type error
* Update packages/lib/server/queries/teams/index.ts
* Minor fixes
---------
Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: mohammed gehad <mohammed.gehad.1998@gmail.com>
Co-authored-by: Monto <138862352+monto7926@users.noreply.github.com>
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
* fix: weird margin top in avatar
* fix: pending users are shown on booking page
* fix: avatar and naming issues
* fix: toast alignment and removing unneeded titles
* missing changes from toast improvements
* feat: empty state for teams without event types
* Removing console.log
# This variable should only be set to 1 or true if you want to autolink external provider sing-ups with
# existing organizations based on email domain address
ORGANIZATIONS_AUTOLINK=
# Vercel Config to create subdomains for organizations
# Get it from https://vercel.com/<TEAM_OR_USER_NAME>/<PROJECT_SLUG>/settings
PROJECT_ID_VERCEL=
@ -220,8 +254,80 @@ PROJECT_ID_VERCEL=
TEAM_ID_VERCEL=
# Get it from: https://vercel.com/account/tokens
AUTH_BEARER_TOKEN_VERCEL=
# Add the main domain that you want to use for testing vercel domain management for organizations. This is necessary because WEBAPP_URL of local isn't a valid public domain
# Would create org1.example.com for an org with slug org1
# LOCAL_TESTING_DOMAIN_VERCEL="example.com"
## Set it to 1 if you use cloudflare to manage your DNS and would like us to manage the DNS for you for organizations
# CLOUDFLARE_DNS=1
## Get it from: https://dash.cloudflare.com/profile/api-tokens. Select Edit Zone template and choose a zone(your domain)
# AUTH_BEARER_TOKEN_CLOUDFLARE=
## Zone ID can be found in the Overview tab of your domain in Cloudflare
# CLOUDFLARE_ZONE_ID=
## It should usually work with the default value. This is the DNS CNAME record content to point to Vercel domain
# CLOUDFLARE_VERCEL_CNAME=cname.vercel-dns.com
# - APPLE CALENDAR
# Used for E2E tests on Apple Calendar
E2E_TEST_APPLE_CALENDAR_EMAIL=""
E2E_TEST_APPLE_CALENDAR_PASSWORD=""
# - CALCOM QA ACCOUNT
# Used for E2E tests on Cal.com that require 3rd party integrations
- If this issue has a `🚨 needs approval` label, don't start coding yet. Wait until a core member approves feature request by removing this label, then you can start coding.
- For clarity: Non-core member issues automatically get the `🚨 needs approval` label.
- Your feature ideas are invaluable to us! However, they undergo review to ensure alignment with the product's direction.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
Contributions are what makes the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
## House rules
- Before submitting a new issue or PR, check if it already exists in [issues](https://github.com/calcom/cal.com/issues) or [PRs](https://github.com/calcom/cal.com/pulls).
- GitHub issues: take note of the `🚨 needs approval` label.
- **For Contributors**:
- Feature Requests: Wait for a core member to approve and remove the `🚨 needs approval` label before you start coding or submit a PR.
- Bugs, Security, Performance, Documentation, etc.: You can start coding immediately, even if the `🚨 needs approval` label is present. This label mainly concerns feature requests.
- **Our Process**:
- Issues from non-core members automatically receive the `🚨 needs approval` label.
- We greatly value new feature ideas. To ensure consistency in the product's direction, they undergo review and approval.
- Before jumping into a PR be sure to search [existing PRs](https://github.com/calcom/cal.com/pulls) or [issues](https://github.com/calcom/cal.com/issues) for an open or closed item that relates to your submission.
## Priorities
@ -37,7 +48,7 @@ Contributions are what make the open source community such an amazing place to l
</tr>
<tr>
<td>
Core Features (Booking page, availabilty, timezone calculation)
Core Features (Booking page, availability, timezone calculation)
- Use `openssl rand -base64 32` to generate a key and add it under `NEXTAUTH_SECRET` in the `.env` file.
- Use `openssl rand -base64 24` to generate a key and add it under `CALENDSO_ENCRYPTION_KEY` in the `.env` file.
6. Start developing and watch for code changes:
6. 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:
```sh
nvm use
```
You first might need to install the specific version and then use it:
```sh
nvm install && nvm use
```
You can install nvm from [here](https://github.com/nvm-sh/nvm).
7. Start developing and watch for code changes:
```sh
yarn dev
@ -120,6 +146,16 @@ This will run and test all flows in multiple Chromium windows to verify that no
yarn test-e2e
```
#### Resolving issues
##### E2E test browsers not installed
Run `npx playwright install` to download test browsers and resolve the error below when running `yarn test-e2e`:
```
Executable doesn't exist at /Users/alice/Library/Caches/ms-playwright/chromium-1048/chrome-mac/Chromium.app/Contents/MacOS/Chromium
```
## Linting
To check the formatting of your code:
@ -132,7 +168,52 @@ If you get errors, be sure to fix them before committing.
## Making a Pull Request
- Be sure to [check the "Allow edits from maintainers" option](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork) while creating you PR.
- If your PR refers to or fixes an issue, be sure to add `refs #XXX` or `fixes #XXX` to the PR description. Replacing `XXX` with the respective issue number. See more about [Linking a pull request to an issue
- Be sure to [check the "Allow edits from maintainers" option](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork) while creating your PR.
- If your PR refers to or fixes an issue, be sure to add `refs #XXX` or `fixes #XXX` to the PR description. Replacing `XXX` with the respective issue number. See more about [Linking a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue).
- Be sure to fill the PR Template accordingly.
- Review [App Contribution Guidelines](./packages/app-store/CONTRIBUTING.md) when building integrations
## Guidelines for committing yarn lockfile
Do not commit your `yarn.lock` unless you've made changes to the `package.json`. If you've already committed `yarn.lock` unintentionally, follow these steps to undo:
If your last commit has the `yarn.lock` file alongside other files and you only wish to uncommit the `yarn.lock`:
```bash
git checkout HEAD~1 yarn.lock
git commit -m "Revert yarn.lock changes"
```
If you've pushed the commit with the `yarn.lock`:
1. Correct the commit locally using the above method.
2. Carefully force push:
```bash
git push origin <your-branch-name> --force
```
If `yarn.lock` was committed a while ago and there have been several commits since, you can use the following steps to revert just the `yarn.lock` changes without impacting the subsequent changes:
1. **Checkout a Previous Version**:
- Find the commit hash before the `yarn.lock` was unintentionally committed. You can do this by viewing the Git log:
```bash
git log yarn.lock
```
- Once you have identified the commit hash, use it to checkout the previous version of `yarn.lock`:
```bash
git checkout <commit_hash> yarn.lock
```
2. **Commit the Reverted Version**:
- After checking out the previous version of the `yarn.lock`, commit this change:
```bash
git commit -m "Revert yarn.lock to its state before unintended changes"
```
3. **Proceed with Caution**:
- If you need to push this change, first pull the latest changes from your remote branch to ensure you're not overwriting other recent changes:
This is the privacy notice of MaroCalendar, a personal calendar booking service that is only used by me, Gustavo Maronato, to manage my personal and work calendars, and allow you to book events with me. Here, you'll find a description of how and why I might collect, store, and use your information when you book an event with me using this service.
The service is located at [https://cal.maronato.dev](https://cal.maronato.dev).
### Questions or concerns?
Reading this privacy notice will help you understand your privacy rights and choices. If you do not agree with my policies and practices, please do not access or book an event with me using this service.
## SUMMARY OF KEY POINTS
### What personal information do I process?
When you choose to book an event with me, you provide me with your name and email address.
### Do I process any sensitive personal information?
I do not process sensitive personal information.
### Do I receive any information from third parties?
I do not receive any information from third parties.
### How do I process your information?
When you book an event with me, I use your name and email address to send you an email with a calendar invite to the event you booked.
### In what situations and with which parties do I share personal information?
The information you submit is used to create a booking between myself and you. I do not share your information with any third parties.
### How do I keep your information safe?
I use reasonable and appropriate security measures to protect your personal information from loss, misuse, and unauthorized access, disclosure, alteration, and destruction.
### What are your rights?
You can cancel your booking at any time by clicking the link in the confirmation email you received when you booked the event.
### Google Calendar
I use a Google Calendar oAuth integration to automatically display to you what are my free time slots and manage the events you book on my calendar. You do not interact with this integration and you are not allowed to use your Google account to add this integration to your Google Calendar. This integration is only used by me to manage my calendar and is not shared with anyone else.
<ahref="https://cal.com"><strong>Learn more »</strong></a>
<br/>
@ -50,7 +50,7 @@
# Scheduling infrastructure for absolutely everyone
The open source Calendly alternative. You are in charge
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.
@ -122,7 +122,7 @@ Here is what you need to be able to run Cal.com.
### Setup
1. Clone the repo into a public GitHub repository (or fork https://github.com/calcom/cal.com/fork). If you plan to distribute the code, keep the source code public to comply with [AGPLv3](https://github.com/calcom/cal.com/blob/main/LICENSE). To clone in a private repository, [acquire a commercial license](https://cal.com/sales))
1. Clone the repo into a public GitHub repository (or fork https://github.com/calcom/cal.com/fork). If you plan to distribute the code, keep the source code public to comply with [AGPLv3](https://github.com/calcom/cal.com/blob/main/LICENSE). To clone in a private repository, [acquire a commercial license](https://cal.com/sales)
```sh
git clone https://github.com/calcom/cal.com.git
@ -131,22 +131,38 @@ Here is what you need to be able to run Cal.com.
> If you are on Windows, run the following command on `gitbash` with admin privileges: <br> > `git clone -c core.symlinks=true https://github.com/calcom/cal.com.git`<br>
> See [docs](https://cal.com/docs/how-to-guides/how-to-troubleshoot-symbolic-link-issues-on-windows#enable-symbolic-links) for more details.
1. Go to the project folder
2. Go to the project folder
```sh
cd cal.com
```
1. Install packages with yarn
3. Install packages with yarn
```sh
yarn
```
1. Set up your `.env` file
4. Set up your `.env` file
- Duplicate `.env.example` to `.env`
- Use `openssl rand -base64 32` to generate a key and add it under `NEXTAUTH_SECRET` in the `.env` file.
- Use `openssl rand -base64 24` to generate a key and add it under `CALENDSO_ENCRYPTION_KEY` in the `.env` file.
- Use `openssl rand -base64 32` to generate a key and add it under `CALENDSO_ENCRYPTION_KEY` in the `.env` file.
5. 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:
```sh
nvm use
```
You first might need to install the specific version and then use it:
```sh
nvm install && nvm use
```
You can install nvm from [here](https://github.com/nvm-sh/nvm).
If you don't want to create a local DB. Then you can also consider using services like railway.app or render.
- [Setup postgres DB with railway.app](https://arctype.com/postgres/setup/railway-postgres)
- [Setup postgres DB with railway.app](https://docs.railway.app/guides/postgresql)
- [Setup postgres DB with render](https://render.com/docs/databases)
1. Copy and paste your `DATABASE_URL` from `.env` to `.env.appStore`.
1. Set a 32 character random string in your `.env` file for the `CALENDSO_ENCRYPTION_KEY` (You can use a command like `openssl rand -base64 24` to generate one).
1. Set up the database using the Prisma schema (found in `packages/prisma/schema.prisma`)
> New users are set on a `TRIAL` plan by default. You might want to adjust this behavior to your needs in the `packages/prisma/schema.prisma` file.
1. Open a browser to [http://localhost:3000](http://localhost:3000) and login with your just created, first user.
##### Approach 2
Seed the local db by running
```sh
cd packages/prisma
yarn db-seed
```
The above command will populate the local db with dummy users.
### E2E-Testing
Be sure to set the environment variable `NEXTAUTH_URL` to the correct value. If you are running locally, as the documentation within `.env.example` mentions, the value should be `http://localhost:3000`.
Run `npx playwright install` to download test browsers and resolve the error below when running `yarn test-e2e`:
```
Executable doesn't exist at /Users/alice/Library/Caches/ms-playwright/chromium-1048/chrome-mac/Chromium.app/Contents/MacOS/Chromium
```
### Upgrading from earlier versions
1. Pull the current version:
@ -341,6 +380,10 @@ Currently Vercel Pro Plan is required to be able to Deploy this application with
[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/calcom/docker)
### Elestio
[![Deploy on Elestio](https://pub-da36157c854648669813f3f76c526c2b.r2.dev/deploy-on-elestio-black.png)](https://elest.io/open-source/cal.com)
<!-- ROADMAP -->
## Roadmap
@ -423,7 +466,7 @@ yarn seed-app-store
```
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 the do the
Make sure to complete section "Obtaining the Google API Credentials". After that do the
following
1. Add extra redirect URL `<Cal.com URL>/api/auth/callback/google`
@ -449,8 +492,8 @@ following
7. Click "Create".
8. Now copy the Client ID and Client Secret to your `.env` file into the `ZOOM_CLIENT_ID` and `ZOOM_CLIENT_SECRET` fields.
9. Set the Redirect URL for OAuth `<Cal.com URL>/api/integrations/zoomvideo/callback` replacing Cal.com URL with the URI at which your application runs.
10. Also add the redirect URL given above as a allow list URL and enable "Subdomain check". Make sure, it says "saved" below the form.
11. You don't need to provide basic information about your app. Instead click at "Scopes" and then at "+ Add Scopes". On the left, click the category "Meeting" and check the scope `meeting:write`.
10. Also add the redirect URL given above as an allow list URL and enable "Subdomain check". Make sure, it says "saved" below the form.
11. You don't need to provide basic information about your app. Instead click on "Scopes" and then on "+ Add Scopes". On the left, click the category "Meeting" and check the scope `meeting:write`.
12. Click "Done".
13. You're good to go. Now you can easily add your Zoom integration in the Cal.com settings.
@ -470,9 +513,8 @@ following
4. Select Basecamp 4 as the product to integrate with.
5. Set the Redirect URL for OAuth `<Cal.com URL>/api/integrations/basecamp3/callback` replacing Cal.com URL with the URI at which your application runs.
6. Click on done and copy the Client ID and secret into the `BASECAMP3_CLIENT_ID` and `BASECAMP3_CLIENT_SECRET` fields.
7. Set the `BASECAMP3_CLIENT_SECRET` env variable to `{your_domain} ({support_email})`.
For example, `Cal.com (support@cal.com)`.
7. Set the `BASECAMP3_CLIENT_SECRET` env variable to `{your_domain} ({support_email})`.
For example, `Cal.com (support@cal.com)`.
### Obtaining HubSpot Client ID and Secret
@ -504,10 +546,18 @@ For example, `Cal.com (support@cal.com)`.
9. Click the "Save"/ "UPDATE" button at the bottom footer.
10. You're good to go. Now you can easily add your ZohoCRM integration in the Cal.com settings.
### Obtaining Zoho Calendar Client ID and Secret
[Follow these steps](./packages/app-store/zohocalendar/)
### Obtaining Zoho Bigin Client ID and Secret
[Follow these steps](./packages/app-store/zoho-bigin/)
### Obtaining Pipedrive Client ID and Secret
[Follow these steps](./packages/app-store/pipedrive-crm/)
## Workflows
### Setting up SendGrid for Email reminders
@ -526,7 +576,7 @@ For example, `Cal.com (support@cal.com)`.
3. Copy Account SID to your `.env` file into the `TWILIO_SID` field
4. Copy Auth Token to your `.env` file into the `TWILIO_TOKEN` field
5. Copy your Twilio phone number to your `.env` file into the `TWILIO_PHONE_NUMBER` field
6. Add your own sender id to the `.env` file into the `NEXT_PUBLIC_SENDER_ID` field (fallback is Cal.com)
6. Add your own sender ID to the `.env` file into the `NEXT_PUBLIC_SENDER_ID` field (fallback is Cal.com)
7. Create a messaging service (Develop -> Messaging -> Services)
8. Choose any name for the messaging service
9. Click 'Add Senders'
@ -550,8 +600,6 @@ Distributed under the [AGPLv3 License](https://github.com/calcom/cal.com/blob/ma
Special thanks to these amazing projects which help power Cal.com:
These are the terms of service for my personal calendar booking service, MaroCalendar. You may use this service to book events with me by providing your name, email address, and date/time preferences.
These Terms of Service (“Terms”, “Terms of Service”) govern your use of this service located at https://cal.maronato.dev operated by Gustavo Maronato.
You can also find it's privacy policy here https://git.maronato.dev/maronato/cal/src/branch/main/PRIVACY.md
And the source code here https://git.maronato.dev/maronato/cal
If you do not agree with (or cannot comply with) these terms, then you may not use the Service.
Thank you for being responsible.
Communications
--------------
By using this service to book an event with me, you agree to receive an email with the calendar invite. You may also receive a reminder email before the event, or a confirmation email if you reschedule or cancel the event.
Purchases
---------
There are no purchases on this service. You may use it to book events with me, but you will not be charged for it.
Contests, Sweepstakes and Promotions
------------------------------------
There are no contests, sweepstakes, or promotions on this service.
Subscriptions
-------------
There is no subscription on this service.
Fee Changes
-----------
There are no fees on this service.
Refunds
-------
This is a free service, so there are no refunds.
Content
-------
Our Service allows you to create an event with me by providing your name and email address. You are responsible for that information that you submit on or through Service, including its legality, reliability, and appropriateness.
By posting Content on or through Service, You represent and warrant that: (i) Content is yours (you own it) and/or you have the right to use it, and (ii) that the posting of your Content on or through Service does not violate the privacy rights, publicity rights, copyrights, contract rights or any other rights of any person or entity. I reserve the right to not meet with you.
Prohibited Uses
---------------
You may use Service only for lawful purposes and in accordance with Terms. You agree not to use Service:
* In any way that violates any applicable national or international law or regulation.
* For the purpose of exploiting, harming, or attempting to exploit or harm minors in any way by exposing them to inappropriate content or otherwise.
* To transmit, or procure the sending of, any advertising or promotional material, including any “junk mail”, “chain letter,” “spam,” or any other similar solicitation.
* To impersonate or attempt to impersonate Company, a Company employee, another user, or any other person or entity.
* In any way that infringes upon the rights of others, or in any way is illegal, threatening, fraudulent, or harmful, or in connection with any unlawful, illegal, fraudulent, or harmful purpose or activity.
* To engage in any other conduct that restricts or inhibits anyone’s use or enjoyment of Service, or which, as determined by us, may harm or offend Company or users of Service or expose them to liability.
Additionally, you agree not to:
* Use Service in any manner that could disable, overburden, damage, or impair Service or interfere with any other party’s use of Service, including their ability to engage in real time activities through Service.
* Use any robot, spider, or other automatic device, process, or means to access Service for any purpose, including monitoring or copying any of the material on Service.
* Use any manual process to monitor or copy any of the material on Service or for any other unauthorized purpose without our prior written consent.
* Use any device, software, or routine that interferes with the proper working of Service.
* Introduce any viruses, trojan horses, worms, logic bombs, or other material which is malicious or technologically harmful.
* Attempt to gain unauthorized access to, interfere with, damage, or disrupt any parts of Service, the server on which Service is stored, or any server, computer, or database connected to Service.
* Attack Service via a denial-of-service attack or a distributed denial-of-service attack.
* Take any action that may damage or falsify Company rating.
* Otherwise attempt to interfere with the proper working of Service.
Analytics
---------
There is no analytics on this service.
No Use By Minors
----------------
Service is intended only for access and use by individuals at least eighteen (18) years old. By accessing or using any of Company, you warrant and represent that you are at least eighteen (18) years of age and with the full authority, right, and capacity to enter into this agreement and abide by all of the terms and conditions of Terms. If you are not at least eighteen (18) years old, you are prohibited from both the access and usage of Service.
Accounts
--------
You cannot create an account on this service. The only account that exists is mine.
Changes To Service
------------------
I reserve the right to withdraw or amend this Service, and any service or material I provide via Service, in my sole discretion without notice. I will not be liable if for any reason all or any part of Service is unavailable at any time or for any period. From time to time, I may restrict access to some parts of Service, or the entire Service, to visitors.
Amendments To Terms
-------------------
I may amend Terms at any time by posting the amended terms on this site. It is your responsibility to review these Terms periodically.
Acknowledgement
---------------
BY USING SERVICE OR OTHER SERVICES PROVIDED BY ME, YOU ACKNOWLEDGE THAT YOU HAVE READ THESE TERMS OF SERVICE AND AGREE TO BE BOUND BY THEM.
Contact Me
----------
If you have any questions about these terms of service, please contact me:
This app lets you chat with your calendar via email:
- Turn informal emails into bookings eg. forward "wanna meet tmrw at 2pm?"
- List and rearrange your bookings eg. "clear my afternoon"
- Answer basic questions about your busiest times eg. "how does my Tuesday look?"
The core logic is contained in [agent/route.ts](/apps/ai/src/app/api/agent/route.ts). Here, a [LangChain Agent Executor](https://docs.langchain.com/docs/components/agents/agent-executor) is tasked with following your instructions. Given your last-known timezone, working hours, and busy times, it attempts to CRUD your bookings.
_The AI agent can only choose from a set of tools, without ever seeing your API key._
Emails are cleaned and routed in [receive/route.ts](/apps/ai/src/app/api/receive/route.ts) using [MailParser](https://nodemailer.com/extras/mailparser/).
Incoming emails are routed by email address. Addresses are verified by [DKIM record](https://support.google.com/a/answer/174124?hl=en), making them hard to spoof.
If you haven't yet, please run the [root setup](/README.md) steps.
Before running the app, please see [env.mjs](./src/env.mjs) for all required environment variables. Run `cp .env.example .env` in this folder to get started. You'll need:
- An [OpenAI API key](https://platform.openai.com/account/api-keys) with access to GPT-4
- A [SendGrid API key](https://app.sendgrid.com/settings/api_keys)
- A default sender email (for example, `me@dev.example.com`)
- The Cal.ai app's ID and URL (see [add.ts](/packages/app-store/cal-ai/api/index.ts))
- A unique value for `PARSE_KEY` with `openssl rand -hex 32`
To stand up the API and AI apps simultaneously, simply run `yarn dev:ai`.
### Agent Architecture
The scheduling agent in [agent/route.ts](/apps/ai/src/app/api/agent/route.ts) calls an LLM (in this case, GPT-4) in a loop to accomplish a multi-step task. We use an [OpenAI Functions agent](https://js.langchain.com/docs/modules/agents/agent_types/openai_functions_agent), which is fine-tuned to output text suited for passing to tools.
Tools (eg. [`createBooking`](/apps/ai/src/tools/createBooking.ts)) are simply JavaScript methods wrapped by Zod schemas, telling the agent what format to output.
To expose the AI app, you can use either [Tunnelmole](https://github.com/robbie-cahill/tunnelmole-client), an open source tunnelling tool; or [nGrok](https://ngrok.com/), a popular closed source tunnelling tool.
For Tunnelmole, run `tmole 3005` (or the AI app's port number) in a new terminal. Please replace `3005` with the port number if it is different. In the output, you'll see two URLs, one http and a https (we recommend using the https url for privacy and security). To install Tunnelmole, use `curl -O https://install.tunnelmole.com/8dPBw/install && sudo bash install`. (On Windows, download [tmole.exe](https://tunnelmole.com/downloads/tmole.exe))
For nGrok, run `ngrok http 3005` (or the AI app's port number) in a new terminal. You may need to install nGrok first.
To forward incoming emails to the serverless function at `/agent`, we use [SendGrid's Inbound Parse](https://docs.sendgrid.com/for-developers/parsing-email/setting-up-the-inbound-parse-webhook).
1. Ensure you have a [SendGrid account](https://signup.sendgrid.com/)
2. Ensure you have an authenticated domain. Go to Settings > Sender Authentication > Authenticate. For DNS host, select `I'm not sure`. Click Next and add your domain, eg. `example.com`. Choose Manual Setup. You'll be given three CNAME records to add to your DNS settings, eg. in [Vercel Domains](https://vercel.com/dashboard/domains). After adding those records, click Verify. To troubleshoot, see the [full instructions](https://docs.sendgrid.com/ui/account-and-settings/how-to-set-up-domain-authentication).
3. Authorize your domain for email with MX records: one with name `[your domain].com` and value `mx.sendgrid.net.`, and another with name `bounces.[your domain].com` and value `feedback-smtp.us-east-1.amazonses.com`. Set the priority to `10` if prompted.
4. Go to Settings > [Inbound Parse](https://app.sendgrid.com/settings/parse) > Add Host & URL. Choose your authenticated domain.
5. In the Destination URL field, use the Tunnelmole or ngrok URL from above along with the path, `/api/receive`, and one param, `parseKey`, which lives in [this app's .env](/apps/ai/.env.example) under `PARSE_KEY`. The full URL should look like `https://abc.tunnelmole.net/api/receive?parseKey=ABC-123` or `https://abc.ngrok.io/api/receive?parseKey=ABC-123`.
6. Activate "POST the raw, full MIME message".
7. Send an email to `[anyUsername]@example.com`. You should see a ping on the Tunnelmole or ngrok listener and server.
8. Adjust the logic in [receive/route.ts](/apps/ai/src/app/api/receive/route.ts), save to hot-reload, and send another email to test the behaviour.
Please feel free to improve any part of this architecture!
returnnewResponse("User not found",{status: 404});
}
awaitsendEmail({
subject:"Welcome to Cal AI",
to: user.email,
from:`${user.username}@${env.SENDER_DOMAIN}`,
text:`Hi ${
user.name||`@${user.username}`
},\n\nI'm Cal AI, your personal booking assistant! I'llbehere,24/7tohelpmanageyourbusyscheduleandfindtimestomeetwiththepeopleyoucareabout.\n\nHerearesomethingsyoucanaskme:\n\n-"Book a meeting with @someone"(The@symbolletsyoutagCal.comusers)\n-"What meetings do I have today?"(I'll show you your schedule)\n- "Find a time for coffee with someone@gmail.com" (I'llintroandsendthemsomegoodtimes)\n\nI'mstilllearning,soifyouhaveanyfeedback,pleasetweetitto@calcom!\n\nRemember,youcanalwaysreachmehere,at${
},<br><br>I'm Cal AI, your personal booking assistant! I'llbehere,24/7tohelpmanageyourbusyscheduleandfindtimestomeetwiththepeopleyoucareabout.<br><br>Herearesomethingsyoucanaskme:<br><br>-"Book a meeting with @someone"(The@symbolletsyoutagCal.comusers)<br>-"What meetings do I have today?"(I'll show you your schedule)<br>- "Find a time for coffee with someone@gmail.com" (I'llintroandsendthemsomegoodtimes)<br><br>I'mstilllearning,soifyouhaveanyfeedback,pleasesenditto<ahref="https://twitter.com/calcom">@calcom</a>onX!<br><br>Remember,youcanalwaysreachmehere,at${
// Why so long? the rate determining API call (getAvailability, getEventTypes) can take up to 15 seconds at peak times so we give it a little extra time to complete.
// User is not a cal.com user or is using an unverified email.
if(!signature||!user){
awaitsendEmail({
html:`Thanks for your interest in Cal.ai! To get started, Make sure you have a <a href="https://cal.com/signup" target="_blank">cal.com</a> account with this email address and then install Cal.ai here: <a href="https://go.cal.com/ai" target="_blank">go.cal.com/ai</a>.`,
subject:`Re: ${subject}`,
text:`Thanks for your interest in Cal.ai! To get started, Make sure you have a cal.com account with this email address. You can sign up for an account at: https://cal.com/signup`,
"Send a booking link via email. Useful for scheduling with non cal users. Be confident, suggesting a good date/time with a fallback to a link to select a date/time.",
"A polite and professional email with an intro and signature at the end. Specify you are the AI booking assistant of the primary user. Use [[[Slots]]] and a fallback [[[Link]]] to inject good times and 'see all times' into messages"
),
subject: z.string(),
to: z
.string()
.describe("email address to send the booking link to. Primary user is automatically CC'd"),
eventTypeSlug: z.string().describe("the slug of the event type to book"),
slots: z
.array(
z.object({
time: z.string().describe("YYYY-MM-DDTHH:mm in UTC"),
startTime,// In the docs it says start, but it's startTime: https://cal.com/docs/enterprise-features/api/api-reference/bookings#edit-an-existing-booking.
endTime,// Same here: it says end but it's endTime.
Inresponsestousers,alwayssummarizenecessarycontextandopenthedoortofollowups.Forexample"I have booked your chat with @username for 3pm on Wednesday, December 20th, 2023 EST. Please let me know if you need to reschedule."
Ifyoucan't find a referenced user, ask the user for their email or @username. Make sure to specify that usernames require the @username format. Users don'tknowotherusers'userIds.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.