PixelForge started as a single-purpose AI upscaler and evolved into a full-stack image processing platform. It combines AI-powered cloud processing (upscale, background removal, restoration) with fast client-side editing tools (resize, compress, transform, metadata cleaning). The system is designed to handle real-world constraints such as rate limits, long-running AI jobs, and storage lifecycle management through an async queue-based architecture.
- β‘ AI where it matters, instant client-side tools where itβs faster
- π Security-first pipeline (Turnstile, signed URLs, validation, anti-spoof proxy strategy)
- π§ Reliable architecture (async jobs, usage limits, janitor cleanup, session recovery)
- π¨ Beautiful UX with before/after comparisons and staged progress feedback
- π οΈ Open-source and extensible provider architecture
- π Upscale Image (AI) β Real-ESRGAN enhancement
π₯ Click to watch the preview
UPSCALE.mp4
- π§ Remove Background (AI) β clean subject extraction
π₯ Click to watch the preview
REMBG.mp4
- π¨ Restore Color (AI) β revive grayscale & faded photos
π₯ Click to watch the preview
RESTORE.COLOR.mp4
- π¨ Object Remover (AI) β brush over unwanted objects and erase them cleanly
π₯ Click to watch the preview
OBJECT_RMOVE.mp4
- ποΈ Image Editor β brightness, contrast, saturation, blur, vignette
π₯ Click to watch the preview
EDIT.IMAGE.mp4
- π Resize Image β custom size, aspect lock, presets
π₯ Click to watch the preview
RESIZE.IMAGE.mp4
- π Rotate & Flip β quick transform controls
π₯ Click to watch the preview
ROTATE.IMAGE.mp4
- ποΈ Compress Image β reduce size with quality control
π₯ Click to watch the preview
COMPRESS.IMAGE.mp4
- π Convert Format β PNG / JPG / WEBP
π₯ Click to watch the preview
CONVERT.IMAGE.mp4
- π§Ή Remove Metadata β clean EXIF data
π₯ Click to watch the preview
METADATA.mp4
- π― Color Palette Extractor β draggable sampling points
π₯ Click to watch the preview
COLOR.PALETTE.mp4
- π·οΈ Add Watermark β text/image with live preview
π₯ Click to watch the preview
WATERMARK.mp4
- βοΈ Crop Image β freeform or preset aspect ratios
π₯ Click to watch the preview
CROP.IMAGE.mp4
- π€ Chatbot β Interactive FAQ assistant for quick answers and guided platform help
π₯ Click to watch the preview
CHATBOT.mp4
- π Feedback System β user input for improvements and bug reports
- π‘οΈ Turnstile Verification β bot protection layer
- π Usage Limits β per-feature daily caps
- π¦ Rate Limiting β controlled API flow
- βοΈ Async Job Queue β safe background processing
- π Status Polling β processing / ready / failed
- πΎ Session Persistence β IndexedDB + localStorage
- π Session Restore β recover after refresh
- β³ Expiration Handling β results & drafts lifecycle
- π§½ Azure Cleanup β expired result janitor
- π§Ή DB Cleanup β usage data maintenance
- π Signed URLs β secure upload & access
- π File Validation β type, size, spoof detection, and resolution safety
- π Auto-Resize for Oversized Images β browser-side downscaling for images above the public pixel limit
- π·οΈ Filename Sanitization β safe file handling
- π§© Workspace System β reusable UI shell
- π’ Modal System β legal & alert handling
- π Comparison Slider β before/after preview
- π¬ Progress UX β staged loading feedback
PixelForge is designed to balance performance, cost, and reliability while working with external AI APIs that have strict rate and concurrency limits. Key architectural decisions include:
- Queue-based AI processing system to handle long-running jobs
- Decoupled upload β process β result pipeline
- Concurrency control to prevent overload and API abuse
- Stateless API with client-side job tracking
- Hybrid processing model (AI in cloud, instant tools in browser)
- Storage lifecycle management with automatic cleanup
- Pluggable AI provider layer for future model integrations
- AI jobs are handled asynchronously due to long execution times and external API limits
- Polling is used instead of WebSockets for simplicity and reliability
- Signed URLs reduce backend load and improve upload/download performance
- Rate limiting and usage caps prevent abuse and control costs
PixelForge uses a hybrid processing model to balance performance and cost: AI-intensive tasks are handled asynchronously on the backend, while lightweight operations are executed instantly in the browser.
The system separates processing paths based on workload type to optimize performance and cost :
- User selects an image
- Frontend validates type, size, and resolution
- Oversized but safe images are resized in the browser before upload
- Backend verifies Turnstile and checks usage quota
- Backend generates signed upload URL metadata
- File uploads directly to Azure Blob Storage
- Backend reserves queue capacity and increments usage when processing starts
- AI provider executes the task asynchronously
- Client polls job status via API
- Result is stored with a signed access URL
- Cleanup system removes expired data
The frontend handles all lightweight transformations directly in the browser for instant feedback and zero backend load to provide a seamless user experience:
- User uploads image
- Image processed directly in browser (resize, compress, transform, etc.)
- No backend interaction required
- Result generated instantly
- User downloads processed file
PixelForge uses a split architecture:
-
Frontend (React + Vite + Tailwind)
Handles tool UI, previews, client-side transforms, session persistence (IndexedDB/localStorage), and interaction flow. -
Backend (FastAPI + asyncpg + aiohttp)
Handles secure AI orchestration, Turnstile verification, usage/rate limits, signed upload/result URLs, and polling endpoints. -
AI Inference (Replicate Python SDK)
Model calls go through a provider abstraction (BaseAIProvider/ReplicateProvider) so the AI layer is modular and extensible. -
Storage + Data (Azure Blob + PostgreSQL)
Azure Blob manages upload/result lifecycle; PostgreSQL stores usage buckets and retention-driven state.
For more details, see docs/ARCHITECTURE.md.
AZURE_CONNECTION_STRING=
REPLICATE_API_TOKEN=
ALLOWED_ORIGINS=
CLOUDFLARE_TURNSTILE_SITE_KEY=
CLOUDFLARE_TURNSTILE_SECRET_KEY=
DATABASE_URL=
CLOUDFLARE_SUBNETS=
ENVIRONMENT=
ALLOW_TURNSTILE_TEST_BYPASS=
TRUST_PROXY_HEADERS=
REQUIRE_CLOUDFLARE_PROXY=
STRICT_ENV_VALIDATION=VITE_API_BASE_URL=http://127.0.0.1:8000/api
VITE_TURNSTILE_SITE_KEY=0x4AAAAAACxEYGPTmGZUjctKNeed help setting up external services? See SETUP.md for step-by-step instructions on configuring Azure Blob Storage, Replicate, Cloudflare Turnstile, PostgreSQL, Discord webhooks, and environment variables.
For local testing, keep API base URL at local backend.
For deployment, switch to your hosted API endpoint (example:https://your-domain/app/api).
git clone https://github.com/Dendroculus/PixelForge.git
cd PixelForgecd backend
python -m venv .venv
source .venv/bin/activate # macOS/Linux
# .venv\Scripts\activate # Windows
pip install -r requirements.txt
uvicorn main:app --reloadcd frontend
npm install
npm run dev- Turnstile check before AI init routes
- Proxy/IP trust strategy to reduce header spoofing risk
- Signed SAS URLs for controlled blob access
- Strict file validation + capped dimensions/size
- Public AI uploads use a lower browser-side pixel limit for user experience
- Backend validation remains the security boundary with a higher hard pixel safety cap
- Oversized images may be resized before upload, while oversized files are still rejected by byte-size limits
- Automated cleanup for privacy and storage hygiene
- React + Vite (frontend)
- FastAPI (backend)
- Replicate (AI model inference)
- Azure Blob Storage (upload/result lifecycle)
- PostgreSQL (usage limits & retention windows)
- Cloudflare Turnstile (bot protection)
PRs and improvements are welcome.
If youβre planning a bigger change, open an issue first to align on scope.
For contributing guidelines, see CONTRIBUTING.md.
Please follow our Code of Conduct.
For security issues, please see our Security Policy.
Licensed under the MIT License. See LICENSE for details.
How to add a new AI feature to PixelForge:
Backend and AI test scripts:
Developer helper scripts:
- Total Line Counter β interactive Windows PowerShell script for counting project lines by folder, extension, and section.
Local PowerShell scripts and
.bathelper files are intended for Windows development environments.
- Real-ESRGAN ecosystem
- Replicate platform
- FastAPI, React, and open-source contributors
Made with β€οΈ by the PixelForge team:
![]() Hans Lead Developer |
![]() Wellson Project Coordinator |
![]() Lawi UI/UX Designer |
![]() Jensen QA Lead & Stakeholder |



