Vextalflow Logo
Documentation

Next.js SaaS Starter Template

A comprehensive guide to using and customizing this SaaS starter template to build your own subscription-based web application.

Installation

To get started with this SaaS template, follow these simple steps:

git clone https://github.com/yourusername/saas-starter.git
cd saas-starter
npm install
npm run dev

Environment Setup

Create a .env.local file in the root of your project with the following variables:

NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key

Authentication Setup

This template uses Supabase for authentication. To configure authentication:

  1. Sign up for a Supabase account at supabase.com
  2. Create a new project and get your API keys
  3. Enable Email and Password sign-in in the Authentication settings
  4. Set up the email templates for verification and password reset
  5. Configure OAuth providers (Google, GitHub, etc.) if needed

Stripe Integration

To set up Stripe for subscription payments:

  1. Create a Stripe account at stripe.com
  2. Create products and price plans in your Stripe dashboard
  3. Copy your API keys and add them to your .env.local file
  4. Set up Stripe webhooks to notify your application of subscription events

Need more detailed information? Check out our comprehensive guides.

View Developer Guides