Skip to content

jhuboo/GenAI-SaaS-Platform

Repository files navigation

Build a GenAI SaaS Platform with Next.js 13, React, Tailwind, Prisma, and Stripe

Next.js React TailwindCSS Prisma Stripe

Features

  • Tailwind design
  • Tailwind animations and effects
  • Full responsiveness
  • Clerk Authentication (Email, Google, 9+ Social Logins)
  • Client form validation and handling using react-hook-form
  • Server error handling using react-toast
  • Image Generation Tool (Open AI)
  • Video Generation Tool (Replicate AI)
  • Conversation Generation Tool (Open AI)
  • Music Generation Tool (Replicate AI)
  • Page loading state
  • Stripe monthly subscription
  • Free tier with API limiting
  • How to write POST, DELETE, and GET routes in route handlers (app/api)
  • How to fetch data in server react components by directly accessing database (WITHOUT API! like Magic!)
  • How to handle relations between Server and Child components!
  • How to reuse layouts
  • Folder structure in Next 13 App Router

Cloning the Repository

To get started with the project, clone the repository using the following command:

git clone https://github.com/jhuboo/GenAI-SaaS-Platform.git

Install Packages

Navigate to the project directory and install the necessary packages:

npm install

Setup Environment Variables

Create a .env file in the root directory and add the following environment variables:

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=

NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/dashboard
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/dashboard

OPENAI_API_KEY=
REPLICATE_API_TOKEN=

DATABASE_URL=

STRIPE_API_KEY=
STRIPE_WEBHOOK_SECRET=

NEXT_PUBLIC_APP_URL="http://localhost:3000"

Setup Prisma

To set up the database, push the Prisma schema to your MySQL database (you can use PlanetScale or any other MySQL database):

npx prisma db push

Start the App

Run the development server with the following command:

npm run dev

Available Commands

You can run the following commands with npm npm run [command]:

Command Description
dev Starts a development instance of the app

Images of the App

  • Demo 1
  • Demo 2
  • Demo 3

About

GenAI SaaS Platform: Unleash Your Creativity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published