LogoAI Video Translator Docs
LogoAI Video Translator Docs
HomepageAI Video Translator Guide
X (Twitter)

AI Video Translator Guide

A complete guide to AI Video Translator — the AI-powered video translation platform.

What is AI Video Translator?

AI Video Translator is an AI-powered video translation platform built with Next.js, designed to help you translate video content into multiple languages quickly and accurately. It comes with authentication, payments, i18n, and a beautiful UI — all pre-configured and ready to go.

Tech Stack

  • Framework: Next.js App Router with TypeScript
  • Auth: Better Auth (GitHub + Google OAuth, email/password)
  • Database: PostgreSQL with Drizzle ORM
  • Payments: Stripe (subscriptions, one-time purchases, credit packages)
  • UI: Tailwind CSS + Radix UI + Lucide icons
  • i18n: next-intl (English + Chinese)
  • Email: Resend with React Email templates
  • AI: KIE API for video translation

Quick Start

Prerequisites

  • Node.js 18+
  • pnpm (recommended)
  • PostgreSQL database

Installation

git clone https://github.com/your-org/ai-video-translator.git
cd ai-video-translator
pnpm install

Environment Setup

Copy the example environment file and fill in your values:

cp env.example .env.local

Key environment variables:

# Database
DATABASE_URL=postgresql://user:password@localhost:5432/ai-video-translator

# Auth
BETTER_AUTH_SECRET=your-secret-key
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret

# Stripe
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...

# Email
RESEND_API_KEY=re_...

# AI
KIE_API_KEY=your-kie-api-key

Database Setup

Generate and run migrations:

pnpm db:generate
pnpm db:migrate

Start Development

pnpm dev

Visit http://localhost:3000 to see your app.

Project Structure

src/
├── app/                  # Next.js App Router pages
│   ├── api/              # API routes (auth, webhooks, etc.)
│   └── [locale]/         # Localized pages
├── components/           # React components
├── config/               # App configuration
├── db/                   # Database schema and connection
├── lib/                  # Utilities and shared code
├── credits/              # Credit system logic
├── payment/              # Stripe integration
├── mail/                 # Email templates
└── i18n/                 # Internationalization config

Key Features

AI Video Translation

Powered by KIE API, AI Video Translator converts your video content into multiple languages with high accuracy and natural-sounding output.

Authentication

Built with Better Auth, supporting:

  • GitHub and Google OAuth
  • Email/password credentials
  • Account linking
  • Session management with caching

Payments (Stripe)

Supports multiple payment models:

  • Subscriptions: Monthly and yearly plans (Free, Pro)
  • One-time purchases: Lifetime access, credit packages
  • Credits: Usage-based billing with monthly refresh

Internationalization

Built-in support for multiple languages:

  • As-needed prefix strategy (default locale omitted from URL)
  • Translation files in messages/en.json and messages/zh.json
  • Localized email templates

Credit System

Flexible credit management:

  • Monthly credit refresh for subscribers
  • Registration bonus credits
  • Credit packages (Basic, Standard, Premium)
  • Usage tracking with transaction history

Common Tasks

Adding a New Language

  1. Add locale config in src/config/website.tsx
  2. Create translation file in messages/{locale}.json
  3. Update i18n routing in src/i18n/routing.ts

Deploying to Production

pnpm build

The app is ready for deployment on Vercel, Docker, or any Node.js hosting platform.

Learn More

  • Visit aivideotranslator.net for more information
  • Contact us at [email protected]

Table of Contents

What is AI Video Translator?
Tech Stack
Quick Start
Prerequisites
Installation
Environment Setup
Database Setup
Start Development
Project Structure
Key Features
AI Video Translation
Authentication
Payments (Stripe)
Internationalization
Credit System
Common Tasks
Adding a New Language
Deploying to Production
Learn More