Skip to content

AliasAhshan/nextjs-ai-shorts-generator

Repository files navigation

AI Shorts Generator (Refactored in TypeScript)

This is a full-stack AI-powered Shorts Video Generator built with Next.js, TypeScript, and a suite of modern tools. This project has been completely refactored into TypeScript and significantly enhanced with additional features and integrations from the original YouTube creation found in the Acknowledgements section!

Features

  • User Authentication with Clerk
  • Prompt-to-Video Generation using:
    • Google Gemini API for generating scripts from prompts
    • Replicate API for AI-generated images
    • Remotion for rendering dynamic short videos
  • Captions + Audio Sync using [AssemblyAI]
  • Cloud Storage via Firebase (for storing images and audio files)
  • Database powered by Neon and Drizzle ORM
  • Fully written in TypeScript for better maintainability and type safety

Tech Stack

Area Tech
Frontend Next.js (App Router) + Tailwind CSS
Backend API Routes with TypeScript
Auth Clerk
AI Text Generation Google Gemini
AI Image Generation Replicate
Video Rendering Remotion
Storage Firebase (Images & Audio)
Database Neon + Drizzle ORM

How It Works

  1. User logs in via Clerk.
  2. User enters dashboard, has the option to create a new short.
  3. Prompt is entered, Gemini generates a short script.
  4. The script is:
    • Converted to audio (via Google TTS).
    • Sent to Replicate to generate corresponding images.
  5. Images + audio + captions are combined using Remotion to create a video.
  6. Final video assets are stored and downloadable.

Acknowledgements

This project was inspired by and built upon the work of several tools, platforms, and creators.

  • TubeGuruji — For the original AI Shorts Generator tutorial that sparked this project.
  • Google Gemini — For generating intelligent and creative scripts from user prompts.
  • Replicate — For enabling powerful AI image generation capabilities.
  • Remotion — For providing a robust and flexible framework to generate dynamic videos programmatically.
  • Clerk — For seamless and secure user authentication.
  • Firebase — For easy storage and hosting of media assets.
  • Drizzle ORM — For its lightweight and type-safe database querying in TypeScript.
  • Neon — For hosting the PostgreSQL database with serverless scalability.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published