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

https://github.com/cankurttekin/productinventory

Web API developed using Spring Boot, Spring Data JPA and Spring Security. The purpose of this API is to provide an API that users can perform basic CRUD operations.
https://github.com/cankurttekin/productinventory

crud-api postgresql rest spring-boot spring-security spring-web

Last synced: 2 months ago
JSON representation

Web API developed using Spring Boot, Spring Data JPA and Spring Security. The purpose of this API is to provide an API that users can perform basic CRUD operations.

Awesome Lists containing this project

README

          

# ProductInventory

This is a Web API developed using **Spring Boot**, **Spring Data JPA** and **Spring Security**. The purpose of this API is to provide an API that users can perform basic **CRUD** operations.

## Technologies Used
- Java 17
- Spring Boot
- Spring Data
- PostgreSQL

## Endpoints

List of endpoints:



GET
/api/products
Retrieve all products
ROLE=EMPLOYEE

POST
/api/products
Create new product
ROLE=MANAGER

GET
/api/products/{id}
Retrieve product by id
ROLE=EMPLOYEE

PUT
/api/products/{id}
Update product by id
ROLE=MANAGER

DELETE
/api/products/{id}
Delete product by id
ROLE=ADMIN

DELETE
/api/products/
Delete all products!
ROLE=ADMIN

GET
/api/products/available
Retrieve all available products
ROLE=EMPLOYEE

## Database
Role and users are in two tables with passwords stored as **bcrytp hash**, primary key being user_id in a members table.


![Screenshot of a db er diagram.](/images/db-diagram.png)