Open Source — MIT License

Ship your SaaS in weeks,
not months

A production-ready boilerplate with auth, billing, AI, storage, and more. Next.js + Go + PostgreSQL. Every module is independent — use only what you need.

Everything you need, nothing you don't

Every feature is an independent module. Use all of them or pick only what your product needs. Delete a folder, zero compilation errors.

Core

Authentication

Email/password login, JWT sessions, password reset, email verification. Production-ready auth from day one.

Module

Billing & Subscriptions

Stripe Checkout, 3 plans, webhooks, invoices, customer portal. Plug in your Stripe key and go.

Module

AI Chat

Gemini-powered conversations with SSE streaming, conversation history, and auto-titling.

Module

File Storage

Upload and manage files via Cloudflare R2. Drag-and-drop UI, type validation, 50MB limit.

Module

Email System

Transactional emails via Resend with HTML templates for verification, password reset, and more.

Module

Notifications

In-app notification bell with unread count, mark-as-read, and 30s polling. Always available.

Module

Blog CMS

Database-backed blog with tags, slugs, SEO metadata, and draft/publish workflow. Admin-managed.

Module

Admin Panel

Separate Vite app for user management, blog editing, and dashboard stats. Role-based access.

Core

Background Jobs

Go-native job scheduler with token cleanup and system stats logging. No external dependencies.

Core

Security

Rate limiting, bcrypt passwords, parameterized SQL, CORS, input validation at every boundary.

Core

Hexagonal Architecture

Clean separation of concerns. Swap any provider by changing one adapter. Test logic without infrastructure.

Core

Developer Experience

CLAUDE.md at every level, skills system, 74+ tests, TypeScript strict mode, conventional commits.

Spotlight

AI Chat, ready to go

Ship AI-powered conversations out of the box. Gemini integration with SSE streaming, persistent conversation history, and auto-generated titles.

  • Real-time streaming responses via Server-Sent Events
  • Full conversation history stored in PostgreSQL
  • Swap AI provider by changing one adapter file
U
How do I add a new feature to CleanSaaS?
AI
Create your domain entity, port interface, app service, adapter, and handler following the hexagonal architecture. Each layer only depends on the one above it...

Admin Dashboard

admin.cleansaas.dev

Total Users

1,247

Blog Posts

42

User management • Blog CMS • Role-based access
Spotlight

Admin panel included

A separate Vite + React app for managing your SaaS. User management, blog CMS, and dashboard stats — all protected by role-based access control.

  • Manage users: search, change roles, view activity
  • Blog CMS with draft/publish workflow and SEO fields
  • Separate deployment — same design tokens, different app
Spotlight

Architecture that scales with you

Hexagonal architecture on the backend, feature-based on the frontend. Every module is independently removable — delete a folder, zero compilation errors.

  • Swap Stripe for Lemon Squeezy: one adapter file + one line in main.go
  • Test business logic without a database using interface mocks
  • Remove any feature without touching other code

// Swap a provider in seconds

- paymentSvc := stripe.NewPaymentService(key)

+ paymentSvc := lemonsqueezy.NewPaymentService(key)

// Remove a feature cleanly

$ rm -rf backend/internal/app/billing/

$ rm -rf frontend/src/features/billing/

$ go build ./... // still compiles

Modern stack, no compromise

Every technology chosen for performance, developer experience, and production readiness.

Frontend

Next.js

React framework with Server Components

Backend

Go + Chi

Fast, compiled backend with minimal dependencies

Database

PostgreSQL

Pure SQL, no ORM — full control over queries

Styling

Tailwind CSS

Utility-first styling with design tokens

Deploy

Vercel

Zero-config frontend deployment

Deploy

Railway

One-click Go backend hosting

Database

Neon

Serverless PostgreSQL, scales to zero

Storage

Cloudflare R2

S3-compatible storage, no egress fees

Built different

CleanSaaS vs typical SaaS starters

Feature
CleanSaaS
Typical Starter
Architecture
Hexagonal (Go) + Feature-based (Next.js)
MVC / flat structure
Modularity
Delete any feature, zero errors
Features tightly coupled
Database
Pure SQL, no ORM overhead
Prisma / ORM with migrations
AI Integration
Gemini streaming + swappable adapter
No AI or basic wrapper
Admin Panel
Separate Vite app with CMS
Shared app or none

Built for developers who ship fast

AI-native developer experience. Consistent patterns. Zero guesswork.

8 Claude Code skills

Custom slash commands: /add-feature, /check, /review, /test, /add-migration, /add-endpoint, /add-adapter, /remove-feature. AI builds features for you.

TDD-first workflow

Every layer is testable. Domain tests, service tests with mocks, integration tests against real PostgreSQL. 80%+ coverage target on business logic.

One command to extend

Add a feature: domain → ports → service → adapter → handler → frontend. Consistent patterns across every module — learn one, know all.

Stop rebuilding the same things

Focus on what makes your product unique. We handle auth, billing, storage, and the rest.