mirror of
https://github.com/Wan-Video/Wan2.1.git
synced 2025-11-02 21:42:16 +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>
1.3 KiB
1.3 KiB
Database Package
This package contains database schema and migrations for the Wan2.1 PWA.
Setup
- Go to your Supabase dashboard
- Navigate to SQL Editor
- Create a new query
- Copy the contents of
migrations/001_initial_schema.sql - Run the query
Schema
Tables
users
- Stores user profile data
- Extends Supabase auth.users
- Tracks credits and subscription tier
generations
- Stores video generation requests and results
- Links to users and tracks status
- Stores prompts, settings, and output URLs
credit_transactions
- Tracks all credit additions and deductions
- Provides audit trail for user credits
Storage
images bucket
- Stores uploaded images for Image-to-Video generation
- Publicly accessible
- Organized by user ID
Row Level Security (RLS)
All tables have RLS enabled to ensure users can only access their own data:
- Users can read/update their own profile
- Users can view/create their own generations
- Users can view their own transactions
Migrations
Migrations should be run in order:
001_initial_schema.sql- Core schema002_seed_data.sql- Optional seed data
Indexes
Indexes are created on:
generations.user_idgenerations.created_atcredit_transactions.user_idcredit_transactions.created_at
These optimize common queries for user data and history.