A simple project to show how to do a good architecture using gRPC and Protocol Buffers
The application simulate a simple wish list, we can create a list and add/modify/remove items to your wish list and we'll can export your wish list to csv, to import for example to google spreadsheet.
Item
┌───────────────────┐
WishList │ ID │
┌───────────────────┐ │ WishListID │
│ ID │ │ Name │
│ Name │<---───────│ Link │
│ Status │ │ Price │
└───────────────────┘ │ Priority │
│ Status │
└───────────────────┘
To compile our proto files on Go, first of all, we must have installed the plugin to the protocol buffer compiler
$ go get -u github.com/golang/protobuf/protoc-gen-go
And obviously the tool to compile our files, protoc
And then we could compile our files
protoc -I proto --go_out=plugins=grpc:internal/net/grpc proto/*.proto
or using our Makefile
make gen-proto
- Improve
README.md
with more info (usage, etc) - Add unit & e2e testing
- Add more features (use cases)
- Do an extensive code review (and suggest code improvements)
- Implement a real storage
- Apply gRPC best practises
- Improve error handling on gRPC layer
- Add missing GoDoc comments
- Use
gateway
to expose an HTTP API - Use
middlewares
for observability - Evaluate if
id
must be provided from outside