FitLoom is a consent-first virtual try-on MVP for online fashion discovery. It pairs a moderated visual try-on result with a Gemini-generated Fit-Physics Note so shoppers can understand likely stretch, structure, pressure points, and uncertainty without treating AI imagery as a guaranteed size or physical-fit simulation.
Virtual try-on tells you how it looks. Fitloom helps you understand how it fits.
| Path | Purpose |
|---|---|
apps/api |
Express + TypeScript proxy API for auth, validation, memory-only media intake, SafeSearch moderation, YouCam orchestration, Gemini fit notes, and explicit Supabase wardrobe saves. |
apps/web |
Next.js onboarding and wardrobe app for Supabase auth, consent, fit profile capture, and private saved-result browsing. |
apps/extension |
Chrome Manifest V3 MVP extension for page-local garment detection, thumbnail confirmation, try-on requests, split result viewing, and save-to-wardrobe. |
context |
Product, architecture, standards, API reference, progress tracker, and unit specs. |
- The backend validates Supabase bearer tokens and derives user identity only from verified auth context.
- Raw person photos and garment images are request-scoped and in memory only.
- Inputs are moderated before YouCam; generated outputs are moderated before display or save.
- Gemini receives approved garment metadata and minimal profile fields only; it does not receive raw image buffers.
- Try-on generation returns a session-scoped result. Supabase Storage/database persistence happens only after an explicit save action.
- The Chrome extension keeps token, image, garment, and result data in memory only; it does not use persistent extension storage for sensitive data.
- Node.js 22+ recommended.
- npm available for local installs.
- A Supabase project.
- Google Cloud Vision API access.
- Gemini API access.
- Perfect Corp / YouCam API access.
- Chrome or a Chromium-based browser for the extension.
Note: package installation in the current agent environment was blocked by an npm registry
403 Forbiddenpolicy for new packages. The API dependencies already present in this environment were testable; the web app needs its declared dependencies installed locally before its typecheck/build can run.
Copy apps/api/.env.example to apps/api/.env and fill in:
NODE_ENV=development
PORT=4000
ALLOWED_ORIGINS=http://localhost:3000,chrome-extension://your-extension-id
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-supabase-anon-or-publishable-key
SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-or-secret-key
SUPABASE_RESULTS_BUCKET=try-on-results
GOOGLE_CLOUD_VISION_API_KEY=your-google-cloud-vision-api-key
YOUCAM_API_KEY=your-youcam-api-key
YOUCAM_BASE_URL=https://yce-api-01.perfectcorp.com
TRY_ON_POLL_INTERVAL_MS=1000
TRY_ON_TIMEOUT_MS=30000
GROQ_API_KEY=your-groq-api-key
GROQ_MODEL=openai/gpt-oss-120b
GROQ_BASE_URL=https://api.groq.com/openai/v1Copy apps/web/.env.example to apps/web/.env.local and fill in:
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-or-publishable-key
SUPABASE_RESULTS_BUCKET=try-on-resultsEdit apps/extension/src/config.js. The extension has no build step, so these are
plain values rather than environment variables.
export const FITLOOM_API_BASE_URL = 'http://localhost:4000';
export const FITLOOM_SUPABASE_URL = 'https://your-project.supabase.co';
export const FITLOOM_SUPABASE_ANON_KEY = 'your-supabase-anon-or-publishable-key';The extension signs users in against Supabase directly with the publishable anon key, exactly as the web app does. Only the resulting bearer token is sent to the FitLoom API. Never place the service-role key here.
Add chrome-extension://<your-extension-id> to the API's ALLOWED_ORIGINS or
try-on requests from the popup are blocked by CORS.
- Create or open a Supabase project.
- Go to Project Settings → API Keys.
- Copy the project URL to
SUPABASE_URLandNEXT_PUBLIC_SUPABASE_URL. - Copy the anon/publishable key to
SUPABASE_ANON_KEYandNEXT_PUBLIC_SUPABASE_ANON_KEY. - Copy the service-role/secret key to
SUPABASE_SERVICE_ROLE_KEYfor the API only. - Do not expose the service-role/secret key to the web app or extension.
fitloom/
│
├── extension/
│ ├── popup/
│ ├── content/
│ └── background/
│
├── web/
│ ├── app/
│ ├── components/
│ ├── pages/
│ └── lib/
│
├── server/
│ ├── routes/
│ ├── middleware/
│ ├── services/
│ └── controllers/
│
├── database/
│
├── public/
│
└── README.md
FitLoom was designed with user privacy as a priority.
- Images are processed in memory only.
- Photos are never permanently stored.
- Users explicitly consent before uploading photos.
- Google SafeSearch filters unsafe content.
- AI requests are routed securely through the backend.
FitLoom gracefully handles situations such as:
- Unsupported garments
- Failed image scraping
- AI generation timeouts
- NSFW image detection
- Network failures
Instead of failing silently, users receive clear guidance and fallback experiences.
Supported:
- T-Shirts
- Jackets
- Hoodies
- Shirts
- Outerwear
Planned:
- Pants
- Dresses
- Skirts
- Shoes
- Accessories
- Full-body outfits
Clone the repository:
git clone https://github.com/yourusername/fitloom.gitNavigate into the project:
cd fitloomInstall dependencies:
npm installRun the development server:
npm run devCreate a .env.local file:
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
GEMINI_API_KEY=
YOUCAM_API_KEY=
GOOGLE_VISION_API_KEY=- Personalized size recommendations
- Multi-angle try-on
- Outfit generation
- Fashion recommendations
- Brand size normalization
- Mobile application
- AI wardrobe assistant
- Shopping history analytics
FitLoom aims to:
- Reduce online clothing returns
- Improve shopping confidence
- Minimize fashion waste
- Save customers time and money
- Deliver a seamless AI shopping experience
Contributions are welcome!
- Fork the repository
- Create your feature branch
git checkout -b feature/amazing-feature- Commit your changes
git commit -m "Add amazing feature"- Push to the branch
git push origin feature/amazing-feature- Open a Pull Request
MIT