golemkit

// AI-native · agent-friendly

Ship AI SaaS your coding agent can extend without hallucinating.

A Next.js 16 starter with authentication, credit-based billing, streaming AI, and RAG already wired together — and a codebase documented so Cursor and Claude Code extend the patterns instead of inventing new ones.

agent · extend
add a credit-metered "summarize" endpoint
reading CLAUDE.md → matched the billable-endpoint pattern

+ src/app/api/summarize/route.ts
+ src/modules/ai/summarize.ts

pnpm typecheck && pnpm lint
✓ types  ✓ lint  ✓ build

the stack, already wired — Next.js 16 · React 19 · Better Auth · Drizzle + Postgres · Vercel AI Gateway · Stripe / iyzico · pgvector · Resend

// ai-native

The AI parts are the hard parts. They're done.

  • Six recipes: chat, RAG + PDF, summarize, extraction, images, agents
  • A credit ledger that meters real token usage per request
  • Metered API keys — let users call your AI from their own code
  • Every AI call: authenticated, rate-limited, and metered

// agent-friendly

A codebase your agent reads before it writes.

  • One CLAUDE.md as the single source of truth
  • Feature-based modules with strict types and JSDoc
  • Thin routes, thick modules — patterns worth copying
  • No any, no magic, no hidden global state

// in the box

Everything a launch needs, none of the boilerplate.

  • Email/password, Google OAuth & magic-link auth
  • Account settings: password, email, GDPR deletion
  • Credit packs (Stripe or iyzico) + monthly subscription
  • Token-based metering + Postgres rate limiting
  • Six AI recipes, from streaming chat to a tool-calling agent
  • pgvector RAG + chat-with-your-PDF upload
  • Public API with metered, revocable API keys
  • Admin panel: stats, user search, credit grants
  • Lifecycle email: welcome, low-credit, weekly digest
  • Cron recipe with a scheduled usage-digest job
  • Typed, fail-fast environment validation
  • Migrations + one-click Vercel deploy

Clone it. Point your agent at it. Ship.

Skip the plumbing and spend your first week on the product, not the setup.