Skip to content

Comments

feat: Campsite conferencing app#15713

Merged
PeerRich merged 5 commits intocalcom:mainfrom
nholden:campsite
Jul 11, 2024
Merged

feat: Campsite conferencing app#15713
PeerRich merged 5 commits intocalcom:mainfrom
nholden:campsite

Conversation

@nholden
Copy link
Contributor

@nholden nholden commented Jul 9, 2024

What does this PR do?

Your friends at 🏕️ Campsite are excited to propose a Campsite conferencing app on Cal.com. This PR implements that app. When installed, users will be able to set Campsite as the location for event types, and each new booking will be assigned a fresh Campsite call link just for that booking.

The app authenticates with the Campsite API by creating and storing an OAuth access token. It retrieves Campsite call links to attach to new bookings by using the access token to make a request to the Campsite API.

I followed How to build an app to get started, and I referenced #13929 as prior art for generating dynamic call links.

⚠️ In development, when I set Campsite as the default conferencing app for all event types, new bookings still defaulted to Cal Video. It was only after I manually changed the location for a specific event type that new bookings began to use Campsite. Let me know if you notice something I've done incorrectly here that might have caused that! 🙏

demo.6.30.52.PM.mov

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have added a Docs issue here if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox. N/A
  • I confirm automated tests are in place that prove my fix is effective or that my feature works. (I did not add automated tests for this app. Do you have any suggestions as a starting point?)

How should this be tested?

Please contact nick@campsite.co for the client_id and client_secret that you'll need to set to test this change. If you plan to test this with an OAuth callback URL other than https://app.cal.com/api/integrations/campsite/callback, let me know so that I can configure Campsite to accept those requests.

@vercel
Copy link

vercel bot commented Jul 9, 2024

@nholden is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Jul 9, 2024

CLA assistant check
All committers have signed the CLA.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Jul 9, 2024
@graphite-app graphite-app bot requested a review from a team July 9, 2024 20:56
@dosubot dosubot bot added app-store area: app store, apps, calendar integrations, google calendar, outlook, lark, apple calendar authentication area: authentication, auth, google sign in, password, SAML, password reset, can't log in ✨ feature New feature or request labels Jul 9, 2024
@socket-security
Copy link

socket-security bot commented Jul 9, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher

🚮 Removed packages: npm/@babel/helper-string-parser@7.23.4, npm/@babel/plugin-transform-typeof-symbol@7.23.3, npm/js-tokens@4.0.0, npm/loose-envify@1.4.0, npm/object-assign@4.1.1, npm/react@18.3.1, npm/tslib@2.5.0

View full report↗︎

@graphite-app
Copy link

graphite-app bot commented Jul 9, 2024

Graphite Automations

"Add community label" took an action on this PR • (07/09/24)

1 label was added to this PR based on Keith Williams's automation.

"Add consumer team as reviewer" took an action on this PR • (07/09/24)

1 reviewer was added to this PR based on Keith Williams's automation.

Copy link
Contributor

@ibex088 ibex088 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @nholden!

Super psyched to see the campsite integration with Cal. Thanks for the PR! I left a small comment, but otherwise, it looks great!

req
);

res.redirect(getInstalledAppPath({ variant: "conferencing", slug: "campsite" }));
Copy link
Contributor

@ibex088 ibex088 Jul 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add returnTo here similar to what we have in zoom callback

getSafeRedirectUrl(state?.returnTo) ?? getInstalledAppPath({ variant: "conferencing", slug: "zoom" })

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would allow campsite to be redirected to the app install flow
Screenshot 2024-07-10 at 9 22 44 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, nice! That's way better. Thanks for the suggestion. Updated in 922265f.

Copy link
Contributor

@ibex088 ibex088 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!
will wait for another approval!!
for anyone reviewing if you want client_id and client_secret you can reach out to me

@ibex088 ibex088 requested a review from a team July 10, 2024 16:31
@PeerRich PeerRich enabled auto-merge (squash) July 11, 2024 07:57
@github-actions
Copy link
Contributor

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Eighty Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/apps 276.93 KB 504.55 KB 144.16% (🟢 -2.08%)
/apps/[slug] 294.49 KB 522.11 KB 149.17% (🟢 -2.08%)
/apps/[slug]/[...pages] 586.73 KB 814.35 KB 232.67% (🟢 -1.69%)
/apps/categories 254.24 KB 481.86 KB 137.67% (🟢 -1.80%)
/apps/categories/[category] 259.05 KB 486.67 KB 139.05% (🟢 -2.07%)
/apps/installation/[[...step]] 466.93 KB 694.55 KB 198.44% (🔴 +85.50%)
/apps/installed/[category] 278.17 KB 505.8 KB 144.51% (🟢 -1.83%)
/auth/saml-idp 12.22 KB 239.85 KB 68.53% (🟢 -20.80%)
/availability 426.34 KB 653.97 KB 186.85% (🟢 -1.74%)
/availability/[schedule] 410.25 KB 637.87 KB 182.25% (🟢 -1.74%)
/bookings/[status] 324.23 KB 551.85 KB 157.67% (🟢 -1.70%)
/enterprise 254.29 KB 481.92 KB 137.69% (🟢 -1.80%)
/event-types 559.39 KB 787.01 KB 224.86% (🟢 -1.71%)
/event-types/[type] 435.76 KB 663.38 KB 189.54% (🟢 -1.65%)
/getting-started/[[...step]] 447.92 KB 675.54 KB 193.01% (🟡 +10.66%)
/insights 474.24 KB 701.86 KB 200.53% (🟢 -1.80%)
/more 253.8 KB 481.42 KB 137.55% (🟢 -1.80%)
/settings/admin 260.24 KB 487.86 KB 139.39% (🟢 -1.79%)
/settings/admin/apps 273.6 KB 501.23 KB 143.21% (🟢 -1.78%)
/settings/admin/apps/[category] 273.59 KB 501.21 KB 143.20% (🟢 -1.78%)
/settings/admin/flags 264.07 KB 491.69 KB 140.48% (🟢 -1.78%)
/settings/admin/impersonation 260.63 KB 488.25 KB 139.50% (🟢 -1.79%)
/settings/admin/lockedSMS 281.72 KB 509.35 KB 145.53% (🟢 -1.76%)
/settings/admin/oAuth 272.35 KB 499.97 KB 142.85% (🟢 -1.78%)
/settings/admin/orgMigrations/_OrgMigrationLayout 249.17 KB 476.79 KB 136.23% (🟢 -1.79%)
/settings/admin/orgMigrations/moveTeamToOrg 298.92 KB 526.55 KB 150.44% (🟢 -1.77%)
/settings/admin/orgMigrations/moveUserToOrg 318.75 KB 546.38 KB 156.11% (🟢 -1.74%)
/settings/admin/orgMigrations/removeTeamFromOrg 298.69 KB 526.31 KB 150.37% (🟢 -1.76%)
/settings/admin/orgMigrations/removeUserFromOrg 298.7 KB 526.32 KB 150.38% (🟢 -1.77%)
/settings/admin/organizations 262.12 KB 489.75 KB 139.93% (🟢 -1.79%)
/settings/admin/organizations/[id]/edit 260.79 KB 488.41 KB 139.55% (🟢 -1.79%)
/settings/admin/users 262.89 KB 490.52 KB 140.15% (🟢 -1.79%)
/settings/admin/users/[id]/edit 392.08 KB 619.71 KB 177.06% (🟢 -1.76%)
/settings/admin/users/add 391.75 KB 619.37 KB 176.96% (🟢 -1.75%)
/settings/billing 260.44 KB 488.07 KB 139.45% (🟢 -1.79%)
/settings/developer/api-keys 264.84 KB 492.46 KB 140.70% (🟢 -1.78%)
/settings/developer/webhooks 265.01 KB 492.63 KB 140.75% (🟢 -1.78%)
/settings/developer/webhooks/[id] 265.99 KB 493.61 KB 141.03% (🟢 -1.77%)
/settings/developer/webhooks/new 266.02 KB 493.64 KB 141.04% (🟢 -1.77%)
/settings/my-account/appearance 313.44 KB 541.06 KB 154.59% (🟢 -1.78%)
/settings/my-account/calendars 271.86 KB 499.48 KB 142.71% (🟢 -1.83%)
/settings/my-account/conferencing 272.77 KB 500.39 KB 142.97% (🟢 -1.82%)
/settings/my-account/general 375.94 KB 603.57 KB 172.45% (🟢 -1.78%)
/settings/my-account/out-of-office 265.47 KB 493.09 KB 140.88% (🟢 -1.78%)
/settings/my-account/profile 408.38 KB 636 KB 181.71% (🟢 -1.78%)
/settings/organizations/[id]/about 159.66 KB 387.28 KB 110.65% (🟡 +0.47%)
/settings/organizations/[id]/add-teams 159.65 KB 387.28 KB 110.65% (🟡 +0.47%)
/settings/organizations/admin-api 260.4 KB 488.02 KB 139.43% (🟢 -1.78%)
/settings/organizations/appearance 122.33 KB 349.95 KB 99.99% (🟢 -48.03%)
/settings/organizations/billing 260.48 KB 488.1 KB 139.46% (🟢 -1.79%)
/settings/organizations/dsync 293.1 KB 520.72 KB 148.78% (🟢 -1.79%)
/settings/organizations/general 348.79 KB 576.41 KB 164.69% (🟢 -1.78%)
/settings/organizations/members 399.96 KB 627.59 KB 179.31% (🟢 -1.77%)
/settings/organizations/new 159.66 KB 387.29 KB 110.65% (🟡 +0.47%)
/settings/organizations/privacy 265.99 KB 493.62 KB 141.03% (🟢 -1.78%)
/settings/organizations/profile 413.25 KB 640.88 KB 183.11% (🟡 +1.75%)
/settings/organizations/sso 271.07 KB 498.69 KB 142.48% (🟢 -1.78%)
/settings/organizations/teams/other 261.31 KB 488.93 KB 139.69% (🟢 -1.78%)
/settings/organizations/teams/other/[id]/appearance 273.21 KB 500.83 KB 143.09% (🟢 -1.73%)
/settings/organizations/teams/other/[id]/members 267.91 KB 495.53 KB 141.58% (🟢 -1.79%)
/settings/organizations/teams/other/[id]/profile 471.63 KB 699.25 KB 199.79% (🟢 -1.78%)
/settings/platform 258.9 KB 486.52 KB 139.01% (🟢 -1.80%)
/settings/platform/new 120.67 KB 348.29 KB 99.51% (🟡 +0.51%)
/settings/platform/oauth-clients/[clientId]/edit 257.21 KB 484.83 KB 138.52% (🟢 -1.80%)
/settings/platform/oauth-clients/create 256.35 KB 483.97 KB 138.28% (🟢 -1.80%)
/settings/security/impersonation 265.65 KB 493.27 KB 140.93% (🟢 -1.78%)
/settings/security/password 303.82 KB 531.44 KB 151.84% (🟢 -1.77%)
/settings/security/sso 270.52 KB 498.14 KB 142.33% (🟢 -1.79%)
/settings/security/two-factor-auth 269.13 KB 496.75 KB 141.93% (🟢 -1.79%)
/settings/teams 259.98 KB 487.6 KB 139.31% (🟢 -1.78%)
/settings/teams/[id]/appearance 273.2 KB 500.82 KB 143.09% (🟢 -1.74%)
/settings/teams/[id]/billing 260.48 KB 488.1 KB 139.46% (🟢 -1.79%)
/settings/teams/[id]/members 378.03 KB 605.65 KB 173.04% (🟢 -1.78%)
/settings/teams/[id]/profile 472.41 KB 700.03 KB 200.01% (🟢 -1.78%)
/settings/teams/new 193 KB 420.62 KB 120.18% (🟢 -1.83%)
/teams 254.03 KB 481.65 KB 137.61% (🟢 -1.80%)
/upgrade 254.15 KB 481.77 KB 137.65% (🟢 -1.80%)
/video/[uid] 291.18 KB 518.81 KB 148.23% (🟢 -0.18%)
/workflows 286.05 KB 513.68 KB 146.76% (🟢 -1.74%)
/workflows/[workflow] 414.24 KB 641.87 KB 183.39% (🟢 -1.55%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@PeerRich PeerRich merged commit c7c5cdf into calcom:main Jul 11, 2024
@nholden nholden deleted the campsite branch July 11, 2024 15:16
@nholden
Copy link
Contributor Author

nholden commented Jul 11, 2024

Thanks for your help and for merging this PR! Excited to try this out in production. Do you have a rough timeline for enabling the app, or is there anything I can do to help?

@ibex088
Copy link
Contributor

ibex088 commented Jul 12, 2024

Hi @nholden,

It should be available in production with our next release, which I believe is scheduled for next Tuesday.
if I’m not mistaken, the credentials for the callback endpoint you sent (https://app.cal.com/api/integrations/campsite/callback), should work, right?

@nholden
Copy link
Contributor Author

nholden commented Jul 12, 2024

Thanks, @SomayChauhan! Sounds great.

the credentials for the callback endpoint you sent (https://app.cal.com/api/integrations/campsite/callback), should work, right?

Yes!

p6l-richard pushed a commit to p6l-richard/cal.com-fork that referenced this pull request Jul 22, 2024
* feat: Campsite conferencing app

* Improve redirect after OAuth flow

---------

Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app-store area: app store, apps, calendar integrations, google calendar, outlook, lark, apple calendar authentication area: authentication, auth, google sign in, password, SAML, password reset, can't log in community Created by Linear-GitHub Sync ✨ feature New feature or request ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants