Skip to content

feat: remove billing/payment layer from open-core (cloud-only) - #65

Merged
nbkdoesntknowcoding merged 1 commit into
mainfrom
carve/remove-billing
Jul 8, 2026
Merged

nbkdoesntknowcoding merged 1 commit into
mainfrom
carve/remove-billing

Conversation

@nbkdoesntknowcoding

Copy link
Copy Markdown
Owner

What

Removes the entire payment/billing layer from the open-core repo so the community self-host edition ships with ZERO payment code and no required RAZORPAY_* env. Hosted billing lives outside this repo (cloud-only). This is a delete-from-public carve — core-only, no ee side.

Deleted

API

  • routes/razorpay.ts, routes/billing.ts
  • lib/razorpay/ (client, customer, plan-state, plans, products, webhook-handlers)
  • lib/billing/seats.ts + lib/billing/currency.ts (only imported by the deleted billing route)
  • scripts/razorpay-assign-plan.ts, create-razorpay-plans.ts, razorpay-bootstrap.ts
  • tests/razorpay-webhook.test.ts

Web

  • components/pricing/ (incl. PricingCards.tsx)
  • components/settings/BillingPanel.tsx
  • lib/pricing.ts
  • pages/app/settings/billing.astro

Neutralized core importers (build stays green)

  • server.ts — dropped razorpayRoutes + billingRoutes import/register.
  • lib/billing/sync-seats.ts — syncSubscriptionSeats is now an exported no-op (no subscriptions on self-host); imports no razorpay module. Core call sites in members.ts / invitations.ts / _internal/accept-invite-pending.ts unchanged.
  • config/env.ts — RAZORPAY_KEY_ID / _KEY_SECRET / _WEBHOOK_SECRET now .optional() instead of required.
  • apps/api/package.json — dropped the unused razorpay dependency.
  • .env.example — removed the RAZORPAY_* placeholders.

Hid dangling billing/pricing nav (resolves intent of #3)

  • SettingsNav.tsx, SettingsLayout.astro — removed the Billing entry.
  • CommandPalette.tsx — removed the "open billing" command.
  • PublicHeader.astro — removed the /pricing link.

Boundary

Extended verify-core-only.sh static-import denylist to include routes/razorpay|routes/billing|lib/razorpay/.

Untouched — community-license entitlement path stays intact

lib/entitlements.ts, lib/entitlement-gate.ts, routes/licenses.ts, lib/license-key.ts, plugins/subscription.ts, plugins/free-limits.ts, lib/workspace.ts, db/schema.ts (billing columns stay harmlessly). The community flow (POST /api/licenses/redeem → workspaces.plan='community' → resolveEntitlements → history/export unlock) is unaffected.

Verify results

  • pnpm --filter @boppl/api build (tsc strict) — exit 0
  • pnpm --filter @boppl/web build (astro) — exit 0
  • verify-core-only.sh — CLEAN (no core→gated static imports; core compiles ee-entrypoint-absent)
  • license-key.test.ts — 4/4 passing
  • Dangling-import grep for deleted modules (razorpay, routes/billing, BillingPanel, lib/pricing, components/pricing) — ZERO

🤖 Generated with Claude Code

The community self-host edition now ships with ZERO payment code and no
required RAZORPAY_* env. All Razorpay/billing surface is deleted; hosted
billing lives outside this repo.

Deleted (API):
- routes/razorpay.ts, routes/billing.ts
- lib/razorpay/ (client, customer, plan-state, plans, products,
  webhook-handlers)
- lib/billing/seats.ts + lib/billing/currency.ts (only imported by the
  deleted billing route)
- scripts/razorpay-assign-plan.ts, create-razorpay-plans.ts,
  razorpay-bootstrap.ts
- tests/razorpay-webhook.test.ts

Deleted (web):
- components/pricing/ (incl. PricingCards.tsx)
- components/settings/BillingPanel.tsx
- lib/pricing.ts
- pages/app/settings/billing.astro

Neutralized core importers (build stays green):
- server.ts: dropped razorpayRoutes + billingRoutes import/register.
- lib/billing/sync-seats.ts: syncSubscriptionSeats is now an exported
  no-op (no subscriptions on self-host); imports no razorpay module.
  Core call sites in members/invitations/accept-invite-pending unchanged.
- config/env.ts: RAZORPAY_KEY_ID / _KEY_SECRET / _WEBHOOK_SECRET are now
  .optional() instead of required.
- apps/api/package.json: dropped the unused razorpay dependency.
- .env.example: removed the RAZORPAY_* placeholders (now optional/unset).

Hid dangling billing/pricing nav (resolves intent of #3):
- SettingsNav.tsx, SettingsLayout.astro: removed the Billing entry.
- CommandPalette.tsx: removed the "open billing" command.
- PublicHeader.astro: removed the /pricing link.

Boundary: extended verify-core-only.sh denylist to include
routes/razorpay|routes/billing|lib/razorpay/.

Untouched (community-license entitlement path stays intact): lib/entitlements.ts,
lib/entitlement-gate.ts, routes/licenses.ts, lib/license-key.ts,
plugins/subscription.ts, plugins/free-limits.ts, lib/workspace.ts,
db/schema.ts (billing columns stay harmlessly).

Verified: pnpm --filter @boppl/api build (tsc strict) exit 0;
pnpm --filter @boppl/web build (astro) exit 0; verify-core-only.sh CLEAN;
license-key unit test 4/4; zero dangling imports of deleted modules.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: nbkdoesntknowcoding <nischaybk@theboringpeople.in>
@nbkdoesntknowcoding
nbkdoesntknowcoding merged commit 0ff13c6 into main Jul 8, 2026
8 checks passed
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.

1 participant