Getting Started

SaaSForge AI is a Next.js app with chat, uploads, pgvector search, Stripe subscriptions, and Supabase auth. Follow the steps below until you can send a prompt against a local database.

Quick Start

  1. Clone and Install

    git clone <your-repo-url>
    cd saasforge-ai
    pnpm install
    
  2. Set Up Environment Variables

    • Copy .env.local.example to .env.local
    • Follow the Configuration Guide to obtain all required API keys
  3. Set Up Database

    • Run the SQL schema from src/db/schema.sql in your Supabase SQL editor
    • Create a storage bucket named uploads in Supabase Storage
    • See Database Guide for details
  4. Start Development Server

    pnpm dev
    
  5. Run the built-in setup checklist (recommended)

    • Visit /dashboard/setup to validate your environment variables and database schema

Features

  • AI Chat with multiple models (GPT-4o, Claude 3.5 Sonnet, etc.)
  • Document Upload and RAG - Upload PDFs and ask questions based on your documents
  • Credit-Based Economy - Token-based monetization system
  • Stripe Integration - Subscription and one-time payment support
  • Multi-Model Support - Switch between AI models based on your tier
  • Row Level Security - Complete data isolation with RLS policies

Documentation

GuideDescription
ArchitectureSystem design and code structure
ConfigurationEnvironment variables setup
DatabaseSchema, RLS policies, migrations
RAG PipelineDocument upload and retrieval
Credit SystemHow credits and billing work
API ReferenceAll API endpoints
CustomizationModifying configs and adding features
Stripe IntegrationPayment setup and webhooks
DeploymentProduction deployment guide
SEO & MetadataSearch + social sharing configuration
White‑Label ChecklistRename, brand, and package the boilerplate
TroubleshootingCommon issues and solutions

Next Steps

  1. Configure your environment variables
  2. Set up your Supabase database
  3. Configure Stripe products and webhooks
  4. Customize AI models and pricing
  5. Deploy to production