Free chat-UI starter on GitHub — take it, it's MIT

Ship your AI Agent SaaSin 24 hours.

The Next.js AI agent boilerplate with authentication, payments, a multi-step agent engine and a dashboard — already wired together. Stop rebuilding the plumbing. Start charging for the product.

One payment · lifetime updates · no subscription

Next.js 16React 19TypeScriptTailwind v4SupabasePolarAI SDK v5

Without this kit

  • 3 days on Google OAuth and session refresh
  • 2 days on webhooks that grant access twice
  • 2 days on RLS policies you're not sure are safe
  • 3 days on a tool-calling loop that streams properly
  • …and you still haven't written your product

With it

  • Clone, npm install, paste 6 keys
  • Google login works
  • A test payment flips a user to Pro
  • The agent calls tools and streams its reasoning
  • Day one: you're writing your actual product

Everything the tutorials skip

The demo is easy. The parts that make it a business are not — so those are the parts we built.

Supabase Auth, already wired

Google OAuth, session refresh in the proxy, protected routes, and row-level security policies that make cross-tenant leaks impossible — not unlikely, impossible.

Polar payments that actually pay

One-time checkout, a signature-verified webhook, and an idempotent entitlement grant. A replayed webhook cannot double-charge you a licence.

A real agent engine

Not a chat box. A multi-step tool-calling loop that plans, calls tools, reads results and re-plans — up to 8 steps, streamed to the UI as it happens.

Dashboard with tool traces

Watch the agent think: every tool call, every payload, every result. Plus run history and token accounting your users will trust.

Quota gating built in

Free users get 20 runs a month; Pro is unlimited. The exact line where a hobby project becomes a business — already drawn.

Swap models with one env var

Claude, GPT or Gemini. The model is named in exactly one file, so switching provider is a config change, not a refactor.

What's in the zip

Three files are your product. The rest is plumbing you never have to write.

src/
├── proxy.ts                       # session refresh + route guard
├── app/
│   ├── login/                     # Google sign-in
│   ├── dashboard/
│   │   ├── page.tsx               # agent console, live tool traces
│   │   ├── runs/                  # run history + token accounting
│   │   └── billing/               # upgrade → Polar checkout
│   └── api/
│       ├── agent/route.ts         ★ auth → quota → agent loop → persist
│       ├── checkout/route.ts      ★ user id attached server-side
│       └── webhooks/polar/        ★ verify signature → grant Pro (idempotent)
└── lib/
    ├── agent/tools.ts             ★ add a tool, the agent can call it
    ├── billing.ts                 ★ the one function that decides who pays
    └── supabase/                  # client · server · admin · session

supabase/schema.sql                # tables + RLS. Paste. Run. Done.

One payment. Yours forever.

Cheaper than the afternoon you'd spend on the webhook alone.

Free Agent UI

The chat interface, open source.

$0

  • Streaming chat UI
  • Anthropic · OpenAI · Google
  • Next.js 16 + Tailwind v4
  • MIT licence
Download free
Most popular

Premium Agentic Boilerplate

The whole business, not just the chat box.

$49$79once

  • Everything in Free
  • Supabase Auth (Google) + RLS
  • Polar payments + webhooks
  • Multi-agent dashboard UI
  • Tool-calling agent engine
  • Quota & entitlement gating
  • SQL schema + setup guide
  • Lifetime updates
Get the Premium Kit — $49

Secure checkout by Polar · VAT handled · instant download

Questions people actually ask

What exactly do I get?+

A .zip containing a complete Next.js 16 project: Supabase Auth with Google login, Polar one-time payments with a signature-verified webhook, a multi-step tool-calling agent engine, a dashboard with live tool traces and run history, the SQL schema, and a README that walks you from clone to deployed in about 30 minutes.

Is this a subscription?+

No. It is a single payment for lifetime access, including all future updates. There is nothing to cancel.

Which AI providers does it support?+

Anthropic (Claude), OpenAI and Google Gemini. You switch between them with one environment variable — the model is named in exactly one file.

Can I use it for client work?+

Yes. Unlimited personal and commercial projects, including work you bill clients for. The only thing you may not do is resell the boilerplate itself as a competing starter kit.

Do I need to know Supabase or Polar already?+

No. The README has click-by-click setup for both, including the Google OAuth screen and the webhook. If you can copy and paste an API key, you can ship this.

How is this different from the free version?+

The free repo on GitHub is the chat UI and nothing else. The premium kit is the part that actually takes money: authentication, the payments loop, entitlement gating, the agent engine with tool calling, and the dashboard.

What if it doesn't work for me?+

Email us and we will fix it or refund you. No forms, no hoops.

Your competitor is still configuring OAuth.

Skip the fortnight. Ship the thing you actually wanted to build.

Get the Premium Kit — $49