Documentation

StartFast

StartFast is a production-ready Next.js boilerplate that ships the boring parts for you: payments, email, database, and a clean UI system.

This documentation will help you get started quickly and customize StartFast for your SaaS product.

What You Get

  • Next.js 14 App Router with server components by default
  • Stripe Payments with checkout sessions and webhooks
  • PostgreSQL Database with Prisma ORM
  • Email Delivery via SMTP (works with any provider)
  • GitHub Integration for automatic repo invitations
  • Admin Dashboard for user and order management
  • SEO Optimized with sitemap, robots.txt, and meta tags
  • TypeScript end-to-end type safety

Quick Start

1Clone the repository
git clone https://github.com/Harries/startfast-pro.git my-saas
2Install dependencies
cd my-saas && npm install
3Configure environment
cp .env.example .env
4Set up database
npx prisma db push
5Start development
npm run dev

Open http://localhost:3000

Environment Variables

Copy .env.example to .env and configure:

# App
NEXT_PUBLIC_APP_URL=https://your-domain.com

# Database (Neon PostgreSQL)
DATABASE_URL=postgresql://...
DATABASE_URL_UNPOOLED=postgresql://...

# Stripe
STRIPE_SECRET_KEY=sk_live_xxx
STRIPE_WEBHOOK_SECRET=whsec_xxx
STRIPE_PRICE_ID=price_xxx

# Email (SMTP)
SMTP_HOST=smtp.example.com
SMTP_PORT=465
SMTP_USER=your-email
SMTP_PASS=your-password
EMAIL_FROM=StartFast <noreply@example.com>

# GitHub (for repo invitations)
GITHUB_TOKEN=ghp_xxx
GITHUB_OWNER=your-username
GITHUB_REPO=your-private-repo

# Admin Dashboard
ADMIN_PASSWORD=your-secure-password

Database Setup

StartFast uses PostgreSQL with Prisma ORM. We recommend Neon for serverless PostgreSQL.

  1. 1.Create a Neon account and database
  2. 2.Copy the connection strings to your .env
  3. 3.Run npx prisma db push to create tables
  4. 4.Use npx prisma studio to view/edit data

Stripe Payments

  1. 1.
    Get your API keys from Stripe Dashboard → API Keys
  2. 2.
    Create a product and copy the Price ID (starts with price_)
  3. 3.
    Create a webhook endpoint at https://your-domain.com/api/webhook/stripe
  4. 4.Select event: checkout.session.completed
  5. 5.Copy the webhook signing secret to your env

Tip: For local testing, use stripe listen --forward-to localhost:3000/api/webhook/stripe

Email Configuration

StartFast uses nodemailer with SMTP. Works with any email provider:

  • • Gmail (with App Password)
  • • Amazon SES
  • • SendGrid
  • • Mailgun
  • • Any SMTP server
SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
SMTP_SECURE=true
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-password
EMAIL_FROM=Your App <noreply@yourapp.com>

GitHub Integration

Automatically invite paying customers to your private repository:

  1. 1.
    Create a Personal Access Token at GitHub Settings → Tokens
  2. 2.Grant repo permission
  3. 3.Set GITHUB_OWNER to your username or org
  4. 4.Set GITHUB_REPO to your private repo name

Deployment

Deploy to Vercel in minutes:

  1. 1.Push your code to GitHub
  2. 2.Import the repo on Vercel
  3. 3.Add all environment variables
  4. 4.Deploy!

Important: After deploying, update your Stripe webhook URL to your production domain.

Support

Need help? Reach out to us: