GenAI Studio is a web-based platform for generating and managing AI-powered visual assets. It allows users to turn text prompts into stunning images and videos using advanced AI models.
- AI Image Generation: Convert text descriptions into high-quality images.
- Progress Tracking: Real-time polling and progress updates during the generation process.
- Asset Management: A dedicated dashboard for users to view, manage, and delete their generated assets.
- Public Gallery: Toggle asset visibility to share creations with the community.
- Secure Storage: All assets are stored securely in AWS S3 with user-specific private access.
- Multi-tenant Architecture: Row-level security (RLS) ensures users can only access their own data.
- Frontend: Next.js 15+ (App Router), React 19, TanStack Query, Tailwind CSS 4, Lucide React.
- Backend: Next.js API Routes, Supabase (Authentication, PostgreSQL, RLS).
- Storage: AWS S3.
- Validation: Zod.
- Node.js (v20+)
- pnpm
- Supabase CLI (optional but recommended)
- AWS Account (for S3 storage)
-
Clone the repository:
git clone <repository-url> cd image-video-generation
-
Install dependencies:
pnpm install
-
Environment Variables: Create a
.env.localfile in the root directory and add the following:NEXT_PUBLIC_SUPABASE_URL=your-supabase-url NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-key AWS_REGION=your-aws-region AWS_ACCESS_KEY_ID=your-aws-access-key-id AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key AWS_S3_BUCKET=your-s3-bucket-name
-
Database Setup: Apply the migrations to your Supabase project:
supabase migration up
-
Run the development server:
pnpm dev
src/app: Next.js App Router pages and API routes.src/components: Reusable UI components.src/lib: Shared utilities, Supabase clients, and TypeScript types.src/services: Core logic for ComfyUI integration, S3 storage, and database initialization.supabase/migrations: SQL migration files for database schema.
- ComfyUI Integration: Replace the current mock service with actual ComfyUI API integration.
- Video Generation: Implement the frontend and backend flow for video generation.
- Media Preview: Display the actual generated images/videos in the dashboard and gallery using S3 pre-signed URLs.
- Asset Deletion: Allow users to permanently delete their assets from both the database and S3.
- Search & Filtering: Add capabilities to search and filter assets in the dashboard and public gallery.
- User Profiles: Create a user settings page for profile management.
- Enhanced Error Handling: Improve retry logic and error reporting for the generation pipeline.
- Download Feature: Allow users to download their generated assets directly.
This project is licensed under the MIT License.