Virtual clothes try-on using Google Gemini AI for e-commerce sites.
Learn more on kabinka.online
The entire app was vibe coded with Claude Code. If the concept makes users interested, the code will be refactored to support further development
- Virtual Try-On: AI-powered clothes fitting using Gemini 2.5 Flash (Nano Banana)
- Easy Setup: Simple API key and photo upload process
- Multi-Site Ready: Modular architecture for easy expansion
- Privacy First: All data stored locally in browser
- Go to Google AI Studio
- Create a free account if needed (or paid for grader usage)
- Generate a new API key
- Add the key to the plugin
- Official Chrome store [Easiest]
- TODO link
- As 3rd party plguin
- TODO link
- With source code [Best for modifications]
- Download/clone this repository
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode" (top right toggle)
- Click "Load unpacked" and select the extension folder
- The extension icon will appear in your toolbar
- Click the extension icon in Chrome toolbar
- Enter your Gemini API key
- Upload a clear photo of yourself (stored locally only)
- Click "Save Settings"
- Visit any of supported eshops: Go to any product page
- Find button in left corner of image: Look for orange blue buttons over product images with text ("Try on" / "Vyzkoušet")
- Click the button: Button starts AI processing
- Wait for Result
- View Result: Generated image appears with cost information
- Download the result image
- Regenerate: Option to create new result if needed
├── manifest.json # Extension configuration & site matching
├── content-scripts/
│ ├── base/
│ │ ├── BaseTryOnConnector.js # Core business logic & API integration
│ │ └── ModalManager.js # UI management & result display
│ ├── zalando.js # Zalando-specific connector
│ └── aboutyou.js # AboutYou-specific connector
├── background/
│ └── service-worker.js # Gemini API communication
├── popup/
│ ├── popup.html # Settings interface
│ ├── popup.css # UI styling
│ └── popup.js # Setup logic
├── styles/
│ └── content.css # Button and modal styling
├── utils/
│ └── cache-manager.js # Cache management utilities
└── prompts/
├── clothes_detection_prompt.txt
├── tryon_prompt.txt
└── user_clothes_detection_prompt.txt
The extension uses a modular, extensible architecture that separates concerns:
- BaseTryOnConnector: Shared business logic, API calls, and common functionality
- ModalManager: UI management, result display, and user interactions
- Site Connectors: E-shop specific implementations (Zalando, AboutYou)
- Manifest-based Loading: Automatic connector selection based on URL patterns
- Clothes Detection: Product image → Gemini → Clothes type & color
- User Clothes Detection: User photo → Gemini → Body analysis
- Virtual Try-On: User photo + Product image + Detected info → Gemini → Result
- Modular Design: Easy to add new e-shop connectors
- Smart Image Detection: Multiple selector strategies with fallbacks
- Advanced Caching: Results cached by image + user photo hash with automatic cleanup
- Error Handling: User-friendly error messages with retry options
- Responsive Design: Works on desktop and mobile
- Privacy-First: No data sent to external servers (except Gemini API)
- Local Storage Only: Your photo and settings never leave your browser
- API Key Security: Stored locally, not transmitted anywhere except Google
- No Tracking: Extension doesn't collect any usage data
- Transparent: All API calls visible in network tab
- Gemini API: ~$0.002 per try-on request
- Free Tier: Google provides generous free quotas
- Cost Tracking: Extension shows running total of API costs
- Create new content script in
content-scripts/ - Add site-specific selectors configuration
- Update manifest.json with new match patterns
- Test fallback detection strategies
- More AI Models: Easy to swap Gemini for other vision models
- Better Prompts: Customize prompts for different clothing types
- Batch Processing: Try multiple items at once
- Social Features: Share results (with user permission)
- No buttons appearing: Check if site CSS selectors changed
- API errors: Verify API key is valid and has quota
- Poor results: Try better lighting in user photo
- Slow performance: Clear cache or check internet connection
- Open Developer Tools (F12)
- Check console for error messages
- Network tab shows API requests
- Storage tab shows cached data
- Clean up the architecture - the plugin was mainly vibe-coded
- Support for more e-commerce sites (H&M, ASOS, etc.)
- Multiple user photos for different poses
- Size/fit recommendations based on body measurements
- Batch processing for multiple items
- History of processed items
- Possibility to chose AI model
MIT License - feel free to modify and distribute
Any contribution will be more than welcomed
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
For issues, questions or collaboration:
- Check existing GitHub issues
- Create new issue with detailed description
- Include browser version, error messages, and steps to reproduce
If you are business or individual interested in collaboration (adding support for your e-shop) or interested in implementing this technology to your e-shop, you can reach out to me on info@filipobornik.cz or LinkedIn
Note: This extension requires a Google Gemini API key. The extension is for educational/demonstration purposes. Results may vary based on image quality and AI model capabilities.