How vinay8git/visual-product-matcher works
Project type and purpose
• This is a full-stack, AI-powered visual product search engine.
• Frontend: React + Vite UI for uploading or pasting an image and displaying results.
• Backend: Node.js + Express to handle HTTP requests, orchestrate Python CLIP model, manage data.
• Python service using PyTorch + OpenAI’s CLIP model for generating image embeddings.
• Data store: JSON files for product catalog and precomputed embeddings, plus local file caches.
File structure
• Top level splits into Back-End, Front-End, Test_Images, and documentation.
• Back-End:
• server.js – Express HTTP API
• clip_model.py – Python entry point for embedding logic
• data/ – products.json (catalog), embeddings.json (index), images_cache/
• public/index.html – fallback static UI
• uploads/ – user-uploaded images
• package.json, requirements.txt – Node and Python deps
• Front-End:
• src/ – React components (App.jsx), assets, styles
• index.html + Vite config – entry and build settings
• package.json – React and tooling deps
• Architectural_Diagram.png exists as an example reference.
README for additional insights
• Features call out:
• Visual search via upload or URL
• Instant preview in the UI
• Products and auto-rebuild the embedding index
• Configurable Top-K and similarity threshold
• Cached image downloads for performance
• Tech stack and data flow are described: user → React UI → Express API → CLIP → JSON index → results.