Commet
  • Pricing
Log InTry out
Templates

Quota Template

Quota-based pricing for a durable balance that rises and falls with use. Included amount per plan, per-unit overage, a live usage bar, and a billing portal.

Live DemoSource
Quota Template

Quota-based billing template for a durable, countable balance that goes up when you create and down when you delete, unlike a one-way usage meter. Each plan includes an amount, and going over triggers per-unit overage. This example uses a task management app with three plans (Starter, Pro, Scale): creating a task calls quota.add, deleting calls quota.remove, and a live usage bar tracks used / included.

Stack: Next.js 16, Better Auth, Drizzle ORM, PostgreSQL, Commet SDK

Quick Start

commet create my-app -t quota
cd my-app
pnpm install
pnpm dev

What's Included

  • Three plans with increasing task limits (5, 15, 50)
  • Per-task overage billing when you go over the included amount
  • Live usage bar showing used / included, turning amber near the limit and destructive on overage
  • Creating a task calls quota.add; deleting a task calls quota.remove
  • Customer billing portal
  • Pricing page with plan comparison

Key Files

  • actions/tasks.ts — Create and delete tasks with quota.add / quota.remove
  • components/billing/task-usage-bar.tsx — Usage bar reading features.get
  • app/pricing/page.tsx — Pricing page with plan comparison
  • lib/commet.ts — Commet SDK client

Learn More

  • Configure Features
  • Customer Portal

Developers

  • Documentation
  • Templates
  • GitHub

Frameworks

  • Next.js
  • Remix
  • Nuxt
  • SvelteKit
  • Astro
  • Express
  • Hono
  • Django

Resources

  • Blog
  • Changelog
  • Pricing

AI

  • Agents
  • MCP Server
  • Agent Skills
  • Claude Code
  • Codex

Learn

  • Guides
  • Glossary
  • Solutions
  • Billing for AI Models
  • Comparison

Company

  • About
  • Open Source
  • Terms
  • Privacy

Countries

  • Mexico
  • Argentina
  • Colombia
  • Chile
  • Peru
  • Ecuador
  • Uruguay
  • Paraguay
  • Bolivia
  • Panama
  • El Salvador
  • Brazil
XLinkedInGitHub