From 3f4afc779fead2c693acab5e205e75ae866252bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20=C4=8Cerpnjak?= Date: Sat, 16 Mar 2024 09:44:15 +0100 Subject: [PATCH 1/2] Update main.yml --- .github/workflows/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cfb3087..0e4e844 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,6 +38,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + - name: Start MongoDB + uses: supercharge/mongodb-github-action@1.10.0 + with: + mongodb-version: 7.0.6 + - name: Set up JDK 21 uses: actions/setup-java@v3 with: From d07451e3467b57093db950f750c7603e5fcd01b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20=C4=8Cerpnjak?= Date: Sat, 16 Mar 2024 09:51:25 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a8bea30..e044dbf 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ ## Overview This project serves as an example of food ordering system using a microservice approach. -## UserManagementAPI -Simple microservice for managing users, built using Spring Boot and Kotlin. +## User Management API [REST] +Simple REST API for managing users, built using Spring Boot and Kotlin. ### How to run @@ -16,7 +16,7 @@ Simple microservice for managing users, built using Spring Boot and Kotlin. ~$ docker-compose up ``` -UserManagementAPI will be avaiable on ```localhost:8080/api/v1```. Access Swagger ```http://localhost:8080/api/v1/swagger-ui/index.html```. +User Management API will be avaiable on ```localhost:8080/api/v1```. Access Swagger ```http://localhost:8080/api/v1/swagger-ui/index.html```. ### Unit Tests Before running unit tests, ensure that you have a local MongoDB instance running on ```localhost:27017```. @@ -27,3 +27,31 @@ Before running unit tests, ensure that you have a local MongoDB instance running - GET /api/v1/users/{id} - PUT /api/v1/users/{id} - DELETE /api/v1/users/{id} + +## Order Processing API [gRPC] +Simple gRPC API for managing users, built using Quarkus and Kotlin. + +### How to run + +```console +~$ cd OrderProcessingAPI +~$ docker-compose up +``` + +Order Processing gRPC API will be avaiable on ```grpc://localhost:9000```. + +### Unit Tests +Before running unit tests, ensure that you have a local MongoDB instance running on ```localhost:27017```. + +### Available gRPC Methods +``` +service OrderService { + rpc CreateOrder (Order) returns (Confirmation) {} + rpc GetOrder (GetOrderRequest) returns (Order) {} + rpc UpdateOrder (Order) returns (Confirmation) {} + rpc GetOrdersBySeller (GetOrdersRequest) returns (stream Order) {} + rpc GetOrdersByDeliveryPerson (GetOrdersRequest) returns (stream Order) {} + rpc DeleteOrder (DeleteOrderRequest) returns (Confirmation) {} + rpc Health (Empty) returns (Confirmation) {} +} +```