Hey, let's make this repo all much rich as possible by contributing more endpoints. Follow the contribution guidelines, make open source contributions and make your github profile to standout. Check the Postman collection attached in this repo, this would help you to test API endpoints.
- API for listing all categories - GET
/categories
- Create new category - POST
/categories
- View category details - GET
/categories/:id
- List categorywise products - GET
/categories/:id/products
- Update category - PATCH
/categories/:id
- Delete a category - DELETE
/categories/:id
- Upload category images
- API for listing all products - GET
/products
- Create new product - POST
/products
- View product details - GET
/products/:id
- Update product - PATCH
/products/:id
- Delete a product - DELETE
/products/:id
authentication(auth-token in request header)-login required
- Place review - POST
/review/placereview
- View user's reviews - GET
/review/user/:id
- View product's reviews - GET
/review/product/:id
- Update a review - PATCH
/review/:id
- Delete a review - DELETE
/review/:id
Users can signup to this application using email and password. User model has the following attributes: email (type: string), password (type: string), address(type: string). Have used JWT for user authentication module in this project and have hashed password with salt to store securly in the database. Also JSON request body validations are provided in the setup.
- API for user signup - POST
/auth/createUser
- API for user signin - POST
/auth/login
- API to get user details - GET
/auth/getUser
authentication(auth-token in request header) required - API to update user details - PATCH
/auth/updateUser
authentication(auth-token in request header) required - API for user signout - GET
/auth/logout
authentication(auth-token in request header) required - API to get username from DB's document _id - GET
/auth/getUsername/:id
To display usernames for public reviews on products
Banners are image sliders that are present in amazon homepage. Banner model should have the following attributes: bannerImage, isActive (type: boolean), linkedToUrl (type: string).
- API for listing all active banners - GET
/banner
- Create new banner - POST
/banner/createBanner
- Get a specific banner - GET
/banner/:id
- Update banner - PATCH
/banner/:id
- Delete a banner - DELETE
/banner/:id
Users can place orders for multiple products which are saved in the user's cart on the frontend part which can be retained at login. Order model has the following attributes: user (ref), orderItems (array of items), quantity (Number), status (pending, confirmed, shipped, delivered, cancelled), orderItemTotal, discount, shipping, grandTotal (Number), paymentMode (cod, card, online etc.), paidAmount (Number, Will be filled once payment made).
authentication(auth-token in request header)-login required
- API for listing all orders of an user - GET
/order
- Create new order - POST
/order/placeOrder
- View order details - GET
/order/:id
- Update an order - PATCH
/order/:id
- Cancel an Order - DELETE
/order/:id
Multiple saved products in the cart together bought at the final checkout are merged together in an array as a single order document with grandTotal. ConfirmedOrder model has the following attributes: user (ref), order (array of ordered product ids), shippingAddress, paymentMode (cod, card, online etc.), paidAmount (Number, Will be filled once payment made).
authentication(auth-token in request header)-login required
- Place the final confirmed order - POST
/order/confirmOrder
- Get previous comfirmed order history of an user - GET
/order/confirmedOrder
- Deprevate an order from the history - DELETE
/order/confirmedOrder/:id
- Make sure you understand the requirement well.
- Fork this repository to your github account.
- Do the changes and create a Pull Request.
- Remember the PR should have clean code, proper comments, proper commits with messages.
- Many others can also make PR, but the most complete one will be merged.
- You can also create PR for this Readme, if you have any relevant module in mind for this repo, to make it even more awesome!!