Teamplanner stores your teams lineup and matches and provides an easy method to record your teammates' availability for each match.
It consists of a RESTful API written in Go and backed by buntdb. It can be used with the included PWA.
Build the container with
docker build -t teamplanner .
and run it:
docker run -dp 8042:8042 --name teamplanner teamplanner
The app listens on :8042 by default and port 8042 is exposed from the container. You can override it by setting the LISTENADDR environment variable.
You should use a reverse proxy to handle HTTP termination if you want to expose it to the internet.
The database is by default stored at /data/teamplanner.db. Mount /data to a volume or use a bind mount to persist it over container restarts.
You can also change the location of the database by setting the environment variable DBPATH to the absolute path of the file.
Technically it's also possible to store the database completely in memory by setting DBPATH to :memory:.
Returns all teammates as JSON array.
Returns the given teammate.
Returns all votes by the given teammate as array
Sets (i.e. creates or updates) a teammate. The request body MUST contain the data as JSON object.
Returns all matches as JSON array.
Returns the given match.
Returns all votes for the given match as array
Sets (i.e. creates or updates) a match. The request body MUST contain the data as JSON object.
Returns all votes as array
Creates or updates a vote. The request body MUST contain the data as JSON object
{
"type": "object",
"properties": {
"name": { "type": "string" },
"position": { "type": "number" },
"status": { "type": "number" }
},
"required: ["name", "position", "status" ]
}
Position is used as the identifier for the entity.
status has the possible values 0-2 for "Available", "Unavailable" and "Spare".
{
"type": "object",
"properties": {
"date": { "type": "date" },
"description": { "type": "string" }
},
"required: ["date", "description" ]
}
The date in the format YYYYMMDD is used as the identifier for the entity.
{
"type": "object",
"properties": {
"teammate": { "type": "string" },
"match": { "type": "string" },
"vote": { "type": "number" }
},
"required: ["teammate", "match", "vote" ]
}
teammate and match are references to the respective entities by their identifier.
vote has the possible values 0-2 for Yes, No, Maybe.
Currently there is no authentication or authorization whatsoever supported by the API. Use at your own risk, if you want to.
