
Build an AI powered short video generator SaaS with Next.js and TypeScript, covering setup, authentication, video creation, Remotion visuals, and a credit system integrated with PayPal.
Showcases an ai powered short video generator saas that starts users with five credits, generates scripts, audio, captions, and ai images from prompts, and builds videos in a feature-rich dashboard.
Set up a brand new Next.js project with TypeScript, ESLint, app router, and turbo pack, then run npm run dev to view the app locally.
Initialize your project with sets, install a button component, and apply tailwind utilities to center and style the UI using shadcn/ui.
Import Audio Wide from Google Fonts via Next Font and apply it in the css font-family to match the AI powered video generator theme.
Configure navigation for the ai short video generator app by installing a menu bar, building a top nav tsx, and integrating it into the shared layout to power dropdowns.
Learn how to implement a logo in a NextJs TypeScript dashboard using a placeholder or icon from Logo ipsum or Flat Icon, place logo.png in public.
Enable dark mode for this ai short video generator saas by installing the next themes grid provider and wrapping your layout, with a simple toggle to switch themes.
Implement Clerk authentication in a Next.js app by configuring keys in env files, wrapping with the Clerk provider, protecting dashboard routes with middleware, and surfacing sign-in and sign-out controls.
Learn to build and wire navigation links for a protected dashboard in a Next.js app, routing to dashboard and create video pages, with base routing and simple styling.
Create a video context to manage script, images, audio, and captions as a global state, enabling client components to access and update AI-generated video assets via a useVideo hook.
Generate a video script using Google's Gemini API in Google AI Studio, set up API keys, and build a node.js prompt workflow that outputs JSON with image prompts and text.
Explore building a Next.js TypeScript AI short video generator by implementing a create video page with a Gen AI call, scene prompts, and clean JSON responses.
Define story options and image styles on the create video page using constants. Support preset and custom prompts, and organize data in a constants file for Next.js TypeScript.
Set up a global context and initial state to manage video creation options, including selected story, style, and custom prompts, with handlers to update state and submit data.
Implement story options on the video create page with custom prompt support, style options, and storage handling. Show a live preview in a responsive two-column grid for generated videos.
Learn to design a responsive style selector for an AI short video generator, displaying image thumbnails in a grid with hover effects and a selected style border.
Select style images to power ai-driven video creation in a Next.js TypeScript SaaS. Create prompts, generate scripts, images, captions, and a live preview, then save videos to the database.
Build a video submission workflow in a Next.js TypeScript app: generate a 32-second script with Gemini, create images with replicate ai, and generate captions with assemblyai.
Build a loading modal component in a Next.js TypeScript app, showing a loading GIF and a dynamic message controlled by context during video creation.
Hardcode a fixed json response to simulate repeated api calls during development, then return this static response for testing before implementing image, text-to-speech, and captions.
Generate five ai-powered images per video with Replicate AI and upload them to Cloudinary for permanent ownership. Use text to speech to turn the content into video-ready narration.
set up cloudinary and replicate integration to generate videos and save them to cloudinary, using server-side access to env vars and a dedicated replicate.ts for configuration.
Implement a server action that uses Replicate to generate an image, streams the data, uploads the buffer to Cloudinary, and returns the Cloudinary URL after saving to the database.
Generate images for each video scene from per-scene prompts using a generate image function, then leverage Promise.all to handle results and upload the images to Cloudinary.
Organize a video generation workflow by modularizing tasks into separate functions for script generation, image creation, and text-to-speech, using mock data for development.
Set up Google text-to-speech in a Next.js TypeScript project by enabling the API, configuring billing, and adding your API key to the env file.
Learn to generate speech from text with Google text-to-speech, add a short pause via SSML, encode as mp3, and upload the audio to Cloudinary for a secure URL.
Explore text to speech workflows in a Next.js TypeScript SaaS, generating audio files from video scripts by mapping scene content, joining text, and returning audio URLs.
Refine an mp3 audio generation workflow by generating a video script, producing an audio file, and handling server responses to deliver a usable audio url.
Integrate assembly ai to generate captions from audio for videos, using google text to speech and cloudinary, and manage api keys via env for testing.
Generate captions from audio using Assembly AI by wiring an API key, transcribing the audio URL, and returning timed caption words for video generation.
Learn to build a split video page for an ai video generator in a nextjs typescript app, using images, audio, and captions with Remotion, and create a responsive two-column layout.
Set up Remotion from scratch by creating a Remotion folder with Remotion-video.ts and root.ts, configuring a Remotion video route and a Remotion player to render a 1280x720 composition at 30 fps.
Pass images and captions into a remotion-based video builder, compute total duration from caption timings, then render image sequences with synchronized audio for a Next.js TypeScript SaaS.
Learn how to integrate audio in a NextJs TypeScript ai short video generator using Remotion's audio component, with context-sourced audio and mock functions.
Explore building a caption display for a Remotion video, calculating current time from frame and frame rate to render the active caption text between start and end times.
Enhance image sequencing with a fade transition by calculating start and end frames, using interpolate to drive opacity, and applying a smooth fade-in and fade-out between images.
The lecture demonstrates adding a zoom-in image transition by interpolating a scale from 1 to 1.8 and back, applied to the image transform to create motion.
Switch away from mock functions to enable the video pipeline: generate script, images, and audio, then save captions and the video to the database with error handling and loading states.
Connect to mongodb using mongoose by signing up at atlas for connection string, store it in an env file, and create a db.ts utility that ensures database connection before actions.
Create a video model with mongoose in a models folder, including user email, username, video script (scenes and image prompts), images, audio, and captions, with timestamps, and export the model.
Save generated videos to MongoDB via a server action that retrieves the current user and stores script, captions, audio, URL, images, plus the user email and username.
Learn to save videos to the database, fetch the current user's videos from MongoDB, and display them in a dashboard grid with a dedicated video player.
Implement a dashboard video player by reusing a remotion-like component, pass video data via props and context, and render images, audio, and captions in a responsive grid.
Add a clickable create card on the dashboard that links to the create video page, using a responsive grid with 1 column, 2 on small, and 3 on medium.
Implement a credit-based system for the ai short video generator saas, giving new users five starter credits and deducting per-video credits with PayPal or Stripe purchase options.
Set up PayPal to enable the credit system by creating a sandbox app, obtaining the client ID, and wiring it to an env file to enable the PayPal provider.
Create a reusable loader component to display a spinning icon while the buy credit (PayPal) flow renders, using a React icon library, centered layout, and shadows for the PayPal integration.
Implement a credits page with PayPal buttons and three purchase options (10 for $5, 20 for $10, 50 for $20), including loading states, toasts, and error handling, plus card checkout.
Implement a PayPal payment flow for the AI short video generator, offering credit options, creating aud purchase units, and saving paid amount and credits to the database.
Unlock the power of AI to generate short videos that captivate audiences on platforms like TikTok and YouTube Shorts! In this comprehensive course, "AI Short Video Generator with NextJs & TypeScript," you'll learn to build a feature-rich app from scratch using cutting-edge tools and AI services. Guided by Ryan Dhungel, this course takes you through every detail, from setup to deployment, with practical examples and reusable code.
What You'll Learn in This Course
Build a Full-Stack AI Video Generator App
Set up a responsive and user-friendly app using NextJs, TypeScript, and ShadcnUI.
Use Google Generative AI to create scripts and generate engaging story ideas.
Integrate AI image generation and upload features using server actions.
Add realistic text-to-speech (TTS) functionality and generate accurate captions.
Seamlessly combine AI-generated images, audio, and captions into polished short videos using RemotionJs.
Monetize Your App with Credits System
Implement a credits system for generating videos.
Set up PayPal integration to buy credits securely.
Track user credits and spending with server actions and database management.
Create a Stunning User Experience
Design an elegant landing page with animated titles, parallax images, and pricing cards.
Add a dashboard to display user-generated videos and manage accounts.
Include sections like FAQs, reviews, and a call-to-action for maximum engagement.
Enhance Video Quality with Special Effects
Add smooth transitions, zoom-in effects, and moving effects to videos.
Ensure captions are perfectly synchronized and centered.
Optimize for high performance and minimal latency.
Why Choose This Course?
Step-by-Step Guidance: Follow detailed video lectures accompanied by PDF booklets for easy reference.
Practical Curriculum: Learn by building a fully functional AI video generator app.
Cutting-Edge Tools: Master NextJs, TypeScript, RemotionJs, and multiple AI services.
Monetization Focus: Implement a real-world credits system for SaaS profitability.
Reusable Codebase: Gain access to code that you can adapt for your own projects.
Who Is This Course For?
Developers interested in AI-powered video applications.
Entrepreneurs building SaaS products for social media or video marketing.
Anyone looking to monetize apps with subscription or credit-based systems.
Web developers seeking hands-on experience with NextJs and TypeScript.
Course Highlights
1: Setting Up Your App
Learn to use ShadcnUI for modern design.
Implement dark mode and responsive navigation.
Set up Google Fonts for branding consistency.
2: AI Integration
Use Google Generative AI for script generation.
Build user-friendly options for story styles and themes.
Integrate AI image generation and automate uploads.
3: Creating Videos with RemotionJs
Organize AI-generated assets into videos.
Add audio tracks and captions with precise timing.
Apply professional effects like zoom-ins and smooth transitions.
4: Monetization and User Management
Build a credits-based payment system with PayPal.
Automatically assign credits on user signup.
Track credit usage and update user balances in real time.
5: Launch and Optimize
Create a visually stunning landing page with pricing, FAQs, and reviews.
Deploy the app with a robust backend powered by NextJs server actions.
Extra Features
Includes downloadable PDF booklets for every video lecture.
Learn database management for storing videos, user data, and credit balances.
Build scalable apps ready for deployment to platforms like Vercel or DigitalOcean.
Why AI Short Video Generator Apps Matter
With the rise of short video platforms like TikTok, YouTube Shorts, and Instagram Reels, video content has become an essential marketing tool. This course equips you to create apps that help businesses and influencers generate engaging short videos effortlessly using AI.
Enroll Today!
Take your skills to the next level by mastering AI-powered video generation. By the end of this course, you’ll have a production-ready app and the confidence to build your own SaaS solutions.
Start learning now and turn your ideas into reality!