Free & Open Source

The Next.js SaaS Boilerplate You'll Actually Ship With.

Auth, billing, email, blog, and observability - wired together and ready on day one. Free forever. Clone it, own it, ship it.

100% free, no paywallsFull source codeNo vendor lock-inBuilt for AI agents

Getting Started

Running in Production the Same Day You Clone

01

Clone

Fork or clone the GitHub repository. It's free and open source - no paywalls, no license keys.

02

Configure

Add your environment variables: database URL, Stripe keys, Resend API key, auth secret. Fully documented.

03

Build

Add your features on a solid foundation. Auth, billing, email, and blog are already solved.

04

Deploy

Push to Vercel, Fly.io, Railway, or any Node host. Your SaaS goes live.

Included Out of the Box

All Foundational Parts, Already Built

The pieces most SaaS products need - complete, tested, and ready to extend with your own logic.

Better AuthGoogle OAuthPostgreSQL

Authentication

Streamlined Google OAuth authentication for a better user experience. All user data lives in your PostgreSQL database - no third-party lock-in.

  • Google OAuth sign-in only
  • Branded sign-in experience
  • Email verification flow
  • Session management (7-day lifetime)
  • Email change with confirmation
  • Rate limiting on all public endpoints
PrivacyGDPRCookies

GDPR Compliance

Cookie consent banner with granular preferences. Users control analytics and monitoring consent with full transparency.

  • Cookie consent banner on first visit
  • Granular preferences (Essential/Analytics/Monitoring)
  • Consent stored in localStorage
  • Privacy policy page with third-party disclosure
  • PostHog handles all observability with user consent
  • Ready-to-customize privacy policy template
StripeWebhooks

Stripe Billing

The full subscription lifecycle is built and tested. Start collecting payments on day one with zero webhook boilerplate.

  • Subscription checkout
  • Webhook event processing with idempotency
  • Customer portal for self-service
  • Plan upgrades & downgrades
  • Cancellation handling
  • 3-day grace period for past-due accounts
PostgreSQLDrizzle ORM

Database & ORM

Type-safe queries that let you read and understand every SQL statement. No magic, no surprises.

  • Drizzle ORM with full TypeScript types
  • Migrations as reviewable SQL files
  • Schema in version control
  • Multi-table writes in transactions
  • Ready to extend for your domain
ResendReact Email

Transactional Email

React Email templates for every user-facing event. Works with Resend out of the box, console-logs in dev.

  • Welcome & email verification
  • Password reset & change confirmation
  • Subscription & payment events
  • 3× retry with exponential backoff
  • Logs to console in dev - no API key needed
MDXJSON-LDSitemap

SEO Blog

Write articles in Markdown, drop them in /content/posts, and they're live at /blog. Every page is SEO-optimized out of the box.

  • Markdown & MDX support
  • Frontmatter: title, description, date, tags
  • Per-post meta tags and OpenGraph
  • JSON-LD structured data per post
  • Auto-generated XML sitemap
  • Reading time estimate
PostHogLogTapeOTLP

Observability

All-in-one monitoring with PostHog handling errors, analytics, session replay, and logs. Consent-aware and production-ready from day one.

  • PostHog error tracking with exception capture
  • Session replay with user consent
  • Product analytics with typed event catalog
  • Centralized logs via OTLP (50GB/month free)
  • LogTape structured logging (colored dev, JSON prod)
  • Health check endpoint at /api/health

Tech Stack

A Stack You Can Trust

Picked for reliability, type safety, and developer experience - tools that get out of your way.

Next.js 16Full-stack framework
React 19UI library
TypeScriptType safety everywhere
Tailwind CSS v4Utility CSS
shadcn/uiUI components
Better AuthAuthentication
Drizzle ORMType-safe SQL
PostgreSQLDatabase
tRPCEnd-to-end type-safe API
ZodValidation
React Hook FormForms
StripePayments & subscriptions
ResendTransactional email
React EmailEmail templates
next-intlInternationalization
PostHogAnalytics, errors, logs
LogTapeStructured logging
VitestUnit tests
PlaywrightE2E tests
BunPackage manager
T3 EnvTypesafe env vars