/OnlineBookSales

This project named Online Book Sales - Backend deals with developing an e-commerce website for Online Book Sale. It provides the user with a catalog of different books available for purchase in the store. In order to facilitate online purchase, a shopping cart is provided to the user.

Primary LanguageJavaScript

OnlineBookSales-Backend

This project named Online Book Sales - Backend deals with developing an e-commerce website for Online Book Sale. It provides the user with a catalog of different books available for purchase in the store. In order to facilitate online purchase, a shopping cart is provided to the user. The system is implemented using a 3-tier approach, with a backend database, a middle tier of Node.js and Express.js, and a web browser as the front end client.

💥 Features

  • Registration and Login System.

✨ Link Of The Project

https://online-book-sales-backend.onrender.com/

📌 Tech Stack

linkedin portfolio twitter linkedin portfolio twitter twitter

How to Contribute

If you think that you can add a new feature or want to fix a bug, we invite you to contribute to Online Book Sales and make this project better. To start contributing, follow the below instructions:

  1. Create a folder at your desire location (usually at your desktop).

  2. Open Git Bash Here

  3. Create a Git repository.

    Run command git init

  4. Fork the repository.

  5. Clone your forked repository of project.

git clone https://github.com/<your_username>/OnlineBookSales.git
  1. Navigate to the project directory.
cd FunwithScience
  1. Add a reference(remote) to the original repository.
git remote add upstream https://github.com/Trisha-tech/OnlineBookSales.git
  1. Check the remotes for this repository.
git remote -v
  1. Always take a pull from the upstream repository to your main branch to keep it updated as per the main project repository.
git pull upstream main
  1. Create a new branch(prefer a branch name that relates to your assigned issue).
git checkout -b <YOUR_BRANCH_NAME>
  1. Perform your desired changes to the code base.

  2. Check your changes.

git status
git  diff
  1. Stage your changes.
git add . <\files_that_you_made_changes>
  1. Commit your changes.
git commit -m "relavant message"
  1. Push the committed changes in your feature branch to your remote repository.
git push -u origin <your_branch_name>
  1. To create a pull request, click on compare and pull requests.

  2. Add an appropriate title and description to your PR explaining your changes.

  3. Click on Create pull request.

Congratulations🎉, you have made a PR to the FunwithPhysics. Wait for your submission to be accepted and your PR to be merged by a maintainer.

How to run the webpage on your local system

  1. Go to the OnlineBookSales directory.
cd OnlineBookSales
  1. Write the command.
npm install
  1. For Frontend Go to 'client' directory write command

    npm install
    
  2. Write the command.

yarn start / npm start

If you have any doubts, please let us know in the comments.

MVC Diagram

image

Database Design

1. Customer Collections in MongoDB

image

2. Product Collections in MongoDB

image

3. Order Collections in MongoDB

image

Use-Case Diagram

image

Activity Diagram

1. Login Activity Diagram

image

2. Registration Activity Diagram

image

3. Admin Registration Activity Diagram

image

4. Admin Login Activity Diagram

image

5. User Activity Diagram

image

📸 Screenshots Of The Project

1. Customer Database (MongoDB) Schema

image

2. Product Database (MongoDB) Schema

image

3. Order Database (MongoDB) Schema

image

4. Customer Routes

image

5. Product Routes

image

6. Order Routes

image

7. Middleware for Customer Authentication

image

8. Middleware for Error Handler

image

9. Implementation of JWT Token

image

10. New Customer Registration Route/API

image

POST Request for Customer Registration

image

11. Customer Login Route/API

image

POST request from Customer Login

image

12. Get Customer Details Route/API

image

13. Update Customer Profile Route/API

image

Customer Details Update Route

image

14. Update Customer Password Route/API

image

15. Product Creation Route/API

image

POST request for Product Creation Route

image

16. Get All Products (Admin) Route/API

image

GET request for Get All Products Route

image

17. Get Product Details Route/API

image

GET request for Get Product Details Route

image

18. Update Product (Admin) Route/API

image

PUT request for Update Product Route

image

19. Delete Product Route/API

image

DELETE request for Delete Product Route

image

20. New Order Creation Route/API

image

POST request for New Order Creation Route

image

21. Get Single Order Route/API

image

GET Request for Get Single OrderRoute

image

22. Get Logged in Customer Orders Route/API

image

GET request for Get Logged In Customer Orders Route

image

23. Update Order Status (Admin) Route/API

image

PUT request for Update Order Staus Route

image

24. Delete Order (Admin) Route/API

image

DELETE request for Delete Order Route

image

💙 Thank You !!! 💙