Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

You are a senior full-stack web developer and computer vision expert. Build a complete, production-ready, single-file HTML + JavaScript + CSS webpage (no external server, everything client-side) that works as a “Couch Fit Calculator & AR Visualizer” for furniture stores. CORE FEATURES THAT MUST WORK PERFECTLY: 1. User uploads a photo of their room (any angle, phone or camera photo). 2. User clicks “Set Reference” → clicks two points on a known object in the photo (e.g. TV, door, window, rug, floor tile). A modal pops up asking “What is the real-world size of this distance?” (in cm or inches). This calibrates the pixel-to-real-world scale. 3. After calibration, user selects a couch from a list of 15 popular couch models (you must include real models with exact dimensions): – 3-seat sofa (230×90×85 cm) – L-shape sectional (280×280×85 cm) – 2-seat loveseat (170×90×85 cm) – Sleeper sofa (220×95×88 cm) – etc. (add 11 more realistic models with accurate dimensions) 4. The selected couch instantly appears overlaid on the photo, perfectly scaled to real-world dimensions using the reference calibration. 5. User can: – Drag the couch anywhere in the room – Rotate it (0°, 90°, 180°, 270°) – See exact length, width, height numbers displayed on the couch – Toggle “Top View” mode that shows a 2D floor plan with measurements – Toggle “Fit Check” that highlights in RED if the couch blocks a door/window or doesn’t fit, GREEN if perfect fit – See a live measurement ruler (like in IKEA app) showing clearance to walls, other furniture, walking space (minimum 70cm walking path required) 6. Bonus ultra-realistic mode (optional but highly preferred): Use a semi-transparent 3D couch model (use simple CSS 3D or load free GLB models via Three.js) so it looks photorealistic with proper perspective and shadows. 7. Extra professional features: – Mobile-friendly, works perfectly on phone (pinch to zoom, etc.) – “Save Image” button → downloads the photo with couch overlaid – “Share Link” button → generates a URL with the project saved (use URL parameters or localStorage) – Beautiful modern UI (dark/light mode toggle, premium furniture store look) – Loading animations, helpful tooltips, error handling – Works offline after first load TECH STACK (must use only client-side): – HTML5 Canvas + Fabric.js (for dragging, rotating, scaling objects) – Or Three.js + if you go 3D route – Use EXIF to auto-rotate uploaded photos correctly – No external CDN dependencies except Fabric.js or Three.js (allowed) The final output must be ONE SINGLE HTML FILE that I can save and open in any browser and it works instantly with zero setup. Make it look extremely professional – this will be used by real furniture companies. Include comments in code explaining the calibration math (pixel ratio = real_distance / pixel_distance). Deliver the complete working code in one message. Make it flawless.

Leave a Comment