
A full-stack visual composition platform that allows users to upload real-world scene images, upload multiple custom design assets, define asset-specific placement regions, and generate realistic multi-asset composite images.
This project is designed for controlled real-scene visualization workflows such as landscape design previews, outdoor installation mockups, architectural concept presentations, and client-facing design proposals.
Unlike fully generative image tools that may create unpredictable objects, this platform focuses on a controllable workflow: users provide the background image, users provide the assets, and users define where each asset should be placed.
The goal of this project is to build a practical image composition system that helps users visualize how custom design assets would look inside real-world environments.
A typical use case is:
The current version is a local-first full-stack implementation with project persistence, multi-asset support, per-asset masks, canvas editing, and backend image composition.
The application supports project-based local persistence through the backend.
Users can refresh the browser or restart both the frontend and backend, and the project can still be restored using the saved project ID.
Persisted data includes:
The frontend stores only the active project_id in browser localStorage. The backend stores all project files and metadata locally.
Users can upload a real-world scene photo as the base image.
The uploaded background is saved in the backend project directory and restored automatically when the project is reloaded.
Users can upload multiple asset images without replacing previous uploads.
Each uploaded asset is stored as part of the project and can be reused multiple times on the canvas.
Supported asset use cases include:
Each asset can have its own placement mask.
This allows different assets to be placed in different regions of the same background image.
Example workflow:
This workflow makes it possible to control where each type of object appears independently.
When a user applies a mask to a selected asset, the system analyzes the drawn regions and automatically creates asset placements.
This allows users to quickly place the same asset in multiple areas without manually duplicating and positioning every instance.
After assets are inserted, users can manually adjust each asset on the canvas.
Supported editing operations include:
Each placement is stored independently, so deleting or editing one placement does not affect other assets.
The backend generates a final composite image using all visible asset placements.
The image composition pipeline reads the saved project state, loads the background image, loads all active asset placements, applies transformations, and renders the final result.
The current version prioritizes controllability and predictable output over fully generative image editing.
The editor includes zoom controls for working with large or panoramic background images.
Supported controls include:
This makes it easier to work with wide background images without relying only on horizontal scrolling.
The current version uses local file-system storage.
No cloud storage, database, or account system is required for the current implementation.
Future versions can replace local storage with:
Frontend
React + TypeScript
Canvas editor, upload UI, mask drawing, asset placement, result preview
↓ HTTP API
Backend
FastAPI
Project creation, upload handling, project state management, local persistence
↓
Image Processing Engine
Pillow / OpenCV
Asset transformation, multi-asset rendering, image compositing
↓
Local File Storage
Project metadata, background images, asset images, masks, generated results
The project.json file stores the full project state.
POST /api/projects`
GET /api/projects/{project_id}
POST /api/projects/{project_id}/background
POST /api/projects/{project_id}/assets
POST /api/projects/{project_id}/asset-masks
POST /api/projects/{project_id}/placements
PUT /api/projects/{project_id}/placements
DELETE /api/projects/{project_id}/placements/{placement_id}
POST /api/projects/{project_id}/compose
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000
Open a second terminal:
cd frontend
npm install
npm run dev
The current version supports:
The current version does not yet include:
Planned improvements include: