Per-seat billing template for team collaboration products. Three plans (Starter, Team, Enterprise) with included seats, per-seat overage, boolean features, and workspace management on signup.
Stack: Next.js 16, Better Auth, Drizzle ORM, PostgreSQL, Commet SDK
Quick Start
commet create my-app -t seats
cd my-app
pnpm install
pnpm devWhat's Included
- Three plans with increasing seat limits (3, 10, 25)
- Per-seat overage billing for extra members
- Boolean features that unlock per tier (branding, support, audit log)
- Workspace creation on signup with automatic seat tracking
- Team member invite and management
- Customer billing portal
- Pricing page with plan comparison
Key Files
lib/auth/auth.ts— Better Auth + Commet plugin with seats module and workspace hooklib/payments/commet.ts— Checkout session creationapp/(dashboard)/dashboard/team/page.tsx— Team management and seat usageapp/(dashboard)/dashboard/page.tsx— Seat usage overviewactions/team.ts— Invite and remove team members
