Full-stack demo for building virtual try-on experiences with Amazon Nova Canvas (AWS Bedrock). The frontend lets you pick or upload model and garment images, tune Nova Canvas parameters, and download the generated result.
- Features
- Architecture
- Requirements
- Setup
- Backend (NestJS)
- Frontend (Vite + React)
- Full-stack local quickstart
- Deployment
- Assets and persistence
- Quality checks
- License
- Contact
- Modern React 19 + Vite UI with Material UI and Tailwind styling
- Model and garment picker with uploads, local persistence, and a built-in sample model library
- Nova Canvas parameter editor (mask shape, garment class, merge style, quality, cfg scale, seed)
- Bedrock-backed NestJS API with form-data support for files or paths and data URL inputs
- Downloadable PNG output plus metadata echoing the Nova Canvas payload
- Node.js 20+
- pnpm 9+
- AWS account with Bedrock access to Nova Canvas in
us-east-1
pnpm install- AWS credentials: use an
AWS_PROFILEwith Bedrock permissions or exportAWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY, and optionallyAWS_SESSION_TOKEN. - Region: Nova Canvas runs in
us-east-1(the client is created with that region). - Optional env:
PORT(default3333)
Run in watch mode:
pnpm nx serve backendThe API is served at http://localhost:<PORT>/api, with the virtual try-on endpoint at /api/virtual-try-on.
- Optional env:
VITE_API_BASE_URL(defaults tohttp://localhost:3333/apiwhen dev server runs on port 4200; otherwise/api)
Run in watch mode:
pnpm nx serve frontend- In one terminal start the backend:
pnpm nx serve backend - In another terminal start the frontend:
pnpm nx serve frontend - Open
http://localhost:4200and pick or upload a model and garment, adjust Nova settings, then generate and download the result.
Prerequisites:
- AWS account with Bedrock access in
us-east-1 - S3 bucket
virtual-try-on-terraform-stateinus-east-1for Terraform state
One-time bootstrap:
aws s3api create-bucket --bucket virtual-try-on-demo-terraform-state --region us-east-1 --create-bucket-configuration LocationConstraint=us-east-1Deploy from local:
cd terraform
terraform init
terraform validate
terraform plan -out=tfplan
terraform apply tfplan- Sample models are bundled in
assets/generatedModelsand surfaced in the picker. - Uploaded models and garments are stored client-side (IndexedDB with a localStorage fallback) so they survive page reloads.
- Lint:
pnpm run lint - Tests:
pnpm run test - Format:
pnpm run format
Copyright 2025 TrackIt
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
For questions, suggestions, or support, please open an issue on GitHub or contact us via the blog.
