Skip to content

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.

Notifications You must be signed in to change notification settings

Varda003/OnlineBookSales

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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.

Using GitHub Desktop

Alternatively, you can use GitHub Desktop to manage this repository. Here's how:

  1. Download and Install GitHub Desktop:

    • Go to the GitHub Desktop website and download the GitHub Desktop application.
    • Follow the installation instructions to install GitHub Desktop on your computer.
  2. Clone the Repository:

    • Open GitHub Desktop and sign in to your GitHub account.
    • Click on the "File" menu, then select "Clone Repository..."
    • Choose the repository you want to clone from the list or enter its URL.
    • Choose the local path where you want to clone the repository and click "Clone".
  3. Make Changes:

    • After cloning the repository, you can make changes to the files locally using your preferred code editor.
  4. Commit Changes:

    • Once you've made changes, open GitHub Desktop.
    • You'll see a list of files with changes. Write a summary and description of your changes in the text fields.
    • Click "Commit to main" to commit your changes locally.
  5. Push Changes:

    • To push your changes to the remote repository on GitHub.com, click "Push origin".
  6. Pull Changes:

    • If there are changes on the remote repository that you don't have locally, you can pull them by clicking "Fetch origin" or "Pull origin".
  7. Sync Changes:

    • To synchronize your local repository with the remote repository, click "Sync" to push and pull changes in one step.

That's it! You can now use GitHub Desktop to manage this repository efficiently.

Table of Contents

  1. MVC Diagram
  2. Database Design
  3. Usecase Diagram
  4. Activity Diagram
  5. Screenshots of the Project
  6. Customer Database (MongoDB) Schema
  7. Product Database (MongoDB) Schema
  8. Order Database (MongoDB) Schema
  9. Customer Routes
  10. Product Routes
  11. Order Routes
  12. Middleware for Customer Authentication
  13. Middleware for Error Handler
  14. Implementation of JWT Token
  15. New Customer Registration Route/API
  16. Customer Login Route/API
  17. Get Customer Details Route/API
  18. Update Customer Profile Route/API
  19. Update Customer Password Route/APl
  20. Product Creation Route/API
  21. Get all Products (Admin) Route/API
  22. Get Product Details Route/API
  23. Update Product (Admin) Route/API
  24. Delete Product Route/API
  25. New Order Creation Route/API
  26. Get Single Order Route/API
  27. Get Logged in Customer Order Route/API
  28. Update Order Status (Admin) Route/API
  29. Delete Order(Admin) Route/API

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 !!! πŸ’™

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 88.3%
  • HTML 7.6%
  • CSS 4.1%