Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tonishantyadav/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.
https://github.com/tonishantyadav/storehub

auth0 java jwt mysql spring-boot swagger-ui

Last synced: 4 months ago
JSON representation

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.

Awesome Lists containing this project

README

        

# 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 ``

# 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

```bash
git clone https://github.com/tonishantyadav/storehub.git

```

2. Import the project into STS:

```bash
- Click File > Import...
- Select Maven > Existing Maven Projects and click Next
- Browse to the project directory and click Finish
```

3. Update the values in application.properties with your MySQL database connection details.
4. Run the app: Right-click the project in the Package Explorer and click Run As > Spring Boot App.

# API documentation

- API documentation is available via Swagger UI at http://localhost:8080/swagger-ui/index.html

# ER-Diagram

ER-Diagram

# Swagger-ui

Swagger-UI

# API Controllers

Auth_Controller
User_Controller
Address_Controller
Cart_Controller
Category_Controller
Product_Controller
Order_Controller

## Contributing

We welcome contributions! If you'd like to contribute to this project, please follow our [Contribution Guidelines](CONTRIBUTING.md).

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.