Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Subscription Tiers API to a Products API #3287

Merged
merged 15 commits into from May 15, 2024
Merged

Conversation

frankie567
Copy link
Member

@frankie567 frankie567 commented May 13, 2024

TODO:

  • Migrate metadata in Stripe (subscription_tier_id -> product_id)
  • Webhooks naming

Copy link

vercel bot commented May 13, 2024

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

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview May 15, 2024 2:00pm
polar ⬜️ Ignored (Inspect) Visit Preview May 15, 2024 2:00pm
polar-next-js-example ⬜️ Ignored (Inspect) Visit Preview May 15, 2024 2:00pm

Copy link
Contributor

github-actions bot commented May 13, 2024

📦 Next.js Bundle Analysis for web

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

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 219.79 KB (🟡 +3 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

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

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Seventy-seven 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)
/layout 52.7 KB 272.49 KB 77.86% (🟢 -0.01%)
/maintainer/page 143.2 KB 363 KB 103.71% (🟢 -0.01%)
/login/page 75.04 KB 294.83 KB 84.24% (🟢 -0.01%)
/signup/maintainer/page 38.04 KB 257.83 KB 73.67% (🟢 -0.01%)
/(installation)/github/installation/page 64.41 KB 284.21 KB 81.20% (🟢 -0.01%)
/(topbar)/layout 138.59 KB 358.38 KB 102.39% (🟢 -0.01%)
/(topbar)/subscribe/success/page 82.4 KB 302.19 KB 86.34% (🟢 -0.02%)
/(topbar)/unsubscribe/page 32.12 KB 251.91 KB 71.97% (+/- <0.01%)
/[organization]/(sidebar)/donate/page 149.67 KB 369.46 KB 105.56% (🟡 +0.15%)
/[organization]/(sidebar)/layout 147.24 KB 367.03 KB 104.86% (🟢 -0.01%)
/[organization]/(sidebar)/donate/status/page 40.95 KB 260.74 KB 74.50% (🟢 -0.01%)
/[organization]/(sidebar)/issues/page 116 KB 335.8 KB 95.94% (🟢 -0.01%)
/[organization]/(sidebar)/page 251.34 KB 471.13 KB 134.61% (🟢 -0.30%)
/[organization]/(sidebar)/posts/page 192.66 KB 412.45 KB 117.84% (🟢 -0.01%)
/[organization]/(sidebar)/products/[productId]/page 192.75 KB 412.54 KB 117.87% (🟢 -0.02%)
/[organization]/(sidebar)/posts/[postSlug]/page 159.86 KB 379.65 KB 108.47% (🟢 -0.01%)
/[organization]/(sidebar)/repositories/page 68.09 KB 287.89 KB 82.25% (+/- <0.01%)
/[organization]/(sidebar)/subscriptions/page 134.48 KB 354.27 KB 101.22% (🟡 +0.16%)
/[organization]/[repo]/issues/[number]/(create)/page 139.2 KB 358.99 KB 102.57% (🟢 -0.02%)
/[organization]/[repo]/layout 119.71 KB 339.5 KB 97.00% (🟢 -0.02%)
/[organization]/[repo]/issues/[number]/status/page 135.87 KB 355.66 KB 101.62% (🟢 -0.02%)
/[organization]/[repo]/page 188.87 KB 408.67 KB 116.76% (🟢 -9.61%)
/[organization]/subscribe/page 121.73 KB 341.52 KB 97.58% (🟡 +0.16%)
/backoffice/badge/page 40.77 KB 260.56 KB 74.45% (🟢 -0.02%)
/backoffice/layout 158.32 KB 378.11 KB 108.03% (🟢 -0.02%)
/backoffice/issue/[id]/page 50.56 KB 270.36 KB 77.24% (🟢 -0.01%)
/backoffice/pledges/page 52.7 KB 272.49 KB 77.85% (🟢 -0.01%)
/backoffice/rebadge/page 40.35 KB 260.14 KB 74.33% (🟢 -0.01%)
/backoffice/rewards_pending/page 54.19 KB 273.98 KB 78.28% (🟢 -0.02%)
/maintainer/(onboarding)/[organization]/onboarding/page 110.9 KB 330.69 KB 94.48% (🟢 -0.01%)
/maintainer/[organization]/page 10.41 KB 230.21 KB 65.77% (+/- <0.01%)
/maintainer/new/page 142.86 KB 362.65 KB 103.61% (🟢 -0.01%)
/(landing)/page 108.86 KB 328.65 KB 93.90% (🟡 +0.19%)
/(topbar)/(backer)/feed/page 217.38 KB 437.17 KB 124.91% (🟢 -0.02%)
/(topbar)/(backer)/layout 41.58 KB 261.38 KB 74.68% (🟢 -0.02%)
/(topbar)/(backer)/funding/page 156.08 KB 375.87 KB 107.39% (🟢 -0.02%)
/(topbar)/(backer)/purchases/[id]/page 197.94 KB 417.73 KB 119.35% (🟢 -0.01%)
/(topbar)/(backer)/purchases/page 103.36 KB 323.15 KB 92.33% (🟡 +0.07%)
/(topbar)/(backer)/settings/page 225.21 KB 445 KB 127.14% (🟢 -0.01%)
/(topbar)/(backer)/subscriptions/page 170.27 KB 390.06 KB 111.45% (🟢 -0.02%)
/maintainer/[organization]/(topbar)/layout 158.32 KB 378.11 KB 108.03% (🟢 -0.02%)
/maintainer/[organization]/(topbar)/donations/overview/page 263.48 KB 483.27 KB 138.08% (🟢 -0.02%)
/maintainer/[organization]/(topbar)/funding/page 179.96 KB 399.75 KB 114.21% (🟢 -0.01%)
/maintainer/[organization]/(topbar)/initialize/page 139.29 KB 359.08 KB 102.60% (🟢 -0.02%)
/maintainer/[organization]/(topbar)/issues/badge/page 196.37 KB 416.16 KB 118.90% (🟢 -0.01%)
/maintainer/[organization]/(topbar)/issues/overview/page 187.21 KB 407 KB 116.29% (🟢 -0.02%)
/maintainer/[organization]/(topbar)/members/page 140.29 KB 360.08 KB 102.88% (🟢 -0.02%)
/maintainer/[organization]/(topbar)/overview/page 253.17 KB 472.96 KB 135.13% (🟢 -0.01%)
/maintainer/[organization]/(topbar)/posts/analytics/page 256.08 KB 475.87 KB 135.96% (🟢 -0.01%)
/maintainer/[organization]/(topbar)/posts/page 335.02 KB 554.81 KB 158.52% (🟢 -0.02%)
/maintainer/[organization]/(topbar)/products/overview/page 172.61 KB 392.4 KB 112.11% (🟢 -0.08%)
/maintainer/[organization]/(topbar)/settings/page 161.3 KB 381.09 KB 108.88% (🟢 -0.01%)
/maintainer/[organization]/(topbar)/settings/webhooks/endpoints/[id]/page 183.58 KB 403.37 KB 115.25% (🟢 -0.02%)
/maintainer/[organization]/(topbar)/subscriptions/benefits/page 209.4 KB 429.2 KB 122.63% (🟢 -0.02%)
/maintainer/[organization]/(topbar)/subscriptions/overview/page 254 KB 473.8 KB 135.37% (🟢 -0.01%)
/maintainer/[organization]/(topbar)/subscriptions/subscribers/page 189.44 KB 409.23 KB 116.92% (🟢 -0.01%)
/maintainer/[organization]/(topbar)/subscriptions/tiers/page 188.64 KB 408.43 KB 116.69% (+/- <0.01%)
/maintainer/[organization]/(white)/posts/[post]/page 291.36 KB 511.16 KB 146.04% (🟢 -0.01%)
/maintainer/[organization]/(white)/layout 134.6 KB 354.4 KB 101.26% (🟢 -0.02%)
/maintainer/[organization]/(white)/posts/new/page 255.93 KB 475.72 KB 135.92% (🟢 -0.01%)
/maintainer/[organization]/promote/page 164.42 KB 384.22 KB 109.78% (🟢 -0.02%)
/maintainer/[organization]/promote/layout 134.6 KB 354.4 KB 101.26% (🟢 -0.02%)
/(topbar)/(backer)/finance/account/page 122 KB 341.79 KB 97.66% (🟢 -0.02%)
/(topbar)/(backer)/finance/layout 108.78 KB 328.57 KB 93.88% (🟢 -0.02%)
/(topbar)/(backer)/finance/incoming/page 138.87 KB 358.66 KB 102.47% (🟢 -0.01%)
/(topbar)/(backer)/finance/issue-funding/contributors/page 59.12 KB 278.91 KB 79.69% (🟢 -0.02%)
/(topbar)/(backer)/finance/issue-funding/page 59.72 KB 279.51 KB 79.86% (🟢 -0.02%)
/(topbar)/(backer)/finance/outgoing/page 124.65 KB 344.44 KB 98.41% (🟢 -0.01%)
/(topbar)/(backer)/finance/rewards/page 59.2 KB 278.99 KB 79.71% (🟢 -0.02%)
/maintainer/[organization]/(topbar)/finance/account/page 122.95 KB 342.74 KB 97.92% (🟢 -0.01%)
/maintainer/[organization]/(topbar)/finance/layout 134.6 KB 354.4 KB 101.26% (🟢 -0.02%)
/maintainer/[organization]/(topbar)/finance/incoming/page 140.2 KB 359.99 KB 102.85% (🟢 -0.01%)
/maintainer/[organization]/(topbar)/finance/outgoing/page 125.94 KB 345.73 KB 98.78% (🟢 -0.02%)
/maintainer/[organization]/(topbar)/finance/issue-funding/contributors/page 60.24 KB 280.03 KB 80.01% (🟢 -0.02%)
/maintainer/[organization]/(topbar)/finance/issue-funding/layout 134.6 KB 354.4 KB 101.26% (🟢 -0.02%)
/maintainer/[organization]/(topbar)/finance/issue-funding/page 61.04 KB 280.84 KB 80.24% (🟢 -0.02%)
/maintainer/[organization]/(topbar)/finance/issue-funding/rewarded/page 60.23 KB 280.02 KB 80.01% (🟢 -0.02%)
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.

@frankie567 frankie567 changed the title Products 🚀 Move Subscription Tiers API to a Products API May 15, 2024
@frankie567 frankie567 marked this pull request as ready for review May 15, 2024 13:29
@frankie567
Copy link
Member Author

@birkjernstrom For this first wave of changes, here is what might impact you in your accounting queries:

  • subscription_tiers has been renamed to products
  • subscription_tier_prices has been renamed to product_prices
  • Transaction.subscription_tier_price_id has been renamed to Transaction.product_price_id
  • Subscription.subscription_tier_id has been renamed to Subscription.product_id

@frankie567 frankie567 merged commit 1725e0d into main May 15, 2024
10 checks passed
@frankie567 frankie567 deleted the feature/products branch May 15, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant