{"id":21410658,"url":"https://github.com/srikarveluvali/searchly","last_synced_at":"2026-05-11T09:34:14.839Z","repository":{"id":264107620,"uuid":"892392412","full_name":"SrikarVeluvali/Searchly","owner":"SrikarVeluvali","description":"Searchly is a sophisticated AI-powered product recommendation system that leverages cutting-edge technologies to provide personalized shopping experiences. Users can interact with an AI chatbot for tailored product suggestions, save their favorite items, and explore curated recommendations. ","archived":false,"fork":false,"pushed_at":"2025-01-02T02:16:36.000Z","size":306,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T04:41:52.999Z","etag":null,"topics":["agent-based-modeling","e-commerce","flask","generative-ai","groq","reactjs","web-scraping"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SrikarVeluvali.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-22T02:55:15.000Z","updated_at":"2025-01-02T02:16:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"12c0502d-5faf-4908-86e4-b270b24a6f69","html_url":"https://github.com/SrikarVeluvali/Searchly","commit_stats":null,"previous_names":["srikarveluvali/searchly"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SrikarVeluvali%2FSearchly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SrikarVeluvali%2FSearchly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SrikarVeluvali%2FSearchly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SrikarVeluvali%2FSearchly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SrikarVeluvali","download_url":"https://codeload.github.com/SrikarVeluvali/Searchly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243910814,"owners_count":20367545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-based-modeling","e-commerce","flask","generative-ai","groq","reactjs","web-scraping"],"created_at":"2024-11-22T17:40:58.862Z","updated_at":"2026-05-11T09:34:09.811Z","avatar_url":"https://github.com/SrikarVeluvali.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Searchly: AI-Powered Product Recommendation System\n\nWelcome to **Searchly**, your go-to AI-powered e-commerce assistant! Searchly is a cutting-edge product recommendation system designed to deliver highly personalized shopping experiences. Powered by **AI-driven algorithms**, **real-time data scraping**, and a **modern frontend**, Searchly bridges the gap between user intent and the perfect product match.\n\n---\n\n## Table of Contents\n\n1. [Features](#features)\n2. [Project Structure](#project-structure)\n3. [Architecture Diagram](#architecture)\n4. [Tech Stack](#tech-stack)\n5. [Workflow Diagram](#workflow)\n6. [Setup Instructions](#setup-instructions)\n7. [Detailed Component Overview](#detailed-component-overview)\n    - [Backend](#backend)\n    - [Frontend](#frontend)\n8. [Usage](#usage)\n9. [API Endpoints](#api-endpoints)\n10. [Screenshots](#screenshots)\n11. [Contributing](#contributing)\n\n---\n\n## Features\n\n- **AI Chat Assistant**: \"Aivy\" guides users through product discovery with natural language queries.\n- **Personalized Recommendations**: Provides tailored suggestions based on user preferences.\n- **Favorites Management**: Add and remove products from a personal favorites list.\n- **Search Filters**: Sort and filter products by price, ratings, and relevance.\n- **Real-Time Product Scraping**: Fetch live product data for up-to-date recommendations.\n- **Secure Authentication**: Secure user registration and login with JWT tokens.\n- **Responsive Design**: Works seamlessly across devices.\n\n---\n\n## Project Structure\n\n```\n📁 Searchly\n├── 📁 client (Frontend)\n│   ├── 📁 public\n│   ├── 📁 src\n│   │   ├── 📁 components\n│   │   ├── 📁 data\n│   │   ├── App.js\n│   │   ├── index.js\n│   │   └── Tailwind CSS config files\n│   └── package.json\n├── 📁 server (Backend)\n│   ├── app.py\n│   ├── scrape_web.py\n│   ├── 📁 .env (Configuration variables)\n│   └── requirements.txt\n├── README.md\n```\n\n---\n## Architecture Diagram\n![Workflow](https://github.com/user-attachments/assets/4862b7ab-3111-4cc9-897e-ea5b2a052140)\n\n\n---\n\n## Tech Stack\n\n### Backend:\n- **Python** (Flask)\n- **MongoDB** for data persistence\n- **Pinecone** for vector similarity search\n- **HuggingFace Embeddings** for query-product matching\n- **Groq API** for AI-based query understanding\n- **BeautifulSoup/Requests** for web scraping\n\n### Frontend:\n- **React** for UI\n- **Framer Motion** for animations\n- **Tailwind CSS** for styling\n- **Lucide Icons** for vector icons\n\n---\n## Workflow Diagram\n![Workflow](https://github.com/user-attachments/assets/085f2d73-51e3-48d2-99aa-fc7f9460d456)\n\n\n---\n\n## Setup Instructions\n\n### Prerequisites:\n1. **Node.js** (v14+)\n2. **Python** (v3.9+)\n3. **MongoDB** installed locally or hosted\n4. **Pinecone API Key**\n5. **Groq API Key**\n\n---\n\n### Backend Setup:\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/SrikarVeluvali/Searchly\n   cd Searchly/server\n   ```\n\n2. Create a virtual environment and activate it:\n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # For Windows: venv\\Scripts\\activate\n   ```\n\n3. Install the dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. Create a `.env` file with the following variables:\n   ```\n   GROQ_API_KEY=your_groq_api_key\n   PINECONE_API_KEY=your_pinecone_api_key\n   ```\n\n5. Run the server:\n   ```bash\n   python app.py\n   ```\n\n6. The server will run on `http://localhost:5000`.\n\n---\n\n### Frontend Setup:\n1. Navigate to the client folder:\n   ```bash\n   cd Searchly/client\n   ```\n\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n\n3. Run the development server:\n   ```bash\n   npm start\n   ```\n\n4. Access the application at `http://localhost:3000`.\n\n---\n\n### MongoDB Configuration:\n- Ensure MongoDB is running locally or connect to a hosted instance.\n- Update the database connection string in `app.py` if necessary.\n\n---\n\n## Detailed Component Overview\n\n### Backend\n\n#### Key Features:\n1. **AI Recommendations**:\n   - Processes user queries with the Groq API.\n   - Embeds and indexes product data using HuggingFace and Pinecone.\n\n2. **Data Management**:\n   - MongoDB manages user data, tags, and favorites.\n   - Handles CRUD operations for favorites and tags.\n\n3. **Web Scraping**:\n   - Dynamically fetches product details using `scrape_web.py`.\n\n---\n\n### Frontend\n\n#### Pages:\n1. **Landing Page**:\n   - Introduces users to Searchly's capabilities.\n\n2. **Authentication**:\n   - Secure login and registration via React.\n\n3. **AI Chatbot**:\n   - Interactive UI to converse with \"Aivy\" for product suggestions.\n\n4. **Product Recommendations**:\n   - Displays personalized product lists with sorting/filtering.\n\n5. **Favorites**:\n   - Displays saved products for quick access.\n\n#### Components:\n- **AuthScreen**:\n  - Handles login and registration flows.\n- **ChatbotPage**:\n  - Implements the AI assistant.\n- **FavouritesPage**:\n  - Manages user favorites.\n- **Products**:\n  - Renders the recommendation grid with search and filters.\n\n---\n\n## Usage\n\n1. Launch both the backend (`http://localhost:5000`) and frontend (`http://localhost:3000`).\n2. Navigate to `http://localhost:3000` to use the application.\n3. **Key User Actions**:\n   - Register/Login to create an account.\n   - Interact with the chatbot to get product suggestions.\n   - Add/remove products to/from your favorites.\n\n---\n\n## API Endpoints\n\nHere is a comprehensive list of all API endpoints in the provided code:\n\n### Authentication Endpoints\n\n- **`/userregister`** (POST): Registers a new user. Requires `name`, `email`, and `password` in the request body.\n- **`/userlogin`** (POST): Logs in an existing user. Requires `email` and `password` in the request body.\n\n---\n\n### Recommendation Endpoints\n\n- **`/recommend`** (POST): Handles user queries to generate AI-based product recommendations using Groq. Requires `query` and `email` in the request body.\n- **`/recommend_from_db`** (POST): Similar to `/recommend` but focuses on finding recommendations based on previously indexed products. Requires `query` and `email` in the request body.\n\n---\n\n### Favorites Management Endpoints\n\n- **`/add_favourite`** (POST): Adds a product to the user's favorites list. Requires `email` and `product` (product details) in the request body.\n- **`/get_favourites`** (POST): Retrieves the list of favorited products for a user. Requires `email` in the request body.\n- **`/remove_favourite`** (POST): Removes a product from the user's favorites list. Requires `email` and `product_url` (unique product URL) in the request body.\n\n---\n\n### Tag and Recommendation Retrieval Endpoints\n\n- **`/get_recommendations`** (POST): Retrieves product recommendations based on a user's stored tags. Requires `email` in the request body.\n\n---\n\n### Utilities\n\n- **`search_product(query)`** (Function): Helper function to scrape e-commerce websites (e.g., Amazon and Flipkart) for products based on a search query. This is not exposed as an endpoint but is used within `/recommend` and `/recommend_from_db`.\n\n\n---\n\n## Screenshots\n\n### 1. Landing Page\n![image](https://github.com/user-attachments/assets/c5f0377b-6a58-4388-8bed-b93aedb76540)\n\n### 2. AI Chatbot\n![image](https://github.com/user-attachments/assets/5b5152a7-3009-4cf1-a6de-35ae47318c59)\n\n### 3. Product Recommendations\n![image](https://github.com/user-attachments/assets/4b7de88b-e6e1-46e1-9942-42c7b62e1a4a)\n\n### 4. Favorites Management\n![image](https://github.com/user-attachments/assets/10cc55b9-28f3-477c-9e37-b4e38d155530)\n![image](https://github.com/user-attachments/assets/cfa3670f-3bae-4d50-8c1f-f3ed0a36fd25)\n\n\n---\n\n## Contributing\n\n1. Fork the repository.\n2. Create a feature branch:\n   ```bash\n   git checkout -b feature-name\n   ```\n3. Commit changes and push to your fork:\n   ```bash\n   git push origin feature-name\n   ```\n4. Open a pull request.\n\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrikarveluvali%2Fsearchly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrikarveluvali%2Fsearchly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrikarveluvali%2Fsearchly/lists"}