Skip to content

azizali/betterstarter

Repository files navigation

BetterStarter Logo

BetterStarter

Start your SaaS the right way. Launch fast, scale confidently, built for the future.

TanStack Start React 19 TypeScript Postgres + Drizzle Tailwind CSS v4

Read the Docs


What is BetterStarter?

BetterStarter is a full-stack SaaS boilerplate built on TanStack Start giving you everything you need to ship a production-ready product without the setup tax.

Authentication, billing, database, email, file uploads, a blog, and a polished landing page, all wired up and ready to go.

Stack

Layer Technology
Framework TanStack Start (full-stack React, SSR)
Routing TanStack Router (file-based, type-safe)
Data fetching TanStack Query
Database Postgres via Drizzle ORM (hosted on Supabase)
Auth better-auth (email OTP, sessions)
Payments Stripe (subscriptions + webhooks)
Styling Tailwind CSS v4 + shadcn/ui
Email Plunk
Blog Content Collections (Markdown)
Linting Biome
Deployment Vercel, Netlify (SSR)

Quick Start

pnpm i
pnpm dev

First-Time Setup

1. Database

Create a Postgres database (e.g. on Neon, Supabase, any postgres), then:

pnpm db:pull   # pull existing schema
pnpm db:push   # push schema to your DB

2. Email

Verify your sending domain in Plunk and add the API key to .env.local.

3. Stripe

# Install Stripe CLI (macOS)
brew install stripe/stripe-cli/stripe

# Authenticate
stripe login

# Forward webhooks to local server
stripe listen --forward-to localhost:3000/api/stripe/webhook
# Copy the printed whsec_... secret

Add to .env.local:

STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
APP_BASE_URL=http://localhost:3000

Update STRIPE_CONFIG in src/constants/billing.ts with your Price IDs, then push the billing schema:

pnpm db:generate
pnpm db:push

Useful Commands

Command Description
pnpm dev Start dev server
pnpm build Production build
pnpm check:fix Lint and format with Biome
pnpm db:generate Generate Drizzle migrations
pnpm db:push Push schema to database
pnpm db:studio Open Drizzle Studio

Features

  • ✅ Deploy in < 5 mins
  • ✅ Authentication (Google, Passkeys, 34+ mechanisms)
  • ✅ Fast DB with Drizzle ORM (Neom, Supabase, any Postgres host)
  • ✅ Email with Plunk (Cheap and open-source)
  • ✅ Payment module (supports one-time & subscription)
  • ✅ Beautiful SEO + AEO compatible Blog
  • ✅ Deploy anywhere (Vercel, Netlify, cloudflare)

Roadmap

  • Admin dashboard
  • Make generic landing page blocks
  • Agent SDK support (With mastra ai)
  • Multi-tenancy (Add user, roles, ban user, make organizations)
  • Auto OG image generation
  • Migrate Docs with module with Fumadocs

About

Full-Stack, AI-ready, vendor-agnostic starter boilerplate using open-source stack

Topics

Resources

Stars

Watchers

Forks

Contributors