A full-stack e-commerce recommendation system website built with React and Node.js, featuring personalized product recommendations based on user reviews and interactions.
- User Authentication: Sign up and login system with unique user ID generation
- Product Browsing: Browse and search through smartphone products
- Personalized Recommendations: AI-powered product recommendations based on user preferences
- Product Reviews: Users can add and view product reviews
- Shopping Cart: Add products to cart and manage quantities
- Order Management: Place orders and track order history
- Product Likes: Like/favorite products for personalized recommendations
- User Profile: Manage user information including name, age, gender, and address
- React - UI library
- Vite - Build tool and dev server
- React Router - Client-side routing
- Axios - HTTP client
- Context API - State management
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - Database
- Mongoose - MongoDB object modeling
- CORS - Cross-origin resource sharing
- Node.js (v14 or higher)
- npm or yarn
- MongoDB database (local or Atlas)
git clone <repository-url>
cd RecommenderSystem_Websitecd backend
npm installCreate a .env file in the backend directory:
MONGO_URI=your_mongodb_connection_string
PORT=5001
FRONTEND_URL=http://localhost:5173
NODE_ENV=developmentcd frontend
npm installCreate a .env file in the frontend directory (optional for local development):
VITE_API_URL=http://localhost:5001/apiOr:
VITE_BACKEND_URL=http://localhost:5001To populate the database with sample data:
cd backend
npm run seed- Start the backend server:
cd backend
npm run devThe backend will run on http://localhost:5001
- Start the frontend (in a new terminal):
cd frontend
npm run devThe frontend will run on http://localhost:5173
Frontend:
cd frontend
npm run buildBackend:
cd backend
npm startMONGO_URI=mongodb://localhost:27017/recommender_db
PORT=5001
FRONTEND_URL=http://localhost:5173
NODE_ENV=developmentVITE_API_URL=http://localhost:5001/api
# OR
VITE_BACKEND_URL=http://localhost:5001The application is deployed on:
For detailed deployment instructions, see DEPLOYMENT.md
- Users can sign up with reviewer name, age, gender, and address
- System automatically generates a unique 26-character user ID
- Users are automatically logged in after signup
- Recommendations are based on user reviews and aspect-based sentiment analysis
- System uses cosine similarity to match user preferences with products
- Recommendations consider product ratings and popularity
The system includes a function to check if the recommendation model needs retraining:
- Triggers when total reviews reach 2,500 OR
- Triggers when total interactions (likes + orders) reach 3,000