Files
supabase/apps/www/.env.local.example
Terry Sutton 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

25 lines
1.6 KiB
Plaintext

# Copy this file in the same folder, rename it to .env.local and fill out the env vars to get www working
CMS_API_KEY=secret
CMS_PREVIEW_SECRET=secret
HCAPTCHA_SECRET_KEY=0x0000000000000000000000000000000000000000
MISC_USE_SERVICE_ROLE_KEY=secret
NEXT_PUBLIC_API_URL=http://localhost:8080/platform
NEXT_PUBLIC_DESIGN_SYSTEM_URL=http://localhost:3003
NEXT_PUBLIC_DOCS_URL=http://localhost:3005
NEXT_PUBLIC_ENVIRONMENT=local
NEXT_PUBLIC_HCAPTCHA_SITE_KEY=10000000-ffff-ffff-ffff-000000000001
NEXT_PUBLIC_IS_PLATFORM=true
NEXT_PUBLIC_MISC_USE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im9idWxkYW5ycHRsb2t0eGNmZnZuIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTg2MTQ2ODUsImV4cCI6MjAzNDE5MDY4NX0.NFt49g6DFkc1X5khCzN5p01iAVo2TMxlx88cY1V0E2M
NEXT_PUBLIC_MISC_USE_URL=https://obuldanrptloktxcffvn.supabase.co
NEXT_PUBLIC_POSTHOG_HOST=https://ph.supabase.green
NEXT_PUBLIC_POSTHOG_KEY=your-posthog-key-here
NEXT_PUBLIC_REFERENCE_DOCS_URL=https://localhost:3010
NEXT_PUBLIC_STUDIO_URL=http://localhost:8082
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InhndWloeHV6cWlid3hqbmlteGV2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2NzUwOTQ4MzUsImV4cCI6MTk5MDY3MDgzNX0.0PMlOxtKL4O9GGZuAP_Xl4f-Tut1qOnW4bNEmAtoB8w
NEXT_PUBLIC_SUPABASE_CONTRIBUTE_PUBLISHABLE_KEY=ssb_publishable_mNwzuU1NFNYbzROZi6hJYw_iaNl18Qg
NEXT_PUBLIC_SUPABASE_CONTRIBUTE_URL=https://blqulwhtcjeuoxjesbas.supabase.co
NEXT_PUBLIC_SUPABASE_URL=https://xguihxuzqibwxjnimxev.supabase.co
NEXT_PUBLIC_UI_LIBRARY_URL=http://localhost:3004
NEXT_PUBLIC_URL=http://localhost:3000
SUPABASE_COM_SERVICE_ROLE_KEY=secret