From 333625f199cf6665445dd922b36554466717a7f3 Mon Sep 17 00:00:00 2001 From: miloschwartz Date: Thu, 12 Feb 2026 20:24:10 -0800 Subject: [PATCH] rename starter in cloud to basic --- server/lib/billing/limitSet.ts | 8 ++--- .../settings/(private)/billing/page.tsx | 34 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/server/lib/billing/limitSet.ts b/server/lib/billing/limitSet.ts index b47b5681..53c88dc6 100644 --- a/server/lib/billing/limitSet.ts +++ b/server/lib/billing/limitSet.ts @@ -15,10 +15,10 @@ export const sandboxLimitSet: LimitSet = { }; export const freeLimitSet: LimitSet = { - [FeatureId.USERS]: { value: 5, description: "Starter limit" }, - [FeatureId.SITES]: { value: 5, description: "Starter limit" }, - [FeatureId.DOMAINS]: { value: 5, description: "Starter limit" }, - [FeatureId.REMOTE_EXIT_NODES]: { value: 1, description: "Starter limit" }, + [FeatureId.SITES]: { value: 5, description: "Basic limit" }, + [FeatureId.USERS]: { value: 5, description: "Basic limit" }, + [FeatureId.DOMAINS]: { value: 5, description: "Basic limit" }, + [FeatureId.REMOTE_EXIT_NODES]: { value: 1, description: "Basic limit" }, }; export const tier1LimitSet: LimitSet = { diff --git a/src/app/[orgId]/settings/(private)/billing/page.tsx b/src/app/[orgId]/settings/(private)/billing/page.tsx index f64c9557..b108d461 100644 --- a/src/app/[orgId]/settings/(private)/billing/page.tsx +++ b/src/app/[orgId]/settings/(private)/billing/page.tsx @@ -61,7 +61,7 @@ import { import { FeatureId } from "@server/lib/billing/features"; // Plan tier definitions matching the mockup -type PlanId = "starter" | "home" | "team" | "business" | "enterprise"; +type PlanId = "basic" | "home" | "team" | "business" | "enterprise"; type PlanOption = { id: PlanId; @@ -73,8 +73,8 @@ type PlanOption = { const planOptions: PlanOption[] = [ { - id: "starter", - name: "Starter", + id: "basic", + name: "Basic", price: "Free", tierType: null }, @@ -109,10 +109,10 @@ const planOptions: PlanOption[] = [ // Tier limits mapping derived from limit sets const tierLimits: Record< - Tier | "starter", + Tier | "basic", { users: number; sites: number; domains: number; remoteNodes: number } > = { - starter: { + basic: { users: freeLimitSet[FeatureId.USERS]?.value ?? 0, sites: freeLimitSet[FeatureId.SITES]?.value ?? 0, domains: freeLimitSet[FeatureId.DOMAINS]?.value ?? 0, @@ -183,7 +183,7 @@ export default function BillingPage() { // Confirmation dialog state const [showConfirmDialog, setShowConfirmDialog] = useState(false); const [pendingTier, setPendingTier] = useState<{ - tier: Tier | "starter"; + tier: Tier | "basic"; action: "upgrade" | "downgrade"; planName: string; price: string; @@ -402,8 +402,8 @@ export default function BillingPage() { pendingTier.action === "upgrade" || pendingTier.action === "downgrade" ) { - // If downgrading to starter (free tier), go to Stripe portal - if (pendingTier.tier === "starter") { + // If downgrading to basic (free tier), go to Stripe portal + if (pendingTier.tier === "basic") { handleModifySubscription(); } else if (hasSubscription) { handleChangeTier(pendingTier.tier); @@ -417,7 +417,7 @@ export default function BillingPage() { }; const showTierConfirmation = ( - tier: Tier | "starter", + tier: Tier | "basic", action: "upgrade" | "downgrade", planName: string, price: string @@ -432,9 +432,9 @@ export default function BillingPage() { // Get current plan ID from tier const getCurrentPlanId = (): PlanId => { - if (!hasSubscription || !currentTier) return "starter"; + if (!hasSubscription || !currentTier) return "basic"; const plan = planOptions.find((p) => p.tierType === currentTier); - return plan?.id || "starter"; + return plan?.id || "basic"; }; const currentPlanId = getCurrentPlanId(); @@ -451,8 +451,8 @@ export default function BillingPage() { } if (plan.id === currentPlanId) { - // If it's the starter plan (starter with no subscription), show as current but disabled - if (plan.id === "starter" && !hasSubscription) { + // If it's the basic plan (basic with no subscription), show as current but disabled + if (plan.id === "basic" && !hasSubscription) { return { label: "Current Plan", action: () => {}, @@ -484,10 +484,10 @@ export default function BillingPage() { plan.name, plan.price + (" " + plan.priceDetail || "") ); - } else if (plan.id === "starter") { - // Show confirmation for downgrading to starter (free tier) + } else if (plan.id === "basic") { + // Show confirmation for downgrading to basic (free tier) showTierConfirmation( - "starter", + "basic", "downgrade", plan.name, plan.price @@ -566,7 +566,7 @@ export default function BillingPage() { }; // Check if downgrading to a tier would violate current usage limits - const checkLimitViolations = (targetTier: Tier | "starter"): Array<{ + const checkLimitViolations = (targetTier: Tier | "basic"): Array<{ feature: string; currentUsage: number; newLimit: number;