StartFast Pro
StartFast Pro is a premium, production-ready Next.js 15 boilerplate with authentication, payments, teams, i18n, analytics, blog, and a clean UI system — all pre-configured.
This documentation will help you get started quickly and customize StartFast Pro for your SaaS product.
What You Get
- •Next.js 15 App Router with React 19 and server components
- •Authentication with Better Auth (Email, Google, GitHub OAuth)
- •PostgreSQL Database with Drizzle ORM
- •Stripe Payments with subscriptions and webhooks
- •Email Delivery via Resend
- •Internationalization with next-intl (7 languages)
- •Teams & RBAC with organizations, roles, and permissions
- •Analytics with PostHog integration
- •Blog System with Markdown, SEO, and reading time
- •Admin Dashboard for users, orders, analytics, and content
- •E2E Testing with Playwright
- •TypeScript end-to-end type safety
Quick Start
git clone https://github.com/Harries/startfast-pro.git my-saascd my-saas && npm installcp .env.example .env.localnpm run db:pushnpm run devOpen http://localhost:3000
Environment Variables
Copy .env.example to .env.local and configure:
# App
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_APP_NAME=StartFast Pro
# Database (Postgres)
DATABASE_URL=postgresql://username:password@localhost:5432/startfast_pro
# Authentication (Better-Auth)
BETTER_AUTH_SECRET=your-secret-key-at-least-32-characters
BETTER_AUTH_URL=http://localhost:3000
# Email (Resend)
RESEND_API_KEY=re_xxxxx
EMAIL_FROM=onboarding@yourdomain.com
# Stripe
STRIPE_SECRET_KEY=sk_test_xxxxx
STRIPE_WEBHOOK_SECRET=whsec_xxxxx
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_xxxxx
# Optional: Google OAuth
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# Optional: GitHub OAuth
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
# Analytics (PostHog)
NEXT_PUBLIC_POSTHOG_KEY=
NEXT_PUBLIC_POSTHOG_HOST=https://app.posthog.com
# Default Locale
NEXT_PUBLIC_DEFAULT_LOCALE=enDatabase Setup
StartFast Pro uses PostgreSQL with Drizzle ORM. We recommend Neon for serverless PostgreSQL.
- 1.Create a PostgreSQL database (local or Neon)
- 2.Set
DATABASE_URLin your.env.local - 3.Run
npm run db:pushto push the schema to the database - 4.Use
npm run db:studioto view/edit data with Drizzle Studio - 5.Use
npm run db:generateto generate migrations
Schema: The database schema is defined in src/db/schema.ts using Drizzle's TypeScript-first approach. The DB client is exported from src/db/index.ts.
Authentication
StartFast Pro uses Better Auth with Drizzle adapter for authentication. Supports email/password and social OAuth.
- 1.Set
BETTER_AUTH_SECRET(at least 32 characters) - 2.Set
BETTER_AUTH_URLto your app URL - 3.(Optional) Configure Google OAuth:
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET - 4.(Optional) Configure GitHub OAuth:
GITHUB_CLIENT_IDandGITHUB_CLIENT_SECRET
Tip: Auth config is in src/lib/auth.ts (server) and src/lib/auth-client.ts (client). Sessions expire after 7 days by default.
Stripe Payments
StartFast Pro supports Stripe subscriptions with webhook handling.
- 1.Get your API keys from Stripe Dashboard → API Keys
- 2.Set
STRIPE_SECRET_KEY,NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY - 3.Create a webhook endpoint at
https://your-domain.com/api/webhook/stripe - 4.Copy the webhook signing secret to
STRIPE_WEBHOOK_SECRET
Tip: For local testing, use stripe listen --forward-to localhost:3000/api/webhook/stripe
Email Configuration
StartFast Pro uses Resend for transactional emails.
- 1.Create a Resend account
- 2.Get your API key and set
RESEND_API_KEY - 3.Set
EMAIL_FROMto your verified sender address
RESEND_API_KEY=re_xxxxx
EMAIL_FROM=onboarding@yourdomain.comInternationalization
StartFast Pro includes multi-language support via next-intl with 7 built-in languages.
- • English (en)
- • Chinese (zh)
- • Japanese (ja)
- • Korean (ko)
- • German (de)
- • French (fr)
- • Spanish (es)
Translation files are located in src/i18n/messages/. Set the default locale with:
NEXT_PUBLIC_DEFAULT_LOCALE=enAnalytics
StartFast Pro integrates with PostHog for product analytics. Pre-built event trackers are included for sign-ups, subscriptions, team actions, and more.
- 1.Create a PostHog account
- 2.Set
NEXT_PUBLIC_POSTHOG_KEYandNEXT_PUBLIC_POSTHOG_HOST
Tip: Analytics helpers are in src/lib/analytics.ts. Use analytics.signUp(), analytics.subscriptionStarted(), etc.
Teams & Roles
StartFast Pro includes a full organization and role-based access control (RBAC) system.
Roles
- • Owner — Full access. Can transfer ownership.
- • Admin — Manage members, settings, and most resources.
- • Member — Create and edit content. Limited settings access.
- • Viewer — Read-only access.
Tip: Permissions are defined in src/lib/permissions.ts. Use hasPermission(role, permission) to check access.
Deployment
Deploy to Vercel in minutes:
- 1.Push your code to GitHub
- 2.Import the repo on Vercel
- 3.Add all environment variables
- 4.Deploy!
Important: After deploying, update your Stripe webhook URL to your production domain.
Support
Need help? Reach out to us:
- • Email: support@startfast.dev
- • GitHub: @Harries
- • Twitter: @HarriesBLOG