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.
- Registration and Login System.
https://online-book-sales-backend.onrender.com/
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:
-
Create a folder at your desire location (usually at your desktop).
-
Open Git Bash Here
-
Create a Git repository.
Run command
git init
-
Fork the repository.
-
Clone your forked repository of project.
git clone https://github.com/<your_username>/OnlineBookSales.git
- Navigate to the project directory.
cd FunwithScience
- Add a reference(remote) to the original repository.
git remote add upstream https://github.com/Trisha-tech/OnlineBookSales.git
- Check the remotes for this repository.
git remote -v
- 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
- Create a new branch(prefer a branch name that relates to your assigned issue).
git checkout -b <YOUR_BRANCH_NAME>
-
Perform your desired changes to the code base.
-
Check your changes.
git status
git diff
- Stage your changes.
git add . <\files_that_you_made_changes>
- Commit your changes.
git commit -m "relavant message"
- Push the committed changes in your feature branch to your remote repository.
git push -u origin <your_branch_name>
-
To create a pull request, click on
compare and pull requests
. -
Add an appropriate title and description to your PR explaining your changes.
-
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.
- Go to the
OnlineBookSales
directory.
cd OnlineBookSales
- Write the command.
npm install
-
For Frontend Go to 'client' directory write command
npm install
-
Write the command.
yarn start / npm start
If you have any doubts, please let us know in the comments.
Alternatively, you can use GitHub Desktop to manage this repository. Here's how:
-
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.
-
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".
-
Make Changes:
- After cloning the repository, you can make changes to the files locally using your preferred code editor.
-
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.
-
Push Changes:
- To push your changes to the remote repository on GitHub.com, click "Push origin".
-
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".
-
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.
- MVC Diagram
- Database Design
- Usecase Diagram
- Activity Diagram
- Screenshots of the Project
- Customer Database (MongoDB) Schema
- Product Database (MongoDB) Schema
- Order Database (MongoDB) Schema
- Customer Routes
- Product Routes
- Order Routes
- Middleware for Customer Authentication
- Middleware for Error Handler
- Implementation of JWT Token
- New Customer Registration Route/API
- Customer Login Route/API
- Get Customer Details Route/API
- Update Customer Profile Route/API
- Update Customer Password Route/APl
- Product Creation Route/API
- Get all Products (Admin) Route/API
- Get Product Details Route/API
- Update Product (Admin) Route/API
- Delete Product Route/API
- New Order Creation Route/API
- Get Single Order Route/API
- Get Logged in Customer Order Route/API
- Update Order Status (Admin) Route/API
- Delete Order(Admin) Route/API
1. Customer Collections in MongoDB
2. Product Collections in MongoDB
3. Order Collections in MongoDB
1. Login Activity Diagram
2. Registration Activity Diagram
3. Admin Registration Activity Diagram
4. Admin Login Activity Diagram
5. User Activity Diagram
1. Customer Database (MongoDB) Schema
2. Product Database (MongoDB) Schema
3. Order Database (MongoDB) Schema
4. Customer Routes
5. Product Routes
6. Order Routes
7. Middleware for Customer Authentication
8. Middleware for Error Handler
9. Implementation of JWT Token
10. New Customer Registration Route/API
POST Request for Customer Registration
11. Customer Login Route/API
POST request from Customer Login
12. Get Customer Details Route/API
13. Update Customer Profile Route/API
Customer Details Update Route
14. Update Customer Password Route/API
15. Product Creation Route/API
POST request for Product Creation Route
16. Get All Products (Admin) Route/API
GET request for Get All Products Route
17. Get Product Details Route/API
GET request for Get Product Details Route
18. Update Product (Admin) Route/API
PUT request for Update Product Route
19. Delete Product Route/API
DELETE request for Delete Product Route
20. New Order Creation Route/API
POST request for New Order Creation Route
21. Get Single Order Route/API
GET Request for Get Single OrderRoute
22. Get Logged in Customer Orders Route/API
GET request for Get Logged In Customer Orders Route
23. Update Order Status (Admin) Route/API
PUT request for Update Order Staus Route
24. Delete Order (Admin) Route/API
DELETE request for Delete Order Route
π Thank You !!! π