Billing & plan limits

Entitlements enforced by @premortem/db PLAN_LIMITS: repos, monthly audits, publish allowance, and retention tiers.

Entitlements enforced by @premortem/db PLAN_LIMITS: repos, monthly audits, publish allowance, and retention tiers.

Plan tiers

  • Free: 1 repo, 10 audits/month, 3 publishes/month, reviewer console, 30-day history.
  • Starter (pro): 10 repos, 100 audits/month, GitLab publish + reconcile, SARIF export, 90-day history.
  • Growth (team): 30 repos, 300 audits/month, webhooks, Graphiti memory, dashboards, 1-year history.
  • Scale (scale): 100 repos, 1,000 audits/month, priority support, skill marketplace.
  • Enterprise: contract quotas, custom deployment, dedicated support, and compliance workstreams.
Canonical limits (packages/db/src/entitlements.ts)
free:       1 repo,   10 audits/mo,  3 publishes/mo, 30-day history
pro:       10 repos, 100 audits/mo, unlimited publish, 90-day history
team:      30 repos, 300 audits/mo, unlimited publish, 1-year history
scale:    100 repos, 1,000 audits/mo, unlimited publish, priority support
enterprise: contract quotas,           unlimited publish, custom retention

Enforcement

  • assertCanRegisterProject: 403 repo_limit when at maxRepos.
  • assertCanRunAudit: 402 quota_exceeded when auditsUsed >= auditLimit.
  • assertCanPublish: 403 feature_locked after free publish allowance is exhausted.
  • Usage visible in Settings → Billing and GET /api/workspace.

Stripe integration

  • Checkout: POST /api/billing/checkout with plan and billing cycle.
  • Billing Portal: POST /api/billing/portal for cards, invoices, and cancellation handling.
  • Webhook: POST /api/stripe/webhook updates OrganizationBillingAccount.
  • Env: STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, STRIPE_PRICE_* for each tier.
  • Test mode: Checkout works with test keys when price IDs are configured; local verification can still use plan PATCH when Stripe is unavailable.
Local dev

Stripe checkout requires configured test or live price IDs; local development can still use Settings plan patch.

Upgrade path

  • Marketing pricing: /products mirrors tier copy.
  • In-app: Settings → Billing → Upgrade opens Stripe Checkout when configured.
  • After webhook, auditQuotaMonthly and plan update immediately.

Expected result

You know which features unlock per plan and how usage is counted.

Related links

Announcement updates version release today!

ReleasesPrivacy
Terms