Skip to Content
StackBlaze Templates — operator documentation
AI SaaS KitIntroduction

StackBlaze AI SaaS Kit

A production-ready, multi-tenant AI SaaS template built on a single-language TypeScript stack. You buy a licence, run one command, answer a few prompts, and get a working app you own outright — auth, billing, an AI chat layer, and a multi-tenant data model already wired together.

This documentation is for operators: the developers who scaffold the template, configure it, run it locally, and deploy it to production.

What you get

  • Authentication — email/password with verification, password reset, and optional Google / GitHub OAuth (better-auth).
  • Multi-tenant workspaces — every user gets a personal workspace; users can belong to many organisations. Every resource is scoped by tenant_id.
  • AI chat — a streaming chat interface backed by the Vercel AI SDK, with a provider you pick at scaffold time (OpenAI, Anthropic, Google, and ~15 more).
  • Agentic tool calling — an extensible tool registry, including a built-in web_search tool (Tavily / Exa / Firecrawl).
  • Billing — Stripe checkout, customer portal, and webhook-driven plan changes, gated by the plan limits in lib/billing/plans.ts.
  • Usage metering & limits — AI calls record tokens; monthly usage enforces hard and soft limits per plan.
  • Admin portal — a role-gated platform-owner portal at /admin.
  • Rate limiting & email — optional Upstash Redis rate limiting and Resend transactional email.

The stack

LayerChoice
FrameworkNext.js 16 (App Router), React 19
LanguageTypeScript (strict)
AIVercel AI SDK — provider switchable via env var
Authbetter-auth + organization plugin
DatabasePostgreSQL + Drizzle ORM
BillingStripe
UIshadcn/ui + Tailwind v4
Rate limitingUpstash Redis (optional)
EmailResend (optional)
Deploy targetVercel

Where to start


New to the template? Read Getting Started → Scaffold a project first — it walks through the npx create-stackblaze-app flow end to end.