No description
Find a file
Khoa.vo 4050f4c853
Some checks are pending
CI / build (18.x) (push) Waiting to run
CI / build (20.x) (push) Waiting to run
v3.1.0: Integrate Meta AI video generation, remove redundant wrapper
- Add backend/services/meta_video_client.py (direct video generation)
- Update routers/meta.py with working /meta/video endpoint
- Delete services/metaai-api/ (~1500 lines removed)
- Simplify docker-compose.yml to single container
- No external service dependencies for Meta AI
2026-01-13 08:02:36 +07:00
.github/workflows feat: Initial commit with multi-provider image generation 2026-01-05 13:50:35 +07:00
app UI Polish: Refined Lightbox controls, added Cookie Expired popup, and improved mobile filters 2026-01-07 23:05:28 +07:00
backend v3.1.0: Integrate Meta AI video generation, remove redundant wrapper 2026-01-13 08:02:36 +07:00
components v3.0.1: Complete frontend integration with FastAPI backend 2026-01-13 07:52:58 +07:00
data v3.0.0: Add FastAPI backend 2026-01-13 07:46:32 +07:00
lib v3.0.0: Add FastAPI backend 2026-01-13 07:46:32 +07:00
public feat: Initial commit with multi-provider image generation 2026-01-05 13:50:35 +07:00
scripts fix: Cookie parsing for JSON format in upload and generate APIs 2026-01-05 15:01:24 +07:00
.dockerignore feat: add Meta AI video generation 2026-01-06 13:52:31 +07:00
.gitignore feat: add Meta AI video generation 2026-01-06 13:52:31 +07:00
CONTRIBUTING.md feat: Initial commit with multi-provider image generation 2026-01-05 13:50:35 +07:00
docker-compose.yml v3.1.0: Integrate Meta AI video generation, remove redundant wrapper 2026-01-13 08:02:36 +07:00
Dockerfile v3.0.0: Add FastAPI backend 2026-01-13 07:46:32 +07:00
eslint.config.mjs UI Polish: Refined Lightbox controls, added Cookie Expired popup, and improved mobile filters 2026-01-07 23:05:28 +07:00
next.config.ts chore: update next.config to ignore build errors for deployment 2026-01-07 23:10:45 +07:00
package-lock.json feat: Initial commit with multi-provider image generation 2026-01-05 13:50:35 +07:00
package.json feat: Initial commit with multi-provider image generation 2026-01-05 13:50:35 +07:00
postcss.config.mjs feat: Initial commit with multi-provider image generation 2026-01-05 13:50:35 +07:00
README.md v3.0.0: Add FastAPI backend 2026-01-13 07:46:32 +07:00
tsconfig.json feat: Initial commit with multi-provider image generation 2026-01-05 13:50:35 +07:00

kv-pix (V3)

A modern, full-stack AI Image Generator with FastAPI backend and Next.js frontend. Powered by Google ImageFX (Whisk), Grok, and Meta AI.

🆕 What's New in V3

  • FastAPI Backend - Python backend with automatic Swagger documentation
  • Better Security - Centralized CORS, Pydantic validation, structured error handling
  • API Documentation - Interactive docs at /api/docs (Swagger) and /api/redoc
  • Improved Architecture - Clean separation of frontend and backend

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • Python 3.11+
  • Whisk/Grok/Meta Cookies (from respective services)

Installation

# Install frontend dependencies
npm install

# Set up backend
cd backend
python3 -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt

Run Locally

Terminal 1 - Backend:

cd backend
source venv/bin/activate
uvicorn main:app --reload --port 8000

Terminal 2 - Frontend:

npm run dev
Service URL
Frontend http://localhost:3000
Backend API http://localhost:8000
Swagger UI http://localhost:8000/docs
ReDoc http://localhost:8000/redoc

🐳 Docker Deployment (Synology NAS / linux/amd64)

docker-compose up -d

Using Docker CLI

# Pull from registry
docker pull git.khoavo.myds.me/vndangkhoa/apix:v3

# Run
docker run -d -p 3000:3000 -p 8000:8000 --name kv-pix git.khoavo.myds.me/vndangkhoa/apix:v3

🏗️ Architecture

┌─────────────────┐     HTTP/REST      ┌──────────────────┐
│   Next.js UI    │ ◄───────────────► │   FastAPI Backend │
│   (Port 3000)   │                    │   (Port 8000)     │
└─────────────────┘                    └────────┬─────────┘
                                                │
                                    ┌───────────┴───────────┐
                                    │                       │
                              ┌─────▼─────┐          ┌──────▼──────┐
                              │ WhiskAPI  │          │  MetaAI API │
                              └───────────┘          └─────────────┘

Tech Stack

Project Structure

├── app/            # Next.js pages and (legacy) API routes
├── backend/        # FastAPI Python backend
│   ├── main.py
│   ├── routers/    # API endpoints
│   ├── services/   # Business logic (whisk_client, meta_client)
│   └── models/     # Pydantic request/response models
├── components/     # React UI components
├── lib/            # Frontend utilities and API client
├── data/           # Prompt library JSON
└── public/         # Static assets

Features

  • Multi-Provider: Google Whisk (ImageFX), Grok (xAI), Meta AI (Imagine)
  • FastAPI Backend: Type-safe Python API with auto-documentation
  • Prompt Library: Curated prompts organized by categories
  • Upload History: Reuse previously uploaded reference images
  • Reference Chips: Drag-and-drop references for Subject/Scene/Style
  • Video Generation: Animate images with Whisk Animate (Veo)
  • Responsive Gallery: Masonry layout with smooth animations
  • Dark Mode: Material 3 inspired aesthetic
  1. Go to the respective service:
  2. Open DevTools (F12) → Application → Cookies.
  3. Copy the cookie string (or use a "Get Cookies" extension to copy as JSON).
  4. Paste into the Settings menu in the app.

📝 License

MIT