This Git repository contains gRPC & entity definitions that are to be shared between client and
server of the site djin.dev using a common IDL language called
protobuf
. Server stubs will be generated in Go,
while client stubs will be generated in TypeScript. Upon committing to this repository, updated stubs
will be auto-generated and published into Buf.
Protobuf stubs are available in TypeScript on the client side via npm and Go modules on the server side.
Prerequisites: npm, TypeScript
After setting up your .npmrc
to use Buf's npm
registry via
npm config set @buf:registry https://npm.buf.build
Client-side stubs are available in TypeScript via
npm install @buf/grpc_web_andrewtsun25_djin
Note: This feature provided by Buf is currently in alpha.
Prerequisites: Go
Server-side stubs are available in Go via
go get go.buf.build/grpc/go/andrewtsun25/djin
Note: This feature provided by Buf is currently in alpha.
Prerequisites: Buf
Linting ensures correctness of protos and buildability.
buf lint
Last thing we want to do is to break compatibility with past versions of this API. This step checks for breaking changes.
buf breaking
This is the actual step that generates Go & TypeScript stubs locally.
buf generate