Skip to content
SaaS Templates Tailwind CSS 4 Next.jsReactTypeScriptStripe

Tailwind CSS SaaS Starter Kit with AI Integration - AIStarterKit

A full‑stack Next.js and Tailwind CSS template for building AI‑driven SaaS applications. Includes authentication, Stripe, dashboards and AI APIs.

By AIStarterKit aistarterkit/ai-saas-starter-kit-nextjs 46 stars

Introduction

AIStarterKit is an open‑source starter template for building AI‑driven SaaS applications with Next.js 16 and Tailwind CSS v4. It includes ready‑made pages such as authentication, dashboard, pricing and blog, and integrates Stripe, NextAuth, Drizzle ORM and several AI APIs (OpenAI, AI SDK). The project is licensed under the MIT License.

What this project offers

  • A full‑stack Next.js application ready for production.
  • Tailwind CSS styling with dark‑mode support.
  • Integrated AI features (text, image, code, video and email generation).
  • Payment handling through Stripe.
  • Authentication with NextAuth.
  • Database utilities via Drizzle ORM.
  • Example SaaS pages (dashboard, pricing, blog, error pages).

Main features

  • AI text, image, code, video and email generation.
  • Stripe payment integration.
  • NextAuth authentication flow.
  • Pre‑built dashboard and other SaaS pages.
  • Dark‑mode UI built with Tailwind CSS.

Technology stack

  • Framework: Next.js 16.4.6 (App Router)
  • Styling: Tailwind CSS v4
  • Language: TypeScript 5, React 19
  • AI SDK: @ai-sdk/openai, @ai-sdk/react, ai
  • Authentication: NextAuth 5 (beta)
  • Payments: Stripe (CLI helper script included)
  • Database: Drizzle ORM with PostgreSQL (pg)

Requirements

  • Node.js 18 or newer
  • npm (the project uses npm lockfile)

Installation

  1. Download the source – obtain the ZIP file from the release page and extract it to a folder, e.g. ai-saas-starter-kit.
  2. Open a terminal in the extracted folder.
cd path/to/ai-saas-starter-kit
  1. Install dependencies
npm install
  1. Create environment file – copy the example file and edit the variables for your environment.
cp .env.example .env
# edit .env with your editor
  1. Run the development server (optional, to verify the setup)
npm run dev

The app will be available at http://localhost:3000.

  1. Build the production version
npm run build

This runs next build and creates an optimized output in the .next directory.

  1. Start the production server
npm start

The server serves the built files from .next on port 3000 by default.

Additional scripts

  • npm run lint – runs ESLint.
  • npm run db:push – pushes Drizzle ORM schema to the database.
  • npm run db:generate – generates Drizzle client code.
  • npm run db:migrate – runs database migrations.
  • npm run stripe:listen – starts Stripe webhook listener (stripe listen --forward-to localhost:3000/api/webhooks/stripe).

Configuration

  • Environment variables are defined in .env. Typical variables include database connection strings, Stripe secret keys, and OpenAI API keys.
  • Tailwind configuration is in tailwind.config.cjs (generated by the Tailwind package).
  • Next.js settings are in next.config.ts, where remote image patterns are declared.

Customizing the project

  • Styling – edit Tailwind classes in any component under src/components or adjust the Tailwind config.
  • Pages – add or modify routes in src/app. The App Router uses file‑system routing.
  • AI integrations – the AI helper functions live in src/lib/ai; replace or extend them to call other models.
  • Database – schema files are under src/lib/drizzle; run the provided Drizzle scripts after changes.

Project structure

LICENSE
README.md
ai-starter-kit.png
eslint.config.mjs
next.config.ts
package-lock.json
package.json
postcss.config.mjs
public/
  images/...
src/
  app/
    api/
    layout.tsx
    not-found.tsx
    providers/
    globals.css
    (site)/
    (generator)/
  assets/
    homepage/
    pricing/
    stars.tsx
  components/
    copy-to-clipboard.tsx
    generator/
    gradient-blob.tsx
    layout/
    sections/
    ui/
  context/
    right-sidebar.ts
  hooks/
    use-click-outside.ts
  icons/
    icons.tsx
  lib/
    ai/
    utils.ts
    zod/
tsconfig.json

Tips

  • Run npm run lint frequently to keep code quality high.
  • Use the stripe:listen script while developing payment flows to capture webhook events locally.
  • When changing the database schema, run npm run db:push then npm run db:migrate to keep the database in sync.
  • The project supports dark mode out of the box; toggle it via the next-themes provider in src/app/providers.

License and attribution

The project is released under the MIT License. See the LICENSE file for full terms.

Original repository: https://github.com/aistarterkit/ai-saas-starter-kit-nextjs

When redistributing, keep the license file and credit the original author as required by the MIT license.