AI-Powered Product Identification and Shopping Link Extraction Web App
- πΈ Image Upload: Drag-and-drop or click to upload product images
- π€ AI Product Identification: Uses Clarifai for accurate product detection (85%+ accuracy)
- ποΈ Automated Shopping Links: Fetches buy links and prices from major retailers via SerpApi
- π° Price Comparison: Compare prices across multiple online stores
- β‘ Real-time Processing: Fast product identification and link extraction
- π± Responsive Design: Works seamlessly on desktop and mobile devices
- React 18
- Axios for API calls
- Modern CSS with animations
- Python Flask
- Clarifai API (product identification)
- SerpApi (shopping search)
- Flask-CORS for cross-origin requests
- Node.js (v16 or higher)
- Python 3.8 or higher
- Clarifai API Key (PAT)
- SerpApi Key
git clone <your-repo-url>
cd vision-cartcd backend
pip install -r requirements.txtCreate a .env file in the backend directory:
cp .env.example .envEdit .env and add your API keys:
CLARIFAI_PAT=your_clarifai_pat_key_here
SERPAPI_KEY=your_serpapi_key_here
Clarifai:
- Sign up at https://clarifai.com
- Go to Settings β Security
- Create a new Personal Access Token (PAT)
- Copy the PAT key
SerpApi:
- Sign up at https://serpapi.com
- Go to Dashboard β API Key
- Copy your API key
python app.pyBackend will run on http://localhost:5000
cd ../frontend
npm installnpm startFrontend will run on http://localhost:3000
- Open
http://localhost:3000in your browser - Upload an image by:
- Dragging and dropping an image onto the upload area
- Clicking the upload area to select a file
- Wait for the AI to identify products
- View identified products with confidence scores
- Browse shopping links with prices from various retailers
- Click on any shopping link to purchase
vision-cart/
βββ backend/
β βββ app.py # Flask application
β βββ requirements.txt # Python dependencies
β βββ .env.example # Environment variables template
β βββ .env # Your API keys (don't commit!)
β
βββ frontend/
β βββ public/
β β βββ index.html
β βββ src/
β β βββ components/
β β β βββ ImageUploader.js
β β β βββ ImageUploader.css
β β β βββ ProductResults.js
β β β βββ ProductResults.css
β β βββ App.js
β β βββ App.css
β β βββ index.js
β β βββ index.css
β βββ package.json
β
βββ README.md
Health check endpoint
Response:
{
"status": "healthy",
"message": "Vision Cart API is running"
}Identify products in an image and get shopping links
Request:
- Method:
POST - Content-Type:
multipart/form-data - Body:
image(file)
Response:
{
"success": true,
"message": "Found 2 product(s)",
"products": [
{
"product": "t-shirt",
"confidence": 92.5,
"shopping_links": [
{
"title": "Classic Cotton T-Shirt",
"price": "$19.99",
"link": "https://example.com/product",
"source": "Amazon",
"thumbnail": "https://example.com/image.jpg"
}
]
}
]
}- Video upload and frame-by-frame analysis
- Real-time video processing with OpenCV
- Multiple object detection per frame
- User authentication and saved searches
- Personalized product recommendations
- Advanced filtering options (price range, brand, etc.)
- Comparison view for similar products
- Mobile app (React Native)
cd frontend
npm run build
vercel --prod- Heroku: Push to Heroku with Procfile
- Railway: Connect GitHub repo
- DigitalOcean: Deploy to App Platform
- AWS EC2: Traditional server deployment
- Make sure Python 3.8+ is installed
- Check that all dependencies are installed:
pip install -r requirements.txt - Verify API keys are in
.envfile
- Ensure backend is running on port 5000
- Check CORS settings in Flask app
- Verify the API URL in
ImageUploader.jsis correct
- Try uploading clearer, higher-resolution images
- Ensure good lighting in photos
- Use images with products clearly visible
- Try different Clarifai models for specific product types
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
MIT License - feel free to use this project for learning or commercial purposes
- Built with Clarifai for AI-powered product recognition
- Powered by SerpApi for shopping search
- UI inspired by modern e-commerce platforms
Vision Cart - Making shopping smarter with AI π