cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

feat: platform onboarding flow and dashboard

Open Ryukemeister opened this issue 1 year ago • 11 comments

What does this PR do?

This PR adds a new flow for creating a platform client, previously we were using the flow that is used to create an organization. This PR fixes that and also adds a new dashboard for a platform user under which they can manage their oauth clients (create, update or delete) and see a list of their managed users. There are also other tabs for seeing platform docs, and other examples. This PR also included billing in the app itself using stripe.

Steps to create a new platform client:

  • Go to /settings/platform/new and create a new platform user
  • Once that is done you are redirected to the platform dashboard under which you have everyhting regarding what a platform user needs.

@PeerRich: also try:

https://localhost:3000/signup?redirect=https://app.cal.com/settings/platform/new

Loom: https://www.loom.com/share/eb02cfc3aa654e07b29c90a95c93fac4

Ryukemeister avatar Apr 23 '24 18:04 Ryukemeister

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

github-actions[bot] avatar Apr 23 '24 18:04 github-actions[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2024 2:45pm
platform-starter-kit ❌ Failed (Inspect) May 9, 2024 2:45pm
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview May 9, 2024 2:45pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview May 9, 2024 2:45pm

vercel[bot] avatar Apr 23 '24 18:04 vercel[bot]

Graphite Automations

"Add platform team as reviewer" took an action on this PR • (04/23/24)

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

"Add foundation team as reviewer" took an action on this PR • (05/02/24)

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

graphite-app[bot] avatar Apr 23 '24 18:04 graphite-app[bot]

📦 Next.js Bundle Analysis for @calcom/web

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

New Pages Added

The following pages were added to the bundle from the code in this PR:

Page Size (compressed) First Load % of Budget (350 KB)
/settings/platform 261.12 KB 489.8 KB 139.94%
/settings/platform/new 118.64 KB 347.31 KB 99.23%
/settings/platform/oauth-clients/[clientId]/edit 259.51 KB 488.19 KB 139.48%
/settings/platform/oauth-clients/create 258.8 KB 487.47 KB 139.28%

Three 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)
/settings/organizations/[id]/about 157.62 KB 386.29 KB 110.37% (🟡 +0.54%)
/settings/organizations/[id]/add-teams 157.61 KB 386.28 KB 110.37% (🟡 +0.54%)
/settings/organizations/new 157.62 KB 386.3 KB 110.37% (🟡 +0.54%)
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 "+/-

github-actions[bot] avatar Apr 23 '24 18:04 github-actions[bot]

Current Playwright Test Results Summary

✅ 63 Passing - ⚠️ 3 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 05/09/2024 03:03:16pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 15f8f999077d710cccf446e7c02ed0d97d3cbdb2

Started: 05/09/2024 03:01:24pm UTC

⚠️ Flakes

📄   apps/web/playwright/integrations-stripe.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Stripe integration Pending payment booking should not be confirmed by default
Retry 1Initial Attempt
1.32% (4) 4 / 304 runs
failed over last 7 days
18.42% (56) 56 / 304 runs
flaked over last 7 days

📄   apps/web/playwright/impersonation.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Users can impersonate App Admin can impersonate users with impersonation enabled
Retry 1Initial Attempt
1.54% (5) 5 / 324 runs
failed over last 7 days
10.19% (33) 33 / 324 runs
flaked over last 7 days

📄   apps/web/playwright/event-types.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Event Types tests -- future user can add multiple organizer address
Retry 1Initial Attempt
1.48% (5) 5 / 338 runs
failed over last 7 days
28.99% (98) 98 / 338 runs
flaked over last 7 days

View Detailed Build Results


deploysentinel[bot] avatar Apr 23 '24 19:04 deploysentinel[bot]

can you do a self review and loom video?

will billing be merged into this or separate @exception

PeerRich avatar Apr 23 '24 21:04 PeerRich

can you do a self review and loom video?

will billing be merged into this or separate @exception

Will do a self review today and also leave a link to the loom video.

Ryukemeister avatar Apr 24 '24 06:04 Ryukemeister

can you do a self review and loom video?

will billing be merged into this or separate @exception

Seperate.

exception avatar Apr 24 '24 12:04 exception

missing loom, self review and PR description how to test

PeerRich avatar Apr 25 '24 07:04 PeerRich

missing loom, self review and PR description how to test

@PeerRich self review is done, description updated and loom video is on the way

Ryukemeister avatar Apr 25 '24 08:04 Ryukemeister

Amazing work Rajiv! 🔥

supalarry avatar May 07 '24 13:05 supalarry

There's a few typo's and copy mistakes in the platformPlans - other than that looks reasonable 🙏

My bad will sort these out, thanks a lot @emrysal !!!

Ryukemeister avatar May 07 '24 14:05 Ryukemeister

Amazing work Rajiv! 🔥

Thanks a ton for the review Lauris, will implement the feedback from your review so we can merge this finally!

Ryukemeister avatar May 07 '24 14:05 Ryukemeister

[MEDIUM] plan column of PlatformBilling

I saw in your loom and also tried myself - after finishing stripe payment the plan is none - shouldn't it be one of the PlatformPlan enum values?

Screenshot 2024-05-08 at 19 13 01 ## [LOW] Sidebar Personally, I would remove "Cal.com atoms" entry from sidebar and just rename "Platform docs" to "Documentation". Also, instead of having "Examples app" in the sidebar I would just put it in docs - I don't know how much value do people have of having a link to examples app because docs should mention it. Screenshot 2024-05-08 at 19 17 28 ## [HIGH] OAuth client users not appearing? I created OAuth client and then created managed user for it via API- managed user email has the same OAuth client ID as in dashboard below. However, after creating the user I refresh "settings/platform" and the managed user is not appearing.

Create managed user: Screenshot 2024-05-08 at 19 24 48

It's not appearing: Screenshot 2024-05-08 at 19 26 35

Does OAuth client users show up for you under the "Managed users" ?

  • The plan column was not working because you need to configure the stripe webhook which can be done through the stripe CLI and once thats configured it works as expected
  • Removed examples app from sidebar and renamed platform docs to documentation so we're good on that
  • Managed users appears now since we have a different endpoint for it

Ryukemeister avatar May 09 '24 10:05 Ryukemeister