
Template details
AI SaaS Starter
Open-source Next.js AI SaaS boilerplate with Google OAuth, Stripe credit billing, Prisma, MuAPI AI engine, and webhook-backed async generation.
About this template
AI SaaS Starter is a free, open-source Next.js boilerplate for launching a credit-based generative AI SaaS with Google OAuth, Stripe billing, and the MuAPI AI engine. It gives you a complete starting point for image, video, and audio generation apps without writing the authentication, payment, or webhook infrastructure yourself.
What is AI SaaS Starter?
AI SaaS Starter is a production-ready, open-source boilerplate that scaffolds a complete AI SaaS application. The template takes your MuAPI API key and a JSON parameter schema as input, and produces a working web app with Google sign-in, Stripe credit top-ups, and asynchronous generation of media. It runs on Next.js with the App Router, React 19, Tailwind CSS v4, Prisma, and a Supabase Shared PostgreSQL pool, with NextAuth handling Google OAuth and Stripe Checkout handling payments.
Key Features
- Google Auth & Session Management — NextAuth-based Google OAuth sign-in with secure user registration, sign-in state checks, and session persistence.
- Credit Checkout System — Stripe Checkout integration with dynamic checkout redirection, transaction safety metadata, and automated webhook credit top-ups.
- Two-Tiered Prediction Delivery — Inline client polling for short image and audio tasks, plus a webhook handler for longer video predictions.
- Local Webhook Bypass — Automatically polls active generations on
/api/creationsload to recover state when webhooks fail during local development. - Dynamic Parameter Designer — The Launch New App dashboard accepts a JSON schema and maps keys to form fields: image, video, and audio uploads, dropdowns, toggles, numbers, and textareas. Upload types are auto-detected by key names or file extensions (e.g.,
.png,.mp4,.mp3), and max upload limits can be set from 1 to 10 per parameter. - Premium Dark Theme — A fully responsive dark-mode workspace with sliding aspect ratio presets, pulsing badges, and guest warning banners.
- CORS-Safe Downloads — A server proxy at
/api/downloadlets users download generated images immediately without cross-origin browser restrictions. - Prisma + Supabase Schema Safety Workflow — Includes a documented
prisma db pull/prisma db pushlifecycle for safely adding models to a shared PostgreSQL database.
Who is it for?
- Indie hackers and solo founders — Launch a functional AI SaaS in minutes using the free template instead of paying for commercial boilerplates; the template already powers 20+ open-source AI SaaS apps.
- AI product engineers — Build custom image, video, or audio generators without writing auth, billing, or queuing code from scratch.
- Developers learning full-stack AI architecture — Study a real integration of Next.js, Prisma, Stripe webhooks, NextAuth, and an external generation API.
- Teams shipping virtual try-on or photo editor apps — Use the parameter designer to accept multiple image uploads with configurable limits and deliver results asynchronously.
What can you do with it?
- AI image generators: Accept single or multiple image uploads, generate variations through MuAPI, and return results via webhook or polling with max upload limits ranging from 1 to 10.
- AI video tools: Configure video upload fields (auto-detected from
.mp4,.webm,.mov) and run long-running generations with the webhook handler. - AI audio apps: Set audio upload fields (
.mp3,.wav,.m4a) to build credit-based music or voice tools. - AI writing or photo editing suites: Combine toggles, dropdowns, and textareas with image inputs to create interactive studio experiences that bill per credit.
How does AI SaaS Starter work?
Onboarding is a four-step process: clone the repo and run npm install, then sync the database with npx prisma db pull and npx prisma generate, configure the environment variables (Google OAuth, Stripe secrets, MuAPI key, database URLs), and run npm run dev. From the dashboard, you paste a JSON parameter schema into Launch New App, the system auto-detects field types, and the studio route renders the custom form. When a user generates, the app packages single inputs as a URL string and list inputs as an array of URLs, sends them to the MuAPI engine, and delivers the result through inline polling or a webhook.
Pros and cons
- Pros: Free and open-source; pre-built auth, billing, and async generation pipeline; dynamic parameter designer supports image, video, and audio uploads; CORS-safe download proxy; documented schema safety workflow.
- Cons: The default setup uses a shared Supabase PostgreSQL pool, so developers must follow the documented pull/push lifecycle carefully to avoid modifying or dropping tables belonging to other apps in that pool.
Alternatives
- ShipFast
- SaaSBoilerplate
- Gravity UI
- Bedrock
FAQ
Is AI SaaS Starter free?
Yes, the template is free and open-source, explicitly positioned as a free alternative to commercial Next.js SaaS boilerplates like ShipFast and Gravity UI. There is no stated pricing tier.
What does AI SaaS Starter include for billing?
It integrates Stripe Checkout with a prebuilt webhook configuration for automated credit additions. You provide your own Stripe secret key, webhook secret, and publishable key via environment variables.
Which database does AI SaaS Starter use?
It uses a Supabase Shared PostgreSQL pool with Prisma Client as the ORM. Because the pool is shared, the repository warns you to run npx prisma db pull before prisma db push and to strip unrelated models from your local schema after syncing.
How are AI generations delivered?
The template uses a two-tiered delivery: inline client polling for short tasks and a webhook handler for longer predictions. In local development, a bypass pattern polls active generations on creations load to recover state if webhooks fail.
What happens if I exceed a parameter's upload limit?
The studio sidebar enforces the configured maxInputs limit per parameter. You can adjust the limit per-parameter between 1 and 10 in the Launch Modal before the app is created.














