Contacts Book Application
Architecture
This application has three modules -
- gRPC Backend
- JSON API Backend (
json-api
directory) - React Frontend (
react-ui
directory)
Request and the response flows are as follows:
- Request: React Frontend -> JSON API Backend -> gRPC Backend
- Response: gRPC Backend -> JSON API Backend -> React Frontend
Install Dependencies
- Install yarn -
npm install --global yarn
- Install
protoc
compiler. - GRPC tools npm package:
npm install --global grpc-tools
- Install
protoc
js plugin npm package: npm install --global protoc-gen-js-grpc
Code Generation
These commands generate gRPC client stub and server stub from proto files.
Running Application
Run all three modules in the following sequence -
gRPC Backend
go run main.go
JSON API Backend
cd json-api
cp .env.example .env
yarn dev
React Frontend
cd react-ui
cp .env.example .env
yarn dev