项目作者: tuommii

项目描述 :
Concurrent score tracking app for disc golf and golf. Made with Go & Vue. Live demo available. Automatic deployment with Github Actions.
高级语言: Go
项目地址: git://github.com/tuommii/scoreboard.git
创建时间: 2020-04-07T18:02:21Z
项目社区:https://github.com/tuommii/scoreboard

开源协议:

下载


Build Status
build






Scoreboard

Simple score tracker for golf and disc golf. Made with Vue & Go :heart:



:question: Motivation

It seems no one wants to be an accountant when we are playing. I wrote this so that the accountant can be switched in the middle of the game.

Created for mobile use. For best usability add app to homescreen.

:dart: Features

:heavy_check_mark: Live.
:heavy_check_mark: Create pars automatically if the user is close to a supported course.
:heavy_check_mark: Accountant can be switched in the middle of the game.
:heavy_check_mark: Easy to use.

:memo: Technical features

:heavy_check_mark: Demonstrates Go’s concurrency features nicely.
:heavy_check_mark: Server can save and restore it’s state.
:heavy_check_mark: Each game in memory has it’s own mutex instead of one global for all games.
:heavy_check_mark: Automatic deployment with Github Actions.
:heavy_check_mark: JSON structure is designed to be easily upgradable.
:heavy_check_mark: Azure Pipelines & Docker.
:heavy_check_mark: Good rendering time.
:heavy_check_mark: Hosted on DigitalOcean behind nginx.
:heavy_check_mark: nginx gzip & cache (may vary during development).

:question: How To Use It

Local development

Clone repo

  1. git clone https://github.com/tuommii/scoreboard.git

Start server

  1. cd scoreboard
  2. make

Start dev-server in a new terminal window

  1. cd frontend
  2. npm i
  3. npm run serve

Go to: http://localhost:8081

:trophy: Deploy

Every time when code is pushed to production branch, new binary will be compiled and sended to server.



Docker

Build

docker build . -t scoreboard

Run

docker run -p 8000:8000 scoreboard -port="8000" -static="public"

Example json

  1. {
  2. "id": "jt1",
  3. "basketCount": 1,
  4. "active": 1,
  5. "hasBooker": true,
  6. "baskets": {
  7. "1": {
  8. "orderNum": 1,
  9. "par": 3,
  10. "scores": {
  11. "Jian Yang": {
  12. "score": 3,
  13. "total": 0,
  14. "ob": 0
  15. },
  16. "Tiger King": {
  17. "score": 3,
  18. "total": 0,
  19. "ob": 0
  20. }
  21. }
  22. }
  23. },
  24. "createdAt": "2020-05-01T20:06:42.283050923+03:00",
  25. "editedAt": "2020-05-01T20:06:42.283052041+03:00",
  26. "name": "Default"
  27. }

Things to consider

Contributions are more than welcome

  • Create MVP
  • Circular navigation
  • Split frontend to Vue-components
  • Create my most played courses automatically based on location
  • Light theme because of sunshine
  • Let user choose basket count
  • Make UI suitable for desktop also
  • Use forced style guide for .vue-files
  • Create courses automatically in Helsinki/Finland/World
  • Add a lot of tests
  • Frontend router
  • Github actions
  • More server-side validations
  • If project grows much, refactor to vuex
  • PWA (Offline support)
  • User specific friends
  • Fix typos
  • UI improvements
  • Show spinner when waiting response
  • More organized CSS
  • CSS Animations
  • Random or selected avatars
  • Secure cookie
  • Sound effects
  • Copy id to clipboard

Finishing game

  • Create some graph
  • For some users add possibility store game to database (validate time spent)
  • When stats is implemented add support for marking OB (out of bounds)