This project implements a "Products Review Blog" using Node.js technology and the Express framework. The blog provides a platform where users can log in, view products with reviews and ratings, submit their own reviews, receive product recommendations, and log out of their accounts.
- User Authentication: Users can log in with their username and password.
- Product Reviews: Display products along with reviews and ratings.
- User Reviews: Users can submit reviews and ratings for products.
- Recommendations: The system suggests recommended products for users.
- Logout: Users can log out of their accounts.
- Node.js
- Express
- MongoDB with Mongoose
- JWT for authentication
- Other relevant dependencies
To run the project locally, follow these steps:
- Clone the repository.
- Install dependencies using
npm install
. - Set up your MongoDB database.
- Configure environment variables.
- Run the application using
npm start
.
The API provides the following endpoints:
- POST /login: User login with username and password.
- GET /products: Fetch all products with reviews and ratings.
- POST /products/:productId/reviews: Submit a review for a specific product. POST /products/reviews/batch: Submit a review for multiple products.
- GET /recommendations: Get recommended products for the user.
- POST /logout: Log out the user.
For detailed API documentation, refer to the API Documentation.
The Entity-Relationship Diagram (ERD) illustrates the overall structure and relationships in the system.
Contributions are welcome! Fork the repository, create a branch, and submit a pull request.
This project is licensed under the MIT License.