This application serves as a part of a coding challenge. It consists of two microservices:
-
recipe-service — A CRUD application for managing recipes (Quarkus + PostgreSQL)
-
price-calculator — A stateless service that calculates ingredient prices for a recipe
# Build both services
./local-build.sh
# Start PostgreSQL, price-calculator, and recipe-service
./local-run-env.sh-
Recipe UI: http://localhost:8080/index.html
-
Recipe API: http://localhost:8080/api/recipes
-
Price Calculator API: http://localhost:8082/api/prices/calculations
-
Health Check: http://localhost:8080/q/health
| Method | Path | Description |
|---|---|---|
GET |
|
List all recipes |
GET |
|
Get a recipe by ID |
POST |
|
Create a new recipe |
PUT |
|
Update a recipe |
DELETE |
|
Delete a recipe |
GET |
|
Calculate price for a recipe (calls price-calculator) |
curl -X POST http://localhost:8080/api/recipes \
-H 'Content-Type: application/json' \
-d '{
"title": "Scrambled Eggs",
"description": "Simple breakfast",
"difficulty": "EASY",
"preparationTime": 10,
"servings": 2,
"ingredients": [
{"name": "Eggs", "amount": 4, "unit": "PIECE"},
{"name": "Butter", "amount": 10, "unit": "GRAM"},
{"name": "Salt", "amount": 2, "unit": "GRAM"}
]
}'| Method | Path | Description |
|---|---|---|
POST |
|
Calculate prices for a list of ingredients |
+----------------+ REST +------------------+ | | --------------> | | | recipe- | | price-calculator | | service | <-------------- | (port 8082) | | (port 8080) | +------------------+ | | | | ---- JDBC ----> PostgreSQL (port 5432) +----------------+