A leaderboard webapp that uses ELO rating to determine the current rankings. Can be used for any games where a match results in a single winner and a single looser.
Run npm run deploy to build the scripts and stylesheet for production, and deploy the site to the web.
Run firebase emulators:start to run the site and database locally.
Run npm start to start the webpack development server.
This guide assumes you have cloned this Git repository, and have npm and the Firebase CLI installed.
- Add a new project on Firebase
- Provision Cloud Firestore by going to the Database tab in the Firebase Web Console and pressing Create database
- Run
firebase use YOUR_PROJECT_IDto set your newly created Firebase project - Run
npm installto install dependencies - Copy
.env.exampleto.env.deployand set your environment variables (.envis used during local development) - Run
npm run deployto build and deploy
The project uses a Firebase Firestore database as it's live backend.
The games collection provides temporary storage of the latest games entered into the system until they're downloaded locally by the management scripts.
| Field | Description |
|---|---|
| winner | Name of the winner |
| looser | Name of the looser |
| date | When the game was entered |
The players collection stores the current data for each player.
| Field | Description |
|---|---|
| rank | Current ELO rating |
| wins | Count of games won |
| losses | Count of games lost |