MCPcopy Index your code
hub / github.com/athrala/AI-SaaS-Content-Generation-Platform

github.com/athrala/AI-SaaS-Content-Generation-Platform @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
71 symbols 299 edges 68 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

A SaaS AI Platform with Next.js 13, React, Tailwind, Prisma, Stripe

Screenshot 2024-03-05 at 11 56 57 AM

This is a repository for Build a SaaS AI Platform with Next.js 13, React, Tailwind, 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

Prerequisites

Node version 18.x.x

Cloning the repository

git clone https://github.com/athrala/AI-SaaS-Content-Generation-Platform.git

Install packages

npm i

Setup .env file

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

Add MySQL Database (I used PlanetScale)

npx prisma db push

Start the app

npm run dev

Available commands

Running commands with npm npm run [command]

command description
dev Starts a development instance of the app

Feature demos

Screenshot 2024-03-05 at 11 57 29 AM

Screenshot 2024-03-05 at 11 57 50 AMScreenshot 2024-03-05 at 11 58 16 AM Screenshot 2024-03-05 at 11 59 17 AM Screenshot 2024-03-05 at 11 58 44 AM Screenshot 2024-03-05 at 11 58 32 AM

Extension points exported contracts — how you extend this code

MobileSidebarProps (Interface)
(no doc)
ai-saas/components/mobile-sidebar.tsx
useProModalStore (Interface)
(no doc)
ai-saas/hooks/use-pro-modal.tsx
FreeCounterProps (Interface)
(no doc)
ai-saas/components/free-counter.tsx
HeadingProps (Interface)
(no doc)
ai-saas/components/heading.tsx
SidebarProps (Interface)
(no doc)
ai-saas/components/sidebar.tsx
InputProps (Interface)
(no doc)
ai-saas/components/ui/input.tsx

Core symbols most depended-on inside this repo

cn
called by 50
ai-saas/lib/utils.ts
checkSubscription
called by 8
ai-saas/lib/subscription.ts
incrementApiLimit
called by 5
ai-saas/lib/api-limit.ts
checkApiLimit
called by 5
ai-saas/lib/api-limit.ts
useFormField
called by 4
ai-saas/components/ui/form.tsx
getApiLimitCount
called by 2
ai-saas/lib/api-limit.ts
absoluteUrl
called by 1
ai-saas/lib/utils.ts
LandingHero
called by 0
ai-saas/components/landing-hero.tsx

Shape

Function 61
Interface 10

Languages

TypeScript100%

Modules by API surface

ai-saas/components/ui/sheet.tsx4 symbols
ai-saas/lib/api-limit.ts3 symbols
ai-saas/components/ui/dialog.tsx3 symbols
ai-saas/lib/utils.ts2 symbols
ai-saas/components/ui/form.tsx2 symbols
ai-saas/components/ui/empty.tsx2 symbols
ai-saas/components/ui/badge.tsx2 symbols
ai-saas/components/subscription-button.tsx2 symbols
ai-saas/components/sidebar.tsx2 symbols
ai-saas/components/pro-modal.tsx2 symbols
ai-saas/components/mobile-sidebar.tsx2 symbols
ai-saas/components/heading.tsx2 symbols

For agents

$ claude mcp add AI-SaaS-Content-Generation-Platform \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact