This is a demo project. For demonstration only.

Getting StartedTemplateTanStack Start

Getting Started with the TANSHIP SaaS Template

Nia Harbor

Nia Harbor

Interface Engineer

A quick-start guide for developers who want to go from cloning the repo to a running SaaS in days.

Getting Started with the TANSHIP SaaS Template

The TANSHIP template is a production-ready starting point for SaaS applications. It includes authentication, payments, database, email, i18n, and 20+ pre-built pages — all configured for Cloudflare Workers.

What You Get

Out of the box, the template includes:

  • Authentication — Better Auth with Google OAuth. Sign-up, sign-in, password reset, and session management.
  • Payments — Stripe, PayPal, and Creem support. Choose one provider and configure your keys.
  • Database — Drizzle ORM on Cloudflare D1. Type-safe queries, automatic migrations, and a local dev workflow.
  • Email — Resend integration with localized templates for transactional emails.
  • Pages — Landing, Dashboard, Blog, Docs, Changelog, Pricing, About, Contact, and more.
  • Themes — 34 presets with light and dark modes and a visual customizer.
  • i18n — English and Chinese URL-based routing with no hardcoded strings.

Quick Start

Clone the repository and install dependencies:

git clone <repo-url> my-saas
cd my-saas
pnpm install

Copy the example environment file and fill in your values:

cp .env.example .env

Start the dev server:

pnpm dev

The application runs at http://localhost:3000 with both English and Chinese locales available.

First Things to Configure

Before you can use the template fully, set up these services:

Authentication

Better Auth is pre-configured. Add your Google OAuth client ID and secret to .env. Auth pages at /sign-in, /sign-up, and /dashboard work immediately.

Database

Drizzle ORM connects to Cloudflare D1. Run the initial migration:

pnpm db:generate
pnpm db:migrate:local

Payments

Set PAYMENT_PROVIDER to stripe, paypal, or creem in your environment. Add the corresponding API keys. The checkout flow at /checkout/start will create real payment sessions.

Email

Add your Resend API key. The template sends localized emails for newsletter confirmation, contact form receipts, and auth notifications.

Project Structure

src/
├── routes/          # File-based routes (TanStack Router)
├── features/        # Page content and feature-scoped code
├── components/      # Shared UI components (shadcn/ui)
├── server/          # Server-only code (auth, db, email, payments)
├── i18n/            # EN/ZH translation files
└── lib/             # Shared utilities

Building for Production

When you are ready to deploy:

pnpm build

This produces an optimized build in dist/ ready for Cloudflare Workers deployment. See the deployment guide for the full production workflow.