GithubHelp home page GithubHelp logo

game's Introduction

Game

This is a simple game service that is used to authenticate users, get the leaderboard and submit user scores.

  1. Game
  2. Actions in the Service
    1. Login
    2. Register
    3. Get Leaderboard
    4. Submit User Score
  3. Running the Service
    1. Clone the repository
      1. Using SSH
      2. Using HTTPS
    2. Install dependencies
    3. Prepare the environment
    4. Run the service

Actions in the Service

You can access these actions using gRPC. All client and server code are generated at https://github.com/xis/game/tree/main/internal/proto.

1. Login

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.

2. Register

The register action is used to create a new user.

3. Get Leaderboard

The get leaderboard action is used to get the latest leaderboard of the game.

4. Submit User Score

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.

Running the Service

1. Clone the repository

Using SSH

git clone [email protected]:xis/game.git

Using HTTPS

git clone https://github.com/xis/game.git

2. Install dependencies

go mod download

3. Prepare the environment

You can find the required environment variables in the .env.example file.

3. Run the service

go run cmd/main.go

game's People

Contributors

xis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.