mirror of
				https://github.com/Wan-Video/Wan2.1.git
				synced 2025-11-04 06:15:17 +00:00 
			
		
		
		
	This commit adds a production-ready Progressive Web App for AI-powered video generation using Wan2.1 models. Features: - Next.js 15 frontend with App Router and PWA support - FastAPI backend with Replicate integration - 50+ prompt templates across 7 categories - Supabase authentication and database - Credit system with usage tracking - Text-to-Video and Image-to-Video generation - Complete documentation (setup, deployment, contributing) Project Structure: - apps/web: Next.js frontend with shadcn/ui components - apps/api: FastAPI backend with GPU processing via Replicate - packages/db: Database schema and migrations for Supabase Tech Stack: - Frontend: Next.js 15, shadcn/ui, Tailwind, Zustand, React Hook Form, Zod - Backend: FastAPI, Replicate, Supabase - Database: Supabase (Postgres) with RLS - Infrastructure: Turborepo monorepo, Vercel/Modal deployment Documentation: - README.md: Project overview and features - SETUP.md: Complete setup guide (5-minute quickstart) - DEPLOYMENT.md: Production deployment instructions - CONTRIBUTING.md: Contribution guidelines - PROJECT_SUMMARY.md: Comprehensive project documentation Ready for development and deployment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
		
			
				
	
	
		
			42 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
from pydantic import BaseModel, Field
 | 
						|
from typing import Optional, Literal
 | 
						|
from datetime import datetime
 | 
						|
 | 
						|
 | 
						|
class TextToVideoRequest(BaseModel):
 | 
						|
    prompt: str = Field(..., min_length=1, max_length=2000)
 | 
						|
    negative_prompt: Optional[str] = Field(None, max_length=2000)
 | 
						|
    model: Literal["t2v-14B", "t2v-1.3B"] = "t2v-14B"
 | 
						|
    resolution: Literal["480p", "720p"] = "720p"
 | 
						|
    duration: int = Field(5, ge=1, le=10)
 | 
						|
    seed: Optional[int] = None
 | 
						|
 | 
						|
 | 
						|
class ImageToVideoRequest(BaseModel):
 | 
						|
    prompt: str = Field(..., min_length=1, max_length=2000)
 | 
						|
    image_url: str = Field(..., min_length=1)
 | 
						|
    negative_prompt: Optional[str] = Field(None, max_length=2000)
 | 
						|
    model: Literal["i2v-14B"] = "i2v-14B"
 | 
						|
    resolution: Literal["480p", "720p"] = "720p"
 | 
						|
    duration: int = Field(5, ge=1, le=10)
 | 
						|
    seed: Optional[int] = None
 | 
						|
 | 
						|
 | 
						|
class GenerationResponse(BaseModel):
 | 
						|
    id: str
 | 
						|
    status: Literal["pending", "processing", "completed", "failed"]
 | 
						|
    video_url: Optional[str] = None
 | 
						|
    error: Optional[str] = None
 | 
						|
    created_at: datetime
 | 
						|
    completed_at: Optional[datetime] = None
 | 
						|
    credits_used: int
 | 
						|
 | 
						|
 | 
						|
class GenerationStatus(BaseModel):
 | 
						|
    id: str
 | 
						|
    status: Literal["pending", "processing", "completed", "failed"]
 | 
						|
    progress: int = Field(0, ge=0, le=100)
 | 
						|
    video_url: Optional[str] = None
 | 
						|
    error: Optional[str] = None
 | 
						|
    logs: Optional[str] = None
 |