chore: remove all Stripe billing code and database schema#1069
chore: remove all Stripe billing code and database schema#1069brendan-kellam merged 4 commits intomainfrom
Conversation
Billing was an enterprise entitlement that is no longer needed. This removes the Stripe integration, billing UI, subscription management, and related database fields. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This comment has been minimized.
This comment has been minimized.
License Audit
Weak Copyleft Packages (informational)
Resolved Packages (8)
|
WalkthroughThis pull request removes Stripe billing integration from the application, including environment variables, database schema columns, billing-related server actions, UI components, entitlements, and associated utilities across configuration, database, shared types, and web application code. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/db/prisma/migrations/20260401200619_remove_stripe_billing/migration.sql (1)
4-15: Please verify these Stripe columns are empty before rollout.This removes the only local org→Stripe mapping (
stripeCustomerId) and the last known subscription state. If anyOrgrows are still populated, later cancellation/refund/reconciliation becomes manual. Please archive/export non-null rows first, or explicitly gate the migration on these columns being empty.Read-only preflight query
SELECT COUNT(*) AS orgs_with_stripe_data FROM "Org" WHERE "stripeCustomerId" IS NOT NULL OR "stripeSubscriptionStatus" IS NOT NULL OR "stripeLastUpdatedAt" IS NOT NULL;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/db/prisma/migrations/20260401200619_remove_stripe_billing/migration.sql` around lines 4 - 15, The migration drops Org columns stripeCustomerId, stripeLastUpdatedAt, stripeSubscriptionStatus and must be gated by a preflight that verifies those columns are empty; add a pre-migration check (using the provided SELECT COUNT(*) query against the Org table) and fail the migration if the count > 0, or add an explicit data-export/archive step to persist any non-null rows before running ALTER TABLE/ DROP TYPE; reference the Org table and the three column names (stripeCustomerId, stripeSubscriptionStatus, stripeLastUpdatedAt) so the migration script or deployment pipeline enforces the check or performs the export and only proceeds when verified.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@packages/db/prisma/migrations/20260401200619_remove_stripe_billing/migration.sql`:
- Around line 4-15: The migration drops Org columns stripeCustomerId,
stripeLastUpdatedAt, stripeSubscriptionStatus and must be gated by a preflight
that verifies those columns are empty; add a pre-migration check (using the
provided SELECT COUNT(*) query against the Org table) and fail the migration if
the count > 0, or add an explicit data-export/archive step to persist any
non-null rows before running ALTER TABLE/ DROP TYPE; reference the Org table and
the three column names (stripeCustomerId, stripeSubscriptionStatus,
stripeLastUpdatedAt) so the migration script or deployment pipeline enforces the
check or performs the export and only proceeds when verified.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ce2b2266-a82d-4d3c-b6f9-c4bced4dd257
📒 Files selected for processing (33)
.env.developmentCHANGELOG.mdpackages/db/prisma/migrations/20260401200619_remove_stripe_billing/migration.sqlpackages/db/prisma/schema.prismapackages/shared/src/entitlements.tspackages/shared/src/env.server.tspackages/web/package.jsonpackages/web/src/__mocks__/prisma.tspackages/web/src/actions.tspackages/web/src/app/[domain]/components/navigationMenu/index.tsxpackages/web/src/app/[domain]/components/navigationMenu/trialIndicator.tsxpackages/web/src/app/[domain]/components/upgradeGuard.tsxpackages/web/src/app/[domain]/layout.tsxpackages/web/src/app/[domain]/settings/billing/page.tsxpackages/web/src/app/[domain]/settings/layout.tsxpackages/web/src/app/[domain]/settings/members/components/inviteMemberCard.tsxpackages/web/src/app/[domain]/settings/members/page.tsxpackages/web/src/app/[domain]/upgrade/page.tsxpackages/web/src/app/api/(server)/stripe/route.tspackages/web/src/ee/features/billing/actions.tspackages/web/src/ee/features/billing/components/changeBillingEmailCard.tsxpackages/web/src/ee/features/billing/components/checkout.tsxpackages/web/src/ee/features/billing/components/enterpriseUpgradeCard.tsxpackages/web/src/ee/features/billing/components/manageSubscriptionButton.tsxpackages/web/src/ee/features/billing/components/teamUpgradeCard.tsxpackages/web/src/ee/features/billing/components/upgradeCard.tsxpackages/web/src/ee/features/billing/serverUtils.tspackages/web/src/ee/features/billing/stripe.tspackages/web/src/features/userManagement/actions.tspackages/web/src/lib/authUtils.tspackages/web/src/lib/constants.tspackages/web/src/lib/errorCodes.tspackages/web/src/lib/serviceError.ts
💤 Files with no reviewable changes (29)
- packages/web/src/app/[domain]/settings/layout.tsx
- packages/web/src/app/[domain]/settings/members/page.tsx
- packages/web/src/app/[domain]/components/upgradeGuard.tsx
- packages/web/src/lib/serviceError.ts
- packages/web/src/app/[domain]/components/navigationMenu/index.tsx
- packages/web/src/lib/authUtils.ts
- packages/shared/src/entitlements.ts
- .env.development
- packages/web/src/mocks/prisma.ts
- packages/web/src/ee/features/billing/components/enterpriseUpgradeCard.tsx
- packages/web/package.json
- packages/web/src/features/userManagement/actions.ts
- packages/web/src/ee/features/billing/stripe.ts
- packages/web/src/lib/constants.ts
- packages/web/src/app/[domain]/layout.tsx
- packages/db/prisma/schema.prisma
- packages/web/src/ee/features/billing/components/manageSubscriptionButton.tsx
- packages/web/src/lib/errorCodes.ts
- packages/web/src/ee/features/billing/components/teamUpgradeCard.tsx
- packages/web/src/ee/features/billing/components/upgradeCard.tsx
- packages/web/src/ee/features/billing/components/checkout.tsx
- packages/shared/src/env.server.ts
- packages/web/src/app/[domain]/upgrade/page.tsx
- packages/web/src/app/[domain]/components/navigationMenu/trialIndicator.tsx
- packages/web/src/ee/features/billing/components/changeBillingEmailCard.tsx
- packages/web/src/app/api/(server)/stripe/route.ts
- packages/web/src/app/[domain]/settings/billing/page.tsx
- packages/web/src/ee/features/billing/serverUtils.ts
- packages/web/src/ee/features/billing/actions.ts
Summary
StripeSubscriptionStatusenum andstripeCustomerId,stripeSubscriptionStatus,stripeLastUpdatedAtfields from theOrgmodel with a database migrationstripe,@stripe/react-stripe-js, and@stripe/stripe-jsdependencies and all related env vars, error codes, and entitlementsTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes