MIT · Open source

A complete AI SaaS. Free.

Auth, Stripe subscriptions, credits, AI images — working, tested, MIT. Clone it and build YOUR product.

Open-source GitHub repo by Nikandr Surkov

10 free creditsA retro cartoon robot painting a sparkling landscape at an easel
AuthStripeCredits ledgerAI imagesOpen source

Plain words

What is this?

  • This website is the demo.sign up, everything works
  • The code is a free GitHub repo.MIT · clone it
  • You build YOUR product on top.auth + payments done

Three steps

How it works.

Happy laptop character with a git branch on its screen01

Clone it

One repo, everything wired.

Golden key with a sparkle and a small tag02

Add your keys

Stripe and a database. That's it.

Small rocket lifting off on halftone smoke03

Ship your SaaS

Your product on a proven core.

Ledger of features

It handles the money.

Tested, idempotent, boring on purpose. Vibe-code the product on top.

Smiling padlock character holding a golden key01

Auth that owns data

Email, Google, GitHub, magic links — sessions in your Postgres.

Mail envelope inside a bold looping retry arrow02

Webhooks survive retries

Raw-body signatures, one sync writer, idempotency keys everywhere.

Open accounting ledger with stacked gold coins and a mint check mark03

An honest credits ledger

Atomic spends, automatic refunds. Balance is a SUM, not a hope.

Polaroid photo with a sunset landscape popping out of the frame04

AI images, wired

Prompt → spend → image → history. Swap models with one env string.

Friendly robot head beside a clipboard with checkmarks05

Built for AI agents

AGENTS.md, scoped rules, skills, hooks that block broken code.

Clipboard with checkmarks next to a small gold trophy06

Proven by 106 tests

Vitest and Playwright against real Postgres, on every push.

AI-native

Built for AI agents.

One AGENTS.md briefs Claude Code, Cursor, Codex, Copilot — guardrails included.

AGENTS.md # commands, boundaries, done-criteria
CLAUDE.md # @AGENTS.md + plan-mode rules
DESIGN.md # tokens + hard rules
.claude/
├── settings.json # hooks: no "done" until typecheck passes
├── rules/billing.md # scoped: never weaken webhook checks
├── skills/ # /add-feature /add-ai-provider /db-migration
└── agents/code-reviewer.md # read-only security reviewer
.cursor/rules/ # mirrored .mdc rules
specs/TEMPLATE.md # spec-driven workflow
  • Agents run the right commands — pnpm, drizzle-kit, stripe listen
  • Hard rules enforced by hooks, not vibes: ledger stays append-only
  • Path-scoped rules load only when billing or schema files are touched
  • Design tokens as guardrails — extensions stay on-brand automatically
  • Spec template turns "add teams" into a reviewable plan first

Pricing

Pick a plan.

One config file drives pricing, checkout, and webhook grants. Start free.

free

Free

  • 10 welcome credits
  • 1 credit per image generation
  • Full source code, MIT
freeStart →
pro

ProMost popular

  • 200 credits every month
  • Credits accumulate — no expiry
  • Cancel anytime in the portal
$9
/mo
Start →
ultra

Ultra

  • 1,000 credits every month
  • Credits accumulate — no expiry
  • Cancel anytime in the portal
$29
/mo
Start →
topup

Top-up

100 credits, one-time, no subscription required.

$5

This repo is complete

Free vs Pro.

Pro is what comes after product-market fit.

This repo
  • Auth, subscriptions, credits ledger

    Full

  • AI generation

    1 image provider

  • Async job pipeline · webhooks · auto-refund

    Not included

  • Gallery + R2 storage · teams · admin

    Not included

  • MCP server + extended agent skills

    Core set

PRO · $299
  • Auth, subscriptions, credits ledger

    + rollover, meters, packs

  • AI generation

    Image + video + audio × 7 providers

  • Async job pipeline · webhooks · auto-refund

    Inngest, durable

  • Gallery + R2 storage · teams · admin

    Included

  • MCP server + extended agent skills

    Full suite

Get Pro →

Asked before you asked

Questions.

Q1Is this production-ready?

The billing and ledger core is tested against real Postgres, with CI gates on every push.

Q2What do I need to run it locally?

pnpm, Docker for Postgres, Stripe test keys. AI generation runs free with AI_MOCK=true.

Q3Why a credits ledger instead of a balance column?

Columns can't survive webhook retries or races. Append-only rows with idempotency keys can — the database enforces it.

Q4How do coding agents fit in?

AGENTS.md briefs them, scoped rules guard the money paths, hooks block completion until typecheck passes.

Q5Can I use it commercially?

MIT. Clone it, rename it, sell what you build. Attribution appreciated, not required.

Q6What does the Pro version add?

Multi-provider media generation, durable job pipeline, gallery, teams, admin, MCP server. One link: nikandr.com.

Closing entry

Clone the ledger.