/Mern_Stack_Ecommerce-Part-03

MERN_STACK_ECOMMERCE_PROJECT-REACT-REDUX-EXPRESS-NODE-MONGODB-COMPLETE-PART-03 ( Even our Back-end is 90% Complete )

Primary LanguageJavaScript

Mern_Stack_Ecommerce-Part-03

MERN_STACK_ECOMMERCE_PROJECT-REACT-REDUX-EXPRESS-NODE-MONGODB-COMPLETE-PART-03 ( Even our Back-end is 90% Complete )

BACKEND USER ROUTER API's :-

  1. Now we are going to create user routes, If a user wants to see his profile or check his profile details, and or if that user wants to update his profile, and wants to update the password, then we will set up a function to do the same thing and set up a route.
  2. After creating user route If the user wants to check his profile after logging in from our website, then he cannot.
  3. Now after this I am going to make the change password route, by going this route we can easily change the password.
  4. Now I am going to create admin route, so that what the admin can do in this website by going to admin route.
  5. Here the admin can go to the profile of any user and update the role of that user (eg: - If someone is a user in our website, then he can only access the product and purchase it, but the admin can change that user's role from user to admin. If he becomes an admin, then all that power comes with the admin) So we are going to make a route for this so that the admin can do this thing only on the admin panel, so that the admin has to go to the database again and again.
  6. After this, we will create another function and set its route, with the help of which the user wants to enter the review of any product, then he can put it, then we are going to create its function inside the products controller file so that any user can easily enter the review. inside the product.
  7. Now we create another function to see all the reviews given in the product and we will also set its route, and we are going to create this function inside the product controller file.

MAKING ORDER API :-

  1. For this first we have started creating order schema, we will create it inside the orderschema file inside the model folder.
  2. After this we will create order controller file in which we will keep creating functions related to all orders. First function we will create by name new order.
  3. With this we will create so many functions inside the order controller file ( newOrder, getSingleOrder, myOrder, getAllOrders, updateOrder, deleteOrder ) and also we will set the route of all these inside the order router file, and to perform all these functions Along with this, we will also keep testing all the routes, so that we can know whether our route is doing less than right or not.
  4. Even our backend is 90% complete. There is only a little left, such as: - It is left to add the payment method which we will use in stick, and cloudnary is left, which is to be used to use the image, and we will do this work while doing the front-end.

* After that I start working on the Front-End and Part-4 will upload the code od Front-End in the Repository file.*