Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.
/ leaderboard Public archive

Update scores on a leaderboard and broadcast changes in realtime across browers. Build with Lumen and Vue.js

Notifications You must be signed in to change notification settings

xhs345/leaderboard

Repository files navigation

General Information

Demo is build with Lumen for the back-end and Vue.js for the front-end. Pusher is used for realtime broadcasting/synconizing of scores.

Server Requirements

This demo was tested with a current version of Laravel Homestead, but other setups should work as well, as long as following minimum requirements are fulfilled:

PHP >= 5.5.9
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
MySQL/MariaDB/Sqlite3/Postgres

Installation instructions

  1. run composer install

  2. open file .env and adjust settings

  3. setup database according to name specified in .env file

  4. run php artisan migrate (will create "players" table in db)

  5. run php artisan db:seed (will create 6 player with a random name and random score)

Possible improvements I see

  • Add (unit)-tests to test functionality
  • replace jQuery with vue-resource, because jQuery is only really used for AJAX calls and vue-resource has less overhead
  • test other broadcasting driver (Redis)
  • I tried to use PHP and multiple database operations for this demo, which is possibly slower that a full front-end approach
  • Caching of player-list that clients request

About

Update scores on a leaderboard and broadcast changes in realtime across browers. Build with Lumen and Vue.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published