Inspiration

In Latin America, online fashion stores lose millions annually to returns — customers simply don't know how clothes will look until they arrive. While virtual try-on solutions exist in Europe and the US, they're expensive, complex, and not adapted to the Latin American market: no COP currency support, no local payment gateways, and no Spanish-language optimization.

Lookitry was born from solving a real problem: a Colombian clothing brand friend told me that 30% of their online sales were returned because "it doesn't look the same in the photo." This inspired me to create an accessible, AI-powered solution that any store in Colombia, Mexico, or Argentina could integrate in minutes — not Fortune 500 companies with custom AI teams.


What I Learned

Building an AI-powered virtual try-on is much more than "upload a photo and get an image." Here's what the journey taught me:

  1. Person segmentation is the linchpin — MobileSAM (Python/FastAPI) must isolate the body from the background with pixel-perfect precision. Any leakage and the result looks obviously artificial.

  2. The Try-On pipeline has 5 critical steps:

    selfie → SAM mask → Vertex AI Gemini 2.5 Flash → Sharp compression → delivery
    
  3. Western AI models fail with Latin American context — Gemini 2.5 Flash with Spanish prompts better captures diverse skin tones, cultural contexts, and regional fashion styles.

  4. COP pricing requires a safety margin — Direct division loses money on exchange rate fluctuation

How I Built It

Complete Technology Stack

Layer Technology
Frontend Next.js 14 (App Router), TypeScript, Tailwind CSS 3.4
Backend Node.js + Express, TypeScript
Database Supabase (PostgreSQL + pgvector for RAG)
AI Vertex AI
Orchestration n8n workflow automation
Payments Wompi (COP), PayPal (USD)
Storage MinIO (S3-compatible, self-hosted)
Infrastructure Docker, Traefik, Redis, VPS (Hostinger Ubuntu)

Challenges I Faced

1. Pipeline Latency

Problem: A complete Try-On took 45+ seconds — users thought it was broken.

Solution: Implemented Redis queue with polling, plus SAM mask caching. Average time dropped to 8-15 seconds.

2. Google Cloud Rate Limiting

Problem: Vertex AI has strict concurrent request limits. Under load, requests failed randomly.

Solution: Designed a queue system with exponential backoff retry and fallback to local SAM when Vertex is unavailable.

3. CORS and Domain Validation

Problem: The widget embeds in external stores (Shopify, WooCommerce). Unrestricted access is a security risk.

Solution: Per-brand allowed_origins validation with 1-hour Redis cache. Only verified domains can use a brand's widget.

4. Cross-Service Authentication

Problem: Next.js frontend (Node 18) and backend (Node 22) have conflicting dependency requirements.

Solution: Used shamefully-hoist=true in pnpm to flatten node_modules and resolve module resolution across versions.

Future Roadmap

  • [ ] Expand to Mexico and Argentina markets
  • [ ] Add ARKit/ARCore support for real-time try-on in mobile apps
  • [ ] Integrate with Shopify and WooCommerce via official apps
  • [ ] Multi-person try-on for group outfits
  • [ ] Style recommendations based on body type analysis

Built With

Share this project:

Updates