-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the official wiki for SmartRecommender, a comprehensive full-stack product recommendation platform. This wiki provides documentation on how to use, configure, and extend the system.
- Overview
- Getting Started
- Architecture
- Recommendation Algorithms
- Database Structure
- API Documentation
- Contribution Guidelines
- Troubleshooting
SmartRecommender is a full-stack platform that delivers personalized product recommendations by combining machine learning, uncertainty modeling, and user behavior analysis. The system enhances user experience through dynamic, intelligent suggestions based on real-world data.
Key Features:
- Advanced product recommendations using multiple algorithms
- Comprehensive admin dashboard with analytics
- Enhanced user experience with personalized suggestions
- Smart search functionality with typo tolerance
Tech Stack:
- Backend: Python, Django, PostgreSQL
- Frontend: React
- Machine Learning: scikit-learn
- Python 3.8+
- Node.js 14+
- PostgreSQL 12+
We provide ready-to-use startup scripts for both Windows and Linux:
Windows:
# Start backend
cd backend
start.bat
Start frontend (in a new terminal)
cd frontend
start.bat
Linux/macOS:
# Start backend
cd backend
chmod +x start.sh
./start.sh
cd frontend chmod +x start.sh ./start.sh
Backend (Django):
- Create and activate a virtual environment:
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install backend dependencies:
pip install -r requirements.txt
-
Configure your PostgreSQL database in
.env(see.env.examplefor template) -
Apply database migrations and seed data:
python manage.py migrate
python manage.py seed
- Start the backend server:
python manage.py runserver
The backend will be available at http://127.0.0.1:8000/.
Frontend (React):
- Navigate to the frontend directory:
cd frontend
- Install frontend dependencies:
npm install
- Start the frontend server:
npm start
The frontend will be available at http://localhost:3000/.
SmartRecommender follows a modern microservices architecture with clear separation between the frontend and backend components:
- Django REST Framework: Provides API endpoints for all functionality
- PostgreSQL Database: Stores product, user, and recommendation data
- ML Processing Modules: Implements the various recommendation algorithms
- React Application: Provides the user interface
- Redux State Management: Handles application state
- Material UI Components: Provides consistent styling
SmartRecommender implements six distinct recommendation approaches:
Recommends products based on purchase patterns of similar users. We implement both user-based and item-based collaborative filtering.
Recommends products with similar attributes to those a user has previously shown interest in.
Identifies products frequently bought together using the Apriori algorithm.
Provides intelligent search with typo tolerance and partial matching capabilities.
Analyzes customer reviews to recommend positively reviewed products.
Predicts user purchase probabilities and product demand using statistical methods.
The system uses PostgreSQL with a comprehensive schema of 24 interconnected tables:
- Users
- Products
- Categories
- Tags
- Orders
- Cart
- Complaints
- Similarities
- Interactions
- Associations
- Sentiment
- Purchase Patterns
- Risk Assessment
See the database documentation directory for complete database documentation and entity relationship diagrams.
| Endpoint | Method | Description |
|---|---|---|
| /api/auth/login/ | POST | User login |
| /api/auth/register/ | POST | User registration |
| /api/auth/logout/ | POST | User logout |
We welcome contributions to the SmartRecommender project! Please see CONTRIBUTING.md for details on how to submit changes.
- Fork the repository
- Create a feature branch
- Implement your changes
- Write or update tests
- Submit a pull request
- Python code follows PEP 8
- JavaScript code follows Airbnb style guide
- Use meaningful variable names and include comments
Problem: The Django server fails to start with database errors.
Solution: Check your database configuration in the .env file. Make sure your PostgreSQL server is running and the credentials are correct.
Problem: The React app shows API connection errors.
Solution: Ensure the backend server is running and check the API URL in the frontend's .env file.
Problem: The python manage.py seed command fails.
Solution: Check that your database migrations have been applied properly with python manage.py migrate.
If you encounter issues not covered here:
- Check the existing GitHub Issues
- Open a new issue with detailed information about your problem
- Contact the development team via GitHub
Welcome to the official wiki for SmartRecommender, a comprehensive full-stack product recommendation platform. This wiki provides documentation on how to use, configure, and extend the system.
- [Overview](#overview)
- [Getting Started](#getting-started)
- [Architecture](#architecture)
- [Recommendation Algorithms](#recommendation-algorithms)
- [Database Structure](#database-structure)
- [API Documentation](#api-documentation)
- [Contribution Guidelines](#contribution-guidelines)
- [Troubleshooting](#troubleshooting)
SmartRecommender is a full-stack platform that delivers personalized product recommendations by combining machine learning, uncertainty modeling, and user behavior analysis. The system enhances user experience through dynamic, intelligent suggestions based on real-world data.
Key Features:
- Advanced product recommendations using multiple algorithms
- Comprehensive admin dashboard with analytics
- Enhanced user experience with personalized suggestions
- Smart search functionality with typo tolerance
Tech Stack:
- Backend: Python, Django, PostgreSQL
- Frontend: React
- Machine Learning: scikit-learn
- Python 3.8+
- Node.js 14+
- PostgreSQL 12+
We provide ready-to-use startup scripts for both Windows and Linux:
Windows:
# Start backend
cd backend
start.bat
# Start frontend (in a new terminal)
cd frontend
start.batLinux/macOS:
# Start backend
cd backend
chmod +x start.sh
./start.sh
# Start frontend (in a new terminal)
cd frontend
chmod +x start.sh
./start.shBackend (Django):
- Create and activate a virtual environment:
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install backend dependencies:
pip install -r requirements.txt-
Configure your PostgreSQL database in
.env(see.env.examplefor template) -
Apply database migrations and seed data:
python manage.py migrate
python manage.py seed- Start the backend server:
python manage.py runserverThe backend will be available at http://127.0.0.1:8000/.
Frontend (React):
- Navigate to the frontend directory:
cd frontend- Install frontend dependencies:
npm install- Start the frontend server:
npm startThe frontend will be available at http://localhost:3000/.
SmartRecommender follows a modern microservices architecture with clear separation between the frontend and backend components:
- Django REST Framework: Provides API endpoints for all functionality
- PostgreSQL Database: Stores product, user, and recommendation data
- ML Processing Modules: Implements the various recommendation algorithms
- React Application: Provides the user interface
- Redux State Management: Handles application state
- Material UI Components: Provides consistent styling
SmartRecommender implements six distinct recommendation approaches:
Recommends products based on purchase patterns of similar users. We implement both user-based and item-based collaborative filtering.
[Detailed documentation](/.methods/collaborative_filtering.md)
Recommends products with similar attributes to those a user has previously shown interest in.
[Detailed documentation](/.methods/content_based_filtering.md)
Identifies products frequently bought together using the Apriori algorithm.
[Detailed documentation](/.methods/association_rules.md)
Provides intelligent search with typo tolerance and partial matching capabilities.
[Detailed documentation](/.methods/fuzzy_search.md)
Analyzes customer reviews to recommend positively reviewed products.
[Detailed documentation](/.methods/sentiment_analysis.md)
Predicts user purchase probabilities and product demand using statistical methods.
[Detailed documentation](/.methods/probabilistic_methods.md)
The system uses PostgreSQL with a comprehensive schema of 24 interconnected tables:
- Users
- Products
- Categories
- Tags
- Orders
- Cart
- Complaints
- Similarities
- Interactions
- Associations
- Sentiment
- Purchase Patterns
- Risk Assessment
See the [database documentation](/.database/) directory for complete database documentation and entity relationship diagrams.
| Endpoint | Method | Description |
|---|---|---|
/api/auth/login/ |
POST | User login |
/api/auth/register/ |
POST | User registration |
/api/auth/logout/ |
POST | User logout |
| Endpoint | Method | Description |
|---|---|---|
/api/products/ |
GET | List all products |
/api/products/<id>/ |
GET | Get product details |
/api/products/search/ |
GET | Search products |
| Endpoint | Method | Description |
|---|---|---|
/api/recommendations/user/<id>/ |
GET | Get user-based recommendations |
/api/recommendations/product/<id>/ |
GET | Get product-based recommendations |
/api/recommendations/similar/ |
GET | Get similarity-based recommendations |
| Endpoint | Method | Description |
|---|---|---|
/api/admin/dashboard/ |
GET | Get dashboard analytics |
/api/admin/sales/forecast/ |
GET | Get sales forecasts |
/api/admin/users/churn/ |
GET | Get churn risk assessment |
We welcome contributions to the SmartRecommender project! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to submit changes.
- Fork the repository
- Create a feature branch
- Implement your changes
- Write or update tests
- Submit a pull request
- Python code follows PEP 8
- JavaScript code follows Airbnb style guide
- Use meaningful variable names and include comments
Problem: The Django server fails to start with database errors.
Solution: Check your database configuration in the .env file. Make sure your PostgreSQL server is running and the credentials are correct.
Problem: The React app shows API connection errors.
Solution: Ensure the backend server is running and check the API URL in the frontend's .env file.
Problem: The python manage.py seed command fails.
Solution: Check that your database migrations have been applied properly with python manage.py migrate.
If you encounter issues not covered here:
- Check the existing [GitHub Issues](https://github.com/dawidolko/SmartRecommender/issues)
- Open a new issue with detailed information about your problem
- Contact the development team via GitHub