Scalable AI Image Generation Software

Job ID: 40239924

Budget: $10 – $30 USD

AI Image Generation Automation MVP

## 1. Project Goal
Build a scalable AI image generation progran using AdsPower, Playwright, and Supabase.

## 2. Tech Stack & Constraints
- **Frontend/UI:** Next.js 14+ (App Router), Tailwind CSS.
- **Backend/Database:** Supabase (Auth, Database, Storage).
- **Automation:** Python/Node.js Playwright + AdsPower Local API.
- **Anti-Detection:** Mandatory use of `playwright-stealth` and `ghost-cursor`.
- **Target Platforms:** Google ImageFX, Adobe Firefly, Groq, etc.

## 3. Core Functional Requirements (Must-Have)

### A. Worker & Queue System (The Engine)
- **Batch Processing:** Ability to process 400+ prompts in a single session.
- **Sequence Indexing:** Every generated file must be named with a leading index (e.g., `001_filename.png`, `002_filename.png`) to maintain order.
- **Status Tracking:** Each task must have a status in Supabase: `pending`, `processing`, `completed`, or `failed`.
- **Auto-Retry for Failures:** The system must identify `failed` tasks and allow a one-click "Retry All Failures" function to complete the missing indices.

### B. Scalable Plugin Architecture
- **JSON-Based Logic:** Do not hard-code site-specific logic. Use a JSON configuration file to store selectors and workflows for each site (ImageFX, Adobe, etc.) so new sites can be added with minimal coding.

### C. Anti-Detection & Stability
- **Stealth Mode:** Emulate human behavior (Bezier curve mouse movements, random delays between clicks).
- **Session Management:** Use AdsPower's persistent sessions to avoid manual logins for every run.

## 4. Development Priorities (The Golden Rule)
1. **Supabase Schema First:** Set up the `tasks` and `logs` tables to track processing status and indices.
2. **Worker Implementation:** Build the script to read 400 prompts from the DB and save indexed images to local/cloud storage.
3. **Failure Handling:** Implement the logic to re-run only the specific indices that failed.
4. **Minimal UI:** Create a simple dashboard to upload prompts (CSV/Excel) and view the status of each index.

## 5. Strictly Prohibited
- **No Image Recognition (OpenCV):** Use only DOM Selectors for reliability.
- **No Manual Captcha Solving:** Use persistent manual sessions or 3rd party solvers if absolutely necessary.
- **No Synchronous Processing:** All tasks must be processed via an asynchronous Worker-Queue structure.