Skip to content

kuehlfrank/backend

Repository files navigation

Build Status

Kühlfrank backend

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.

Running the backend

Running locally

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

Endpoints

Inventory

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)

Recipes

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

Units

Method URL Description Example response
GET /units Get all units ordered by name 200 Ok

User

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

Ingredients

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages