GithubHelp home page GithubHelp logo

trisha-tech / onlinebooksales Goto Github PK

View Code? Open in Web Editor NEW
50.0 1.0 79.0 1.05 MB

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.

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

License: MIT License

JavaScript 92.81% HTML 2.98% CSS 3.68% Dockerfile 0.53%
css gssoc24 html javascript nodejs reactjs

onlinebooksales's Introduction

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

Our Contributors ❤️

Thank you for contributing to our repository

Contributors

💙 Thank You !!! 💙

onlinebooksales's People

Contributors

amit429 avatar arpcoder avatar artigaund avatar ashish-jha94 avatar asymtode712 avatar cwatr avatar gyanendra-baghel avatar mhusain22 avatar monika3002 avatar nalindalal avatar naman197 avatar officeneerajsaini avatar pani2004 avatar pradnyagaitonde avatar priyanshu2631 avatar rithikasundaram avatar sahi123-cloud avatar sanmarg avatar sneha0019 avatar subhash23jan avatar suhanipaliwal avatar swataswayam-14 avatar taneeshaa15 avatar thevijayshankersharma avatar tonystark-47 avatar trisha-tech avatar varda003 avatar varsani2520 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

onlinebooksales's Issues

Customer profile page UI

Customer profile page will have certain section like

  1. personal setting -> from where customer can modify their details.
  2. my order -> history of books order list
  3. my wishlist
  4. change password
  5. option to add location ( where they want delivery)

Missing CONTRIBUTING.md File in Repository

The repository currently lacks a CONTRIBUTING.md file, which is an important resource for guiding potential contributors on how to engage with the project effectively. A CONTRIBUTING.md file outlines the contribution guidelines, coding standards, and procedures for submitting pull requests, thus streamlining the contribution process and ensuring consistency across contributions.

Could you please assign this issue to me under GSSOC 24.

Girlscript Summer of Code Introduction/Tracking

👋 Hi @Trisha-tech,

I am Prince,web developer(Core Team) Girlscript Summer of Code. I'll be collaborating with you on preparing your repo for GSSoC'24 Program

Why are these changes required?
After Analysing last year's contributions and feedback it would be great for students to have a couple of standard readme files on the repo to understand what the project is all about and some issues detailing what they can contribute. This will help you to see increased engagement in your repository as well.

As mentioned students get a chance to learn step by step, how to build this project as well as invite mentors to collaborate and add features to this repo. I will generate issues, which will provide guidance on how to prepare your repo for Girlscript summer of code 2024.

This issue will serve as a tracking issue to track all issues related to GSSoC'24. I recommend creating a new branch for every issue and opening a pull request to track changes so we can effectively collaborate with each other and merge changes when you and I feel like those changes are ready to be merged on your primary branch.

If you have any questions or concerns, please feel free to leave a comment on this issue or any of the other issues that are generated.

I look forward to working with you :octocat:

Enhancements: Structured File Organization, Standardized Coding Approach, Home Page, Token-based Authentication

Title: Enhancements: Structured File Organization, Standardized Coding Approach, Home Page, Token-based Authentication

Summary:

Structured file organization, standardized coding approach, added home page, implemented token-based authentication for login.

Description:

I've made several improvements to the project:

  1. Structured File Organization: The files are organized in a structured manner, enhancing navigation and understanding.
  2. Standardized Coding Approach: Followed a standard coding approach to improve readability and maintainability.
  3. Added Home Page: Implemented a home page and ensured users are redirected back to it after login, improving the user experience.
  4. Token for Login: Implemented token-based authentication for login, setting the groundwork for future authentication-related functionalities.

Additional Notes:

  • Navbar and footer styling are pending and will be addressed in future updates.
  • The token implementation provides a foundation for future authentication-related features.
Untitled.video.-.Made.with.Clipchamp.mp4

Should i raise PR

[FEATURE] Add a animated Onboarding tour of website.

The animated onboarding tour feature provides new users with a guided introduction to our website's interface,

Engaging animations will be used to draw attention to important elements of the interface.
By using React Onboarding Libraries, we can implement a quick go through of our website .

Eg.
react-joyride-example

Adding cart routes and models

Adding a cart feature to the project enhances its functionality and user interaction. It allows users to simulate a shopping experience, adding items to their cart for future reference or checkout.
I would like to work on cart routes and schema
will you assign this for me? @Trisha-tech

Rearranging all models

@Trisha-tech
when user deletes, then cart should be deleted, but since user and cart are different collections, we can't do this

we can have order and cart list in the user schema
whenever user deletes, then his order and cart details would be deleted. From this, we can reduce the database storage, it's easy to get details without co mplex queries and we can reduce times as well.
if this idea works for your application
Could you please assign this work?

Enhancing the read me file

I can document all the features and tech stack used adding additional info about them and also alternative way is not mentioned to use the repository. Please assign this issue to me.

Suggest a Theme for the Project

The project's frontend part is starting from scratch. This requires cooperation from everyone.

Everyone's views are important to create this project successfully. Hence, you are free to suggest any idea which can be valuable for this project.

For example: Colour scheme, logo design, features, pages designs, etc.

Add Topics

In GSSoC'24, GitHub Topics will help the discoverability of your project.

I see that you already have great topics on your repository!
I would recommend adding the name of the company like the software you use to build like "vs-code, ghdesktop" to improve your discoverability.

If you are happy with the topics you have, feel free to close this issue. 👍

Create a Frontend Server using React

Currently, the project is having only backend. A frontend server have to be create so that we can connect backend with the frontend.

Preferred language should be JavaScript. Framework can be React (preferred). If not, you are free to suggest your thoughts.

Design a Logo for this project

Currently, the project is having the name "OnlineBookSales".

Design a logo based on this name or if you have any better idea, kindly share with us.

Can't open the url provided by the admin

Hey I'm actually new to open source and development, and I think the root path ("/") was deployed on render, so we actually can't see the website, and whenever I run the project in my local system, im getting this mongoose error, I think because of the atlas db.
This is the screenshot of the error I was getting while running it locally could you help me out with it.
Screenshot 2024-05-12 at 12 44 23 PM

Add Detail Page as the User Clicks on the Book

I would like to work on the design when a user clicks a particular book the details of the book could be viewed
-Book Thumbnail
-About the author
-Title of the Book
-Price of the Book with a selection of currencies
-Quantity
-Add to Cart
-Reviews from the Readers
-Book Suggestions

Add issues

As the maintainer of a Collaborate repo, keeping Issues up-to-date will help the student community understand what they can do to contribute. Issues should vary by the easy (update documentation) to the difficult (add a new feature). The more involved you are, the more opportunities there are to collaborate.

Recommendations:

Add issues of varying difficulty to the repo often. you must add the tag GSSoC'24, Level 1, Level2, Level 3 good first issue etc.
How we cacluclate the Scores on Leaderboard: Every PR one point
Level 1: 10 points
Level 2: 25 points
Level 3: 45 points
Try to add some documentation issues as well it would be easy for beginner contributor to explore opensource through your repo.
Generate issues even if you plan on solving them, so the repository appears as active.
Contribute/commit often to the repo so it does not go stale.
Reference https://github.com/Recode-Hive/Stackoverflow-Analysis/issues

Missing Code of Conduct File in Repository

Currently, the repository lacks a Code of Conduct file, which is an essential component for fostering a healthy and inclusive open-source community. A Code of Conduct serves as a guideline for expected behaviour, ensuring that contributors and participants feel safe, respected, and valued within our community space.

Please assign me this issue.

Design Product page UI

Want to design product page? UI, which will have different sections based on the category of book; each section will show the list of books in that category.

Automated Greeting Workflow

I propose to create a GitHub workflow named "Greetings". This workflow will automatically greet users who create new issues or pull requests in this repository. The Greeting will look like "Hi there! Thanks for opening this issue. We appreciate your contribution to this open-source project. We aim to respond or assign your issue as soon as possible."

Please assign this issue to me.

Login Form Data Mislabeling

Description:
On the login page, the form asks for the user's name, but upon submission, it requires the user's email for verification. This inconsistency in the labeling of the form fields could confuse new users, leading to login difficulties and potentially discouraging them from completing the login process.

Steps to Reproduce:

1.Visit the login page.
2.Observe that the form prompts for the user's name.
3.Enter a name into the provided field.
4.Attempt to submit the form.
5.need to guess by own that it requires email.
Expected Behavior:
The form should accurately label the fields required for login. If the email address is needed for verification, it should be clearly specified on the form.

Impact:
This inconsistency in labeling could lead to user confusion, frustration, and abandonment of the login process. It may result in a negative user experience and potential loss of user engagement.

Proposed Solution:

Update the login form labels to accurately reflect the information required for login and verification.
Clearly indicate the need for an email address for verification purposes on the form.
Ensure that the user interface provides clear instructions to guide users through the login process without confusion.
Attachments:
Screenshot 2024-05-12 181758

Add templates for issues

Issue templates are very helpful for a collaboration repo. When users identify a bug or want to add a new feature, you can provide templates so you can collect all the pertinent information you need to fix a bug or add a new feature.

We recommend creating a “Report Bug” and “Feature Request” issue template.
you can refer this: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository

Some suggested prompts/questions you can add to a “Report Bug” template are:

Briefly describe the bug
What is the expected behavior?
Please provide step by step instructions on how to reproduce the bug
Some suggested prompts/questions you can add to a “Feature Request” issue template are:

Briefly describe your feature request
What problem is this feature trying to solve?
How do we know when the feature is complete?

Reference: https://github.com/Recode-Hive/Stackoverflow-Analysis/issues/new/choose
Click on Get Started button and copy the template to your

Want to add this feature: Displaying books list

Hi @Trisha-tech , I want to add the section which displays the list of books available in the form of cards.
I want to include the following details in the card:
-Book Thumbnail.
-About the author.
-Title of the Book.
-Price of the Book with a selection of currencies.
-Rating of customers (in the form of stars).
-A click button which takes to the complete details of the book page.
Please assign me this task I have the relevant skills and I also want to contribute to this project under GSSoC'24.

Learn.md

Learn repos should have a LEARN.md file to teach student how to build your project step by step. You can explain how to build your project with text, code snippets, images, or even short (5 minute) long video lessons. As the maintainer of a Learn repo, the LEARN.md file requires you to think critically about how to explain the building of your project and how to also make it engaging. We don't expect you to be an expert teacher, but we would like you to reflect on how difficult it was to get to your level of knowledge, and then provide friendly guidance to help other students to learn.

Reference: https://github.com/Recode-Hive/Stackoverflow-Analysis/blob/main/Learn.md

Design a Home Page UI

The project requires a Home Page.

Suggest and design a Home Page UI which should be responsive, creative, having good User Interface and User Experience.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.