We are building a microservice architecture using Golang and gRPC. The architecture consists of three services: User Service, Menu Service, and Order Service. The User Service handles authentication and registration, the Menu Service manages product creation and retrieval, and the Order Service handles order management. To streamline communication between services, we are implementing an API Gateway. The API Gateway acts as a central entry point, routing client requests to the appropriate microservices. This architecture allows for independent development, deployment, and scaling of services, while providing a unified interface for clients.
- Service Auth ==> https://github.com/lendral3n/KulinerKlasik-Microservices-gRPC-Service-Auth
- Service Menu ==> https://github.com/lendral3n/KulinerKlasik-Microservices-gRPC-Service-Menu
- Service Order ==> https://github.com/lendral3n/KulinerKlasik-Microservices-gRPC-Service-Order
- API Gateway: Handles incoming HTTP requests
- Auth Service: Provides features such as Register, Login and generates Token by JWT
- Menu Service: Provides features such as Add Menu, Decrease Stock and Find Menu
- Order Service: The only feature we ship in this Microservice is Create Order
STEP 1 :
We need to clone Service AuthSTEP 2 :
Setup the environment inlocal.env
likelocal.env.example
according to the settings on your localhostSTEP 3 :
Run command on project's terminal :go mod tidy
andgo mod vendor
to constructs a directory named vendor in the main module's root directory that contains copies of all packages needed to support builds and tests of packages in the main moduleSTEP 4 :
Run commandMake Server
orgo run cmd/main.go
as usualySTEP 5 :
Clone Service MenuSTEP 6 :
RepeatSTEP 2
untilSTEP 4
STEP 7 :
Clone Service OrderSTEP 8 :
RepeatSTEP 2
untilSTEP 4
STEP 9 :
Dont forget to doSTEP 2
untilSTEP 3
in this KulinerKlasik ServicesSTEP 10 :
Execute commandMake Server
orgo run cmd/main.go
(again) in this KulinerKlasik Services