storehub

StoreHub is a REST API built with Java and Spring Boot, featuring secure, scalable, and maintainable design. It uses Spring Data JPA for MySQL database management and Auth0 for secure authentication.

OTHER License

Stars
0
Committers
1

StoreHub

StoreHub is a REST API built using Java and Spring Boot, with security, scalability, and ease of maintenance. The backend uses Spring Data JPA to interact with a MySQL database, making it easy to manage and store important entities such as users, products, categories, orders, and more. User authentication is handled by Auth0, providing secure and reliable means of REST APIs. The APIs are well-documented and easily accessible through Swagger UI, making it simple for developers to test and understand the various endpoints. Overall, this project provides secure Rest APIs to create a scalable platform for businesses to sell their products to customers.

Features

Admin

  • Login
  • Users
  • Address
  • Categories
  • Products
  • Price & discount
  • Orders

User

  • Registration & Login
  • Fetch categories and products based on category
  • Adding & deleting products to cart
  • Managing address and products quantity
  • Ordering products and fetching order status

Security

  • The API is secured using JSON Web Tokens (JWT) handled by Auth0. To access the API, you will need to obtain a JWT by authenticating with the /login endpoint. The JWT should then be passed in the Authorize option available in the Swagger-ui.

    Example-

    • Authorization <your_jwt>

Technologies

  • Java 17 or above
  • Spring Boot 3.0
  • Maven
  • MySQL
  • Spring Data JPA
  • Spring Security
  • JSON Web Tokens (JWT)
  • Auth0
  • Swagger UI

Running the app

  1. Clone the repository
git clone https://github.com/tonishantyadav/storehub.git

  1. Import the project into STS:
- Click File > Import...
- Select Maven > Existing Maven Projects and click Next
- Browse to the project directory and click Finish
  1. Update the values in application.properties with your MySQL database connection details.
  2. Run the app: Right-click the project in the Package Explorer and click Run As > Spring Boot App.

API documentation

ER-Diagram

Swagger-ui

API Controllers

Contributing

We welcome contributions! If you'd like to contribute to this project, please follow our Contribution Guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Related Projects