STEM Tetris

Tetris leaderboard for the STEM Team

GitHub

Description

I made this to have a leaderboard for a fundraising Tetris competition hosted by my school's STEM Team. It runs on App Engine, with Datastore as the database. The frontend is written in React, and updates live from the server with a WebSocket. Whenever a new score is added from the admin interface, it is automatically added to the leaderboard without any page refresh.

The idea is that the leaderboard could be projected somewhere, while whoever's running the competition can run around with a phone putting in scores.

Project Readme

stem-tetris

Tetris leaderboard for the STEM Team

Getting started

This project runs on GCP, so to run it locally you will need the gcloud CLI with the Datastore emulator installed. Also, to build the app, you will need webpack, webpack-dev-server, and of course node installed.

Then:

# Clone the repo...
git clone https://github.com/MKA-Stem/stem-tetris.git
cd stem-tetris

# ... Then start the app.
yarn dev-db &     # Start the database in the background
yarn dev-client & # Start webpack-dev-server in the background
yarn dev-server & # Start the API server in the background

GCP

To deploy to GCP manually, run yarn build before gcloud app deploy. This builds the static frontend.

This project has Travis set up, so any successful Travis build will push to GCP with client-secret.json for authentication.