This is a simple game service that is used to authenticate users, get the leaderboard and submit user scores.
You can access these actions using gRPC. All client and server code are generated at https://github.com/xis/game/tree/main/internal/proto.
The login action is used to authenticate the user. It returns a JWT token that is used to authorize the user in the other actions.
The register action is used to create a new user.
The get leaderboard action is used to get the latest leaderboard of the game.
The submit user score action is used to submit the user score to the game. Triggered when a match is finished. If the user score is higher than the previous score, the user score is updated. If not the user score is not updated.
git clone git@github.com:xis/game.git
git clone https://github.com/xis/game.git
go mod download
You can find the required environment variables in the .env.example
file.
go run cmd/main.go