Files
supabase/packages/shared-data/plans.ts
T
af47a2d010 experiment:pricing feedback iteration on calculator (#42451)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Feature — A/B experiment for a new pricing calculator on the `/pricing`
page, gated behind a PostHog feature flag.

## What is the current behavior?

The pricing page shows a single compute pricing section
(`PricingComputeSection`) to all visitors with no experimentation
support.

## What is the new behavior?

- Introduces a **pricing calculator A/B experiment**
(`pricingCalculatorExperiment`) using PostHog feature flags evaluated
client-side.
- **Control variant**: Renders the existing `PricingComputeSection` (no
change).
- **Test variant**: Renders a new `NewPricingComputeSection` with:
  - A plan selector toggle (Pro / Team)
  - An interactive compute calculator with slider-based instance sizing
  - Ability to add/remove multiple project instances
  - Live monthly cost estimate breakdown (plan + compute - credits)
  - Expandable compute pricing table with detailed specs
- Adds `getFeatureFlag` and `onFeatureFlags` methods to the shared
`PostHogClient` for client-side flag evaluation on www pages (where
server-side evaluation lacks full person context).

## Additional context

- The experiment is scoped to the `/pricing` page only.
- New components (`NewPricingComputeSection`,
`NewComputePricingCalculator`) are created alongside the existing ones —
the control path is completely untouched.
- Feature flag evaluation happens client-side because www pages don't
have full person context on the server.
- Telemetry type `PricingCalculatorExperimentExposedEvent` is added to
`telemetry-constants.ts`.

---------

Co-authored-by: Sean Oliver <882952+seanoliver@users.noreply.github.com>
Co-authored-by: Mert YEREKAPAN <mertyerekapan@gmail.com>
Co-authored-by: Mert YEREKAPAN <33198490+myerekapan@users.noreply.github.com>
2026-03-10 13:57:52 +01:00

113 lines
3.2 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
export type PlanId = 'free' | 'pro' | 'team' | 'enterprise'
export interface PricingInformation {
id: string
planId: PlanId
name: string
nameBadge?: string
costUnit?: string
href: string
priceLabel?: string
priceMonthly: number | string
warning?: string
warningTooltip?: string
description: string
preface: string
features: (string | string[])[]
footer?: string
cta: string
}
export const plans: PricingInformation[] = [
{
id: 'tier_free',
planId: 'free',
name: 'Free',
nameBadge: '',
costUnit: '/ month',
href: 'https://supabase.com/dashboard/new?plan=free',
priceLabel: '',
priceMonthly: 0,
description: 'Perfect for passion projects & simple websites.',
preface: 'Get started with:',
features: [
'Unlimited API requests',
'50,000 monthly active users',
['500 MB database size', 'Shared CPU • 500 MB RAM'],
['5 GB egress'],
['5 GB cached egress'],
'1 GB file storage',
'Community support',
],
footer: 'Free projects are paused after 1 week of inactivity. Limit of 2 active projects.',
cta: 'Start for Free',
},
{
id: 'tier_pro',
planId: 'pro',
name: 'Pro',
nameBadge: 'Most Popular',
costUnit: '/ month',
href: 'https://supabase.com/dashboard/new?plan=pro',
priceLabel: 'From',
warning: 'Includes one project running on Micro compute.',
priceMonthly: 25,
description: 'For production applications with the power to scale.',
features: [
['100,000 monthly active users', 'then $0.00325 per MAU'],
['8 GB disk size per project', 'then $0.125 per GB'],
['250 GB egress', 'then $0.09 per GB'],
['250 GB cached egress', 'then $0.03 per GB'],
['100 GB file storage', 'then $0.021 per GB'],
'Email support',
'Daily backups stored for 7 days',
'7-day log retention',
['Add Log Drains', 'additional $60 per drain, per project'],
],
preface: 'Everything in the Free Plan, plus:',
cta: 'Get Started',
},
{
id: 'tier_team',
planId: 'team',
name: 'Team',
nameBadge: '',
costUnit: '/ month',
href: 'https://supabase.com/dashboard/new?plan=team',
priceLabel: 'From',
warning: 'Includes one project running on Micro compute.',
priceMonthly: 599,
description: 'Add features such as SSO, control over backups, and industry certifications.',
features: [
'SOC2',
'Project-scoped and read-only access',
'HIPAA available as paid add-on',
'SSO for Supabase Dashboard',
'Priority email support & SLAs',
'Daily backups stored for 14 days',
'28-day log retention',
],
preface: 'Everything in the Pro Plan, plus:',
cta: 'Get Started',
},
{
id: 'tier_enterprise',
planId: 'enterprise',
name: 'Enterprise',
href: 'https://forms.supabase.com/enterprise',
description: 'For large-scale applications running Internet scale workloads.',
features: [
'Designated Support manager',
'Uptime SLAs',
'BYO Cloud supported',
'24×7×365 premium enterprise support',
'Private Slack channel',
'Custom Security Questionnaires',
],
priceLabel: '',
priceMonthly: 'Custom',
preface: '',
cta: 'Contact Us',
},
] as const