The backend of Kühlfrank is built as a REST API with Spring boot, Hibernate JPA and Auth0. It offers CRUD endpoints for inventory management and reicpe suggestion.
mvn clean install
mvn spring-boot:run
the app will start at localhost:8080
Building and running the docker image
mvn clean install
mvn spring-boot:build-image
docker run -p 8080:8080 -it backend:0.0.1-SNAPSHOT
Running the docker image form registry
You might have to login to the registry first. See this guide here.
docker pull ghcr.io/kuehlfrank/backend:latest
docker run -p 8080:8080 -it ghcr.io/kuehlfrank/backend:latest
Building and pushing the docker image
You might have to login to the registry first. See this guide here.
mvn clean install
mvn spring-boot:build-image
docker tag backend:0.0.1-SNAPSHOT ghcr.io/kuehlfrank/backend:latest
docker push ghcr.io/kuehlfrank/backend:latest
Method
URL
Description
Example response
GET
/inventory
Lists all Inventoryentires of current users Inventory
200 Ok
POST
/inventory/inventoryEntry
Adds a new inventoryEntry (Item)
DELETE
/inventory/inventoryEntry/{inventoryEntryId}
Deltes the inventoryEntry (Item)
PUT
/inventory/inventoryEntry/{inventoryEntryId}
(selective) Updates the InventoryEntry (Item)
Method
URL
Description
Example response
GET
/recipes/suggestions
Get (overview) recipe suggestions bases on current users Inventory
200 Ok
GET
/recipes/suggestions/suggestion/{recipeId}
Get a user specific detailed suggestion for the recipe
200 Ok
GET
/recipes/random
Get a random recipe suggestion
200 Ok
Method
URL
Description
Example response
GET
/units
Get all units ordered by name
200 Ok
Method
URL
Description
Example response
POST
/ensureRegistered
ensures the current authenticated user is registerd in kuehlfranks database and has an inventory assigned
200 Ok or 201 Created
Method
URL
Description
Example response
GET
/ingredients/find?q={query}&limit={limit}
suggests one or multiple ingredient names which best match the given user input string
200 Ok