Fixed pricing template with boolean feature flags. Two plans (Pro and Max) with monthly/yearly billing, Stripe checkout, customer portal, and feature access checks. No metered or seat-based billing.
Stack: Next.js 16, Better Auth, Drizzle ORM, PostgreSQL, Commet SDK
Quick Start
commet create my-app -t fixed
cd my-app
pnpm install
pnpm devWhat's Included
- Two plans with monthly and yearly prices
- Five boolean features with per-plan access control
- Stripe checkout flow with plan selection
- Customer billing portal (manage subscription, invoices)
- Auth with automatic customer creation on signup
- Feature flag checks on the dashboard
- Pricing page with plan comparison
Key Files
lib/auth/auth.ts— Better Auth + Commet plugin (portal, subscriptions, features)lib/payments/commet.ts— Checkout session creation and subscription checksapp/pricing/page.tsx— Dynamic pricing page from Commet plans APIapp/(dashboard)/dashboard/page.tsx— Feature access dashboardapp/api/commet/portal/route.ts— Customer portal redirect
