unwrap-clothes/docs/map.md

33 lines
2.2 KiB
Markdown
Raw Normal View History

## Destination
A fast, single-user, locally hosted web app (`app.py` + vanilla HTML/CSS/JS in `static/index.html`) running on `http://127.0.0.1:8000` where a user can upload a garment photo, choose presets or customize the prompt, submit to OpenRouter's `meta/muse-image`, view side-by-side before/after comparisons, and download the full-resolution restored image.
## Notes
- Domain: Garment photo cleaning, wrinkle removal, catalog photography standardization.
- Skills: `prototype`, `unslop`.
- Notes override: Execution carried into the map tickets.
- Standing preferences: Minimal dependencies (FastAPI + uvicorn + vanilla HTML/CSS/JS without build steps or node_modules).
- Verified facts: `meta/muse-image` avoids false-positive moderation triggers, output capped ~1.8 MP requiring Pillow Lanczos upscale to source dimensions.
## Decisions so far
<!-- the index: one line per closed ticket, enough to judge relevance, then zoom the link for the detail the ticket holds -->
- [Decouple core photo cleaning logic for CLI and API reuse](https://code.tilltheend.de/tilltheend/unwrap-clothes/issues/2): Extracted encoding, OpenRouter API client, and in-memory Lanczos resolution restoration into `cleaner.py`, supporting both raw bytes and paths for CLI and web API reuse.
- [Implement FastAPI backend and /api/clean endpoint in app.py](https://code.tilltheend.de/tilltheend/unwrap-clothes/issues/3): Built FastAPI service in `app.py` exposing `POST /api/clean` with multipart upload, base64 data URI response, Lanczos toggle, and static file hosting.
## Not yet specified
<!-- see "Fog of war": in-scope fog you can't ticket yet; graduates as the frontier advances -->
- Error handling and recovery UI (rate limit 429, invalid API key 401, timeout, or moderation errors displayed gracefully in the web UI)
- Batch upload or multi-image queue (if single-image workflow demands scaling)
## Out of scope
<!-- see "Out of scope": work ruled beyond the destination; closed, never graduates -->
- Multi-tenant authentication, user accounts, and remote multi-user session management
- Custom AI model fine-tuning or local GPU model inference
- Cloud storage integrations (AWS S3, Google Cloud Storage)