EtienneDx / git-mentor

A git server with built-in tools for teaching programming
MIT License
2 stars 0 forks source link

Setup protobuf project #16

Closed EtienneDx closed 7 months ago

EtienneDx commented 9 months ago

APIs will be defined in protobuf to enforce proper typings between the projects.

The protobuf messages should then be turned into both typescript and rust in the relevant projects.

As a starter message, the login API can be defined as follow:


message LoginRequest {
  string email = 1;
  string password = 2;
}

// TODO: double check if this can be written in a better way
message LoginResponse {
  bool success = 1;
  optional string token = 2;
}
EtienneDx commented 7 months ago

After multipl attemps, I gave up on protobuf and solved this problem using poem. See #25