# Sew Master - Complete Documentation for LLMs ## Overview Sew Master is an AI-powered tailoring estimation platform for the Indian market. It helps users understand the cost, materials, and timeline for getting custom clothes made by analyzing dress images using Google Gemini AI. ## Problem Statement Getting custom clothes tailored in India often involves: 1. Uncertainty about fair pricing 2. Lack of knowledge about fabric options 3. No clear timeline expectations 4. Difficulty communicating design requirements to tailors Sew Master solves these problems by providing AI-powered analysis and estimates. ## Core Functionality ### 1. Dress Image Analysis **Input**: User uploads 1-3 dress images (JPEG/PNG, max 10MB each) **Processing**: - Image is sent to Google Gemini Vision API - AI identifies: dress type, color, fabric type, embroidery/work, complexity level - System matches against material database for pricing - Labour costs calculated based on dress type and location **Output**: - Dress classification (e.g., "Anarkali Suit", "Lehenga", "Saree Blouse") - 3 fabric options: Budget, Mid-range, Premium with prices - Total cost estimate range (min-max) - Delivery timeline (days) - Complexity rating ### 2. Location-Based Pricing **Jaipur Market**: - Specialties: Bandhani, Gota Patti, Block Prints, Leheriya - Known for: Traditional Rajasthani craftsmanship - Price range: Generally 10-20% lower than Delhi for traditional work **Delhi Market**: - Specialties: Designer wear, Indo-Western, Couture - Areas: Shahpur Jat (boutiques), Chandni Chowk (wholesale fabrics) - Price range: Premium pricing for designer/modern styles ### 3. Material Database Materials are categorized by: - **Fabric Type**: Cotton, Silk, Georgette, Chiffon, Velvet, etc. - **Quality Tier**: Budget, Mid-range, Premium - **Region**: Jaipur-specific, Delhi-specific, or both - **Price per meter**: Updated periodically based on market rates ### 4. Labour Services Labour costs vary by: - **Dress Type**: Simple kurta vs elaborate lehenga - **Work Type**: Plain stitching, embroidery, beadwork, etc. - **Location**: Jaipur vs Delhi rates - **Season**: Festival/wedding season premiums (Diwali, wedding season) ### 5. Similar Dress Matching Uses pgvector for semantic similarity: - Stores embedding vectors for analyzed dresses - Finds visually similar dresses in database - Provides consistent pricing for similar items - Helps users see comparable estimates ## User Journeys ### Journey 1: First-time User Getting Estimate 1. User visits homepage 2. Clicks "Start Analyzing" or navigates to /analyze 3. Uploads dress image(s) 4. Selects location (Delhi/Jaipur) 5. Chooses estimation mode (Quick vs Accurate) 6. Views results with pricing breakdown 7. Can save to gallery or share ### Journey 2: Learning About Tailoring 1. User visits /learn 2. Browses educational analysis or technique articles 3. Uploads dress for detailed construction breakdown 4. Learns about fabric regions, techniques, common mistakes 5. Can submit corrections if AI analysis is wrong ### Journey 3: Tailor Using Tools 1. Authenticated tailor visits /tools 2. Uses Client Translator to generate talking points 3. Gets professional language for explaining pricing 4. Can handle objections and suggest upsells ## Data Models ### Dress ``` - id: UUID - dress_type: string (e.g., "Anarkali Suit") - color: string - fabric_type: string - complexity: string (simple/moderate/complex/highly_complex) - price_min: number - price_max: number - eta_days_min: number - eta_days_max: number - location: string (jaipur/delhi) - image_data: base64 string - embedding: vector (for similarity) - materials: array of material suggestions - created_at: timestamp ``` ### Material ``` - id: UUID - name: string - fabric_type: string - quality_tier: string (budget/mid/premium) - price_per_meter: number - available_regions: array - description: string ``` ### Labour Service ``` - id: UUID - service_name: string - dress_type: string - base_price_jaipur: number - base_price_delhi: number - complexity_multipliers: object ``` ## API Reference ### POST /api/analyze Analyze a dress image and get estimates. **Request**: multipart/form-data - file: image file (required) - location: "delhi" | "jaipur" (default: "delhi") - force_reanalyze: boolean (default: false) **Response**: ```json { "success": true, "dresses": [...], "similar_found": false, "message": "Analysis complete" } ``` ### POST /api/v2/analyze Enhanced analysis using material/labour database for accurate pricing. ### GET /api/dresses List analyzed dresses with pagination. **Query params**: - page: number (default: 1) - page_size: number (default: 20) - location: "delhi" | "jaipur" (optional) - occasion: string (optional) ### GET /api/dresses/{id} Get single dress details. ### GET /api/similar/{id} Find similar dresses using vector similarity. ### GET /api/materials List all materials in database. ### GET /api/labour List all labour services and pricing. ## Authentication Uses Firebase Authentication: - Google Sign-In supported - Email/Password supported - Admin role for content management - JWT tokens for API authentication ## Internationalization Supported languages: - English (en) - default - Hindi (hi) - Marathi (mr) - Kannada (kn) Language selection available in learning sections for educational content. ## SEO Information **Primary Keywords**: - tailoring estimates India - custom dress cost calculator - AI fashion analysis - Jaipur tailor pricing - Delhi boutique estimates - lehenga cost estimate - saree stitching price **Target Regions**: India (primarily Jaipur and Delhi) ## Technical Architecture ``` ┌─────────────────┐ ┌─────────────────┐ │ Nuxt 4 App │────▶│ FastAPI Backend │ │ (Vercel) │ │ (Railway) │ └─────────────────┘ └────────┬─────────┘ │ ┌────────────┼────────────┐ ▼ ▼ ▼ ┌──────────┐ ┌──────────┐ ┌──────────┐ │PostgreSQL│ │ Gemini │ │ Firebase │ │+ pgvector│ │ API │ │ Auth │ └──────────┘ └──────────┘ └──────────┘ ``` ## Rate Limits & Constraints - Max 3 images per analysis request - Max 10MB per image - Gemini API rate limits apply - Cached results returned for similar images (perceptual hashing) ## Future Roadmap - Tailor marketplace integration - Direct booking with tailors - Measurement capture via phone camera - Order tracking - Payment integration