This is a repository based on this tutorial video.
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
A standalone Python helper that auto-writes researched, in-depth SEO blog posts
into this repo (web-search-backed, build-safe TSX + public/blog_posts.json).
It is not part of the Next.js app — it never runs at request time; you run
it yourself.
➡️ Full docs & commands: scripts/blog_generator/README.md
cd scripts/blog_generator && pip install -r requirements.txt
python3 generator.py loop # the intended mode: ~3 posts/wk on a human rhythm
python3 generator.py once # or just one post nowNode version 18.x.x
git clone https://github.com/AntonioErdeljac/next13-ai-saas.gitnpm icp .env-sample .envAdd Prisma
npm i -D prismaAdd MySQL Database --> via PlanetScale DB: https://app.planetscale.com/your_github_account
npx prisma db push
if things are busted and prisma studio isn't working..
npx prisma migrate reset && npx prisma generate && npx prisma db pushnpm run devnpx prisma studio # runs at http://localhost:5555/templating + styling: https://docx.js.org/#/usage/styling-with-js?id=examples
(Test environment)
- create Stripe account
- toggle on 'Test Mode'
- Dashboard --> Create payment --> Payment link used to redirect users to payment link when they try to download
- add STRIPE_API_KEY and STRIPE_SECRET_KEY to .env https://docs.stripe.com/stripe-cli
- get webhook secret for Stripe CLI ('whsec_...'))
$ stripe login # then follow the link it generates
$ stripe listen --forward-to localhost:3000/api/webhook # generates WEBHOOK_SECRET
4:25:30 discussing webhooks setup for dev and prod
https://dashboard.stripe.com/test/webhooks/create?endpoint_location=local
- add prod URL to this interface
https://app.crisp.chat/initiate/signup/?locale=en
(has to go in /components/crisp-chat.tsx)
<script type="text/javascript">window.$crisp=[];window.CRISP_WEBSITE_ID="48750f03-61e3-42f0-b0db-b100d21cf9f7";(function(){d=document;s=d.createElement("script");s.src="https://client.crisp.chat/l.js";s.async=1;d.getElementsByTagName("head")[0].appendChild(s);})();</script>
- PlanetScale DB is running
- have
npm run devrunning - have Stripe running
| command | description |
|---|---|
npm run dev |
Starts a development instance of the app |
npx prisma studio |
Opens Prisma database editor |
python3 scripts/blog_generator/generator.py once |
Generate one blog post (docs) |
python3 scripts/blog_generator/generator.py loop |
Auto-publish ~3 posts/wk on a human rhythm (docs) |