Transform your scripts into captivating videos in minutes with our AI-powered Video Generator App. This tool is designed to streamline video production, offering high-quality outputs with minimal input and effort.
Live Site: ai-video.jackhui.com.au
- Fast Video Creation: Generate videos quickly, turning scripts into finished products in minutes.
- User-Friendly Interface: Our straightforward UI makes it easy for anyone to create videos, with powerful AI assistance.
- High-Quality Video Content: Access over 3 million video clips to ensure professional-grade video quality.
- Crystal Clear Narration: Choose between using your own voice or high-quality AI-generated narration.
- Cloud-Based: Enjoy the flexibility of a cloud-based application that works seamlessly across all computers.
- OpenAI Sora Integration: Generate AI videos using OpenAI Sora video model.
- Framework: Next.js 14
- UI: NextUI + Tailwind CSS
- Testing: Vitest + React Testing Library
- CI/CD: GitHub Actions → Docker → Azure VM
- Auth: Django REST Framework + OAuth (Google, GitHub, Microsoft)
- Node.js 20+
- npm or pnpm
-
Clone the Repository:
git clone https://github.com/jack-jackhui/ai-video-generator.git cd ai-video-generator -
Install Dependencies:
npm install
-
Set up Environment Variables:
cp .env.example .env.local # Edit .env.local with your values -
Run Development Server:
npm run dev
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm test |
Run tests in watch mode |
npm run test:ci |
Run tests once (CI) |
This project uses automated CI/CD:
- Push to main triggers GitHub Actions
- CI runs lint, tests, and build
- Docker Build creates image and pushes to GHCR
- Deploy pulls latest image on Azure VM and restarts container
Set these in GitHub repository settings → Secrets:
| Secret | Description |
|---|---|
AZURE_VM_HOST |
Azure VM IP address |
AZURE_VM_USER |
SSH username |
AZURE_VM_SSH_KEY |
Private SSH key |
NEXT_PUBLIC_MICROSOFT_CLIENT_ID |
Microsoft OAuth client ID |
NEXT_PUBLIC_MICROSOFT_REDIRECT_URL |
Microsoft OAuth redirect URL |
NEXT_PUBLIC_GITHUB_CLIENT_ID |
GitHub OAuth client ID |
NEXT_PUBLIC_GITHUB_REDIRECT_URL |
GitHub OAuth redirect URL |
src/
├── app/
│ ├── api/ # API clients (Auth, Video, ImageGen)
│ ├── components/ # React components
│ │ ├── auth/ # Auth modal, login form, social buttons
│ │ └── layout/ # Shared layouts
│ ├── context/ # React contexts (Auth)
│ ├── hooks/ # Custom hooks (OAuth, polling)
│ ├── dashboard/ # Dashboard page
│ ├── videoGen/ # Video generator page
│ ├── faceSwap/ # Face swap page
│ ├── imageGen/ # Image generation page
│ └── photoFaceSwap/ # Photo face swap page
├── lib/
│ ├── auth/ # Token storage utilities
│ └── constants/ # App constants
└── __tests__/ # Test files
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
npm test - Submit a pull request
See LICENSE for details.