- Overview
- Key Features
- Tech Stack
- Getting Started
- Project Structure
- Usage Guide
- API Endpoints
- Machine Learning Model
- Contributing
- License
- Author
- Acknowledgments
ShopSmart AI revolutionizes online shopping with intelligent, personalized product recommendations. Our system analyzes user behavior and product attributes to suggest items that match individual preferences, enhancing the shopping experience and increasing engagement.
-
AI-Powered Recommendations
- Content-based filtering for similar product suggestions
- Real-time personalized recommendations
- Trending products discovery
-
User Experience
- Clean, responsive interface
- Secure authentication system
- Intuitive product search
- Interactive product browsing
-
Admin Features
- Product management
- User analytics
- Recommendation performance tracking
| Category | Technologies |
|---|---|
| Backend | Python, Flask, Flask-SQLAlchemy |
| Frontend | HTML5, CSS3, JavaScript, Bootstrap 5 |
| Database | MySQL |
| ML | scikit-learn, pandas, NumPy |
| Deployment | Local development (Flask built-in server) |
- Python 3.7 or higher
- MySQL Server 8.0+
- pip (Python package manager)
- Git (for version control)
-
Clone the repository
git clone https://github.com/yourusername/ShopSmart-AI.git cd ShopSmart-AI -
Set up a virtual environment
# For Windows python -m venv venv .\venv\Scripts\activate # For macOS/Linux python3 -m venv venv source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Database Setup
CREATE DATABASE ecom;
-
Update Configuration Modify
app.pywith your database credentials if needed:app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://username:password@localhost/ecom'
-
Run Migrations
flask db upgrade
-
Start the Application
python app.py
-
Access the Application Open your browser and navigate to:
http://localhost:5000
ShopSmart-AI/
├── app.py # Main application entry point
├── config.py # Configuration settings
├── requirements.txt # Python dependencies
├── README.md # Project documentation
├── static/ # Static files
│ ├── css/ # Stylesheets
│ ├── js/ # JavaScript files
│ └── img/ # Image assets
├── templates/ # HTML templates
│ ├── base.html # Base template
│ ├── index.html # Home page
│ ├── auth/ # Authentication templates
│ └── products/ # Product-related templates
└── models/ # Data models and ML components
├── clean_data.csv # Processed product data
└── trending_products.csv # Trending items data
-
Registration & Login
- Create a new account or log in with existing credentials
- Secure password hashing ensures data protection
-
Browsing Products
- View trending products on the homepage
- Click on products for detailed information
- Use the search functionality to find specific items
-
Getting Recommendations
- The system analyzes your interactions
- Personalized recommendations appear on your dashboard
- Discover new products based on your preferences
Our recommendation system uses:
- Content-Based Filtering
- TF-IDF vectorization for product descriptions
- Cosine similarity for finding similar items
- Product feature extraction and analysis
def get_recommendations(product_id, num_recommendations=5):
# TF-IDF Vectorization
tfidf = TfidfVectorizer(stop_words='english')
tfidf_matrix = tfidf.fit_transform(products['description'])
# Calculate cosine similarity
cosine_sim = cosine_similarity(tfidf_matrix, tfidf_matrix)
# Get recommendations
idx = product_id_to_index[product_id]
sim_scores = list(enumerate(cosine_sim[idx]))
sim_scores = sorted(sim_scores, key=lambda x: x[1], reverse=True)
sim_scores = sim_scores[1:num_recommendations+1]
return [index_to_product_id[i[0]] for i in sim_scores]We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
eshaan
- Email: eshaank@my.yorku.ca
- Dataset provided by Walmart e-commerce
- Flask and scikit-learn documentation
- Open-source community for invaluable tools and libraries
- All contributors who helped improve this project