Giter Club home page Giter Club logo

go-foosball's Introduction

Foosball tournament applications

Go CI build JS CI build Go Report Card codecov

Go-foosball is an application to manage your foosball tournaments. It supports multiple tournaments, and you can easily add players and tables. Each players receives a rating based on a chess like rating system (Elo).

Screenshot

The application is using a REST service back-end written in Go and a front-end created using TypeScript and React.

Run

Start the application on MacOS using:

./go-foosball-darwin

or on Linux:

./go-foosball-linux

or on Windows:

go-foosball.exe

The GUI can then be accessed using [http://localhost:8080/]

Use --help to list command line options - e.g.:

./go-foosball-darwin --help

This will output:

Usage of ./go-foosball-darwin:
  -db string
        the database file (default "foosball.db")
  -debug
        enable debug
  -port uint
        the port number (default 8080)

Build

Build the back-end using:

make build

or

go build -o go-foosball

Go must be installed.

The front-end will be embed in the back-end executable when build using:

make client build

but back-end and front-end can also run separately. To only build the front-end use:

cd client
pnpm build

To only start the front-end use:

cd client
pnpm start

Node.js version 14 or above and Yarn must be installed.

Test

Test the back-end using:

make test

or

go test -cover ./...

Test the front-end using:

cd client
pnpm test

Swagger

make swagger

or

$(go env GOPATH)/bin/swag init

Swagger can be viewed using [http://localhost:8080/swagger/index.html]

go-foosball's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

robbingdahood

go-foosball's Issues

Improve random games

Games are generated using Go rand.Shuffle, but creating games this way results in many identical games which is not optimal. Games should instead be created by finding all possible combinations of the available players.

The new "shuffle" method should have signature like:

func GameCombinations(players []*model.TournamentPlayer, tables []*model.TournamentTable) []*model.Game {
	var games []*model.Game

        ...	 

	return games
}

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.