{"id":13735708,"url":"https://github.com/JensForstmann/tmt2","last_synced_at":"2025-05-08T12:30:52.666Z","repository":{"id":49523477,"uuid":"295566655","full_name":"JensForstmann/tmt2","owner":"JensForstmann","description":"TMT2 - Tournament Match Tracker 2: Supervise/Manage Counter-Strike 2 matches with ease!","archived":false,"fork":false,"pushed_at":"2024-12-22T17:41:27.000Z","size":2076,"stargazers_count":28,"open_issues_count":6,"forks_count":7,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-12-22T18:31:08.195Z","etag":null,"topics":["counter-strike","counter-strike-2","cs2","cs2-bot","cs2-server-administration","cs2-tournament"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JensForstmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-14T23:57:52.000Z","updated_at":"2024-12-22T17:41:31.000Z","dependencies_parsed_at":"2023-10-27T17:33:48.559Z","dependency_job_id":"d1078a5d-f94c-4920-b697-d58447619c0b","html_url":"https://github.com/JensForstmann/tmt2","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JensForstmann%2Ftmt2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JensForstmann%2Ftmt2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JensForstmann%2Ftmt2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JensForstmann%2Ftmt2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JensForstmann","download_url":"https://codeload.github.com/JensForstmann/tmt2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253068358,"owners_count":21848796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["counter-strike","counter-strike-2","cs2","cs2-bot","cs2-server-administration","cs2-tournament"],"created_at":"2024-08-03T03:01:10.025Z","updated_at":"2025-05-08T12:30:52.384Z","avatar_url":"https://github.com/JensForstmann.png","language":"TypeScript","funding_links":[],"categories":["Software"],"sub_categories":["Gameserver Management"],"readme":"# TMT2 - Tournament Match Tracker 2\n\n[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/JensForstmann/tmt2/docker.yml?label=docker%20build)](https://github.com/JensForstmann/tmt2/actions/workflows/docker.yml)\n[![Docker Pulls](https://img.shields.io/docker/pulls/jensforstmann/tmt2)](https://hub.docker.com/r/jensforstmann/tmt2)\n[![Docker Image Size](https://img.shields.io/docker/image-size/jensforstmann/tmt2/latest?label=docker%20image%20size)](https://hub.docker.com/r/jensforstmann/tmt2)\n\n\n\nTMT is a tool that tracks/watches/observes a Counter-Strike 2 match.\n\nIt will keep track of matches and can interact with 3rd party applications like tournament systems,\nwebsites or others via a REST API and webhooks to send real time notifications.\n\n**FEATURES**\n\n- Fully configure the tournament match beforehand (and edit it after it's created)\n- Play how many maps you want in a series (BO1, BO2, BO3, BO*...)\n- Configure how to ban and pick maps \u0026 sides, even knife-for-side is supported\n- Support for workshop maps\n- Automatic map changes \u0026 side switches\n- Ingame chat commands for the players (see section [Ingame Chat Commands](#ingame-chat-commands))\n- Integrated support for round backups and rollbacks\n- REST API to fully control TMT from another system\n- Webhooks to receive real time updates\n- Loop Mode (TMT starts over after the match ends, useful for public servers)\n- Web frontend\n  - create new matches\n  - create presets for common match configurations\n  - list all matches\n  - show logs\n  - read and use ingame chat\n  - see players \u0026 teams\n  - rcon console\n  - manage pool of game servers (can be used for new matches)\n- **No server side plugin or mod needed**\n\n_Example screenshot: Banning a map from the map pool:_\n![Ban a map (screenshot)](docs/screenshot-ban-map.png)\n\n\n\n---\n\n\n\nTable of Contents:\n\n- [TMT2 - Tournament Match Tracker 2](#tmt2---tournament-match-tracker-2)\n  - [Getting Started](#getting-started)\n    - [Create you first Match](#create-you-first-match)\n    - [Ingame Chat Commands](#ingame-chat-commands)\n  - [Configuration](#configuration)\n  - [API](#api)\n  - [Security / Authentication](#security--authentication)\n    - [global access tokens](#global-access-tokens)\n    - [match specific access tokens](#match-specific-access-tokens)\n- [Development](#development)\n  - [Docker](#docker)\n  - [Install dependencies and run application in development mode](#install-dependencies-and-run-application-in-development-mode)\n  - [Build docker image](#build-docker-image)\n\n\n\n## Getting Started\n\nTMT2 is available on docker hub: https://hub.docker.com/r/jensforstmann/tmt2\n\nYou can either use a [docker compose file (compose.yaml)](compose.yaml) or run it directly with `docker run`:\n\n```sh\ndocker run --name tmt2 -d -p 8080:8080 jensforstmann/tmt2\n```\n\nData will be written within the container to `/app/backend/storage`.\nTo keep the files with different containers\nyou can either specify a docker volume or a path on the local system:\n\n```sh\n# docker volume\ndocker run --name tmt2 -d -p 8080:8080 -v dockerVolumeName:/app/backend/storage jensforstmann/tmt2\n\n# local host directory\ndocker run --name tmt2 -d -p 8080:8080 -v /home/tmt2/storage:/app/backend/storage jensforstmann/tmt2\n```\n\nThe matches which are neither finished nor stopped will be loaded on application start.\n\n\n\n### Create you first Match\n\nAfter running the container you can open the web frontend: http://localhost:8080\n(or at whatever ip/server your docker container runs on.)\n\n\n\n_Example screenshot: Create a new match from the web frontend (both dark and light mode available):_\n![Create a new match (screenshot)](docs/screenshot-create-match.png)\n\n\n\nEven without an admin token you can create and manage matches (but only your own ones).\nIf you want to know your admin token (a random one is generated at startup)\neither take a look at the `access_tokens.json` file\nor take a look at the first lines of the log output (`docker logs tmt2`).\n\n\n\n### Ingame Chat Commands\n\nWhile TMT watches a match the player ingame can use chat commands to communicate with TMT:\n\n- `.team a` or `.team b` - you need to choose a team before you can execute any other commands,\n  check the response in the chat to be sure you've joined the right one,\n  also check the scoreboard (team names are visible there) if you're on the right side (CT/T)\n- during the map election process:\n  - `.ban` - ban a map from the map pool\n  - `.pick` - pick a map to be played\n  - `.agree` - agree on a map together with the opponent (alias `.map`)\n  - `.ct`/`.t` - select CT/T as your starting side\n  - `.restart` - restart the election process\n- during and after the knife round (if one takes place)\n  - `.restart` - restart the knife round\n  - `.ct`/`.t` - select CT/T as your starting side\n  - `.stay` - stay on your side\n  - `.switch` - switch the sides (alias `.swap`)\n- during the warmup\n  - `.ready` - set your team as ready (alias `.rdy`)\n  - `.unready` - set your team as not ready (alias `.unrdy`)\n- during the match\n  - `.pause` - pause the match at the next freezetime (alias `.tech`)\n  - `.unpause` - set your team as ready (alias `.ready` \u0026 `.rdy`)\n  - `.tac` - like pause, but uses up a tactical timeout for that team\n    (same as calling an ingame vote for a tactical timeout)\n\n\n\n## Configuration\n\nJust use these environment variables:\n\n```sh\n# http port that tmt listens on\nTMT_PORT=8080\n\n# the address the game server must send the logs to (from the pov of the game server)\n# if not set a tmtLogAddress must be for every match\nTMT_LOG_ADDRESS=http://127.0.0.1:8080\n\n# where tmt will store match data in\nTMT_STORAGE_FOLDER=storage\n\n# ingame prefix to every chat message sent by this application\nTMT_SAY_PREFIX=\"[TMT] \"\n```\n\n\n\n## API\n\nSee [`backend/swagger.json`](backend/swagger.json).\nYou might want to copy its content and paste it into https://editor.swagger.io/.\n\nSee also the [`examples`](examples) folder.\n\n\n\n## Security / Authentication\n\nThere are two types of authentication:\n\n- global access\n- match specific access\n\nGlobal access tokens have full permissions. Match specific ones can only access its own match.\n\nBoth are used in client requests in the Authorization header with a \"Bearer \"-prefix:\n\n    ...\n    Authorization: Bearer 2Mgog6ATqAs495NtUQUsph\n    ...\n\n\n\n### global access tokens\n\nGlobal access tokens are persisted in the storage folder in the file `access_tokens.json`.\n\nExample:\n\n```json5\n{\n    \"2Mgog6ATqAs495NtUQUsph\": { // that's the token\n        \"comment\": \"first auto generated token\" // optional comment, might be used in logging\n    },\n\n    // multiple tokens are also possible\n    \"knRRkV41yLBUw1eVwRD9VF\": {\n        \"comment\": \"Jens\"\n    },\n    \"vZQjPZBXRAK6yhCwoboxWk\": {\n        \"comment\": \"tournament system\"\n    }\n}\n```\n\nIf the file does not exist at startup a new one with a single auto generated global access token will be created.\n\n\n\n### match specific access tokens\n\nEvery match will have a `tmtSecret` property. This can be used in the same way as a global access token.\n\n\n\n---\n\n\n\n# Development\n\nAfter starting the dev processes you can reach the backend \u0026 frontend at:\n\n- Backend: http://localhost:8080\n- Frontend: http://localhost:5173\n\n\n\n## Docker\n\nDocker is recommended as it's easy to use and doesn't require any other software to be installed\n(if docker is already set up).\n\n\u003e *Note for windows user:*\n\u003e \n\u003e For better performance it's recommended to have docker (and this repo)\n\u003e installed **directly within** WSL (not using Windows Docker from WSL) or to run a Linux VM.\n\n```shell\n# Linux:\n./dev-container.sh\n```\n\n```powershell\n# Windows\n.\\dev-container.ps1\n```\n\n\n\n## Install dependencies and run application in development mode\n\nInstall dependencies:\n\n```sh\nnpm install\ncd backend\nnpm install\ncd ../frontend\nnpm install\n```\n\nRun backend with hot reloading:\n\n```sh\ncd backend\nnpm run dev\n```\n\nRun frontend with hot reloading:\n\n```sh\ncd frontend\nnpm run dev\n```\n\nRun both backend and frontend with hot reloading:\n\n```sh\nnpm run dev\n```\n\n\n\n## Build docker image\n\nTo build a docker image locally:\n\n```sh\ndocker build -t tmt2 .\n```\n\n\n\n---\n\n\n\n\u003e This project is a complete rewrite of the former [TMT](https://github.com/JensForstmann/CSGO-PHP-TournamentMatchTracker).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJensForstmann%2Ftmt2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJensForstmann%2Ftmt2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJensForstmann%2Ftmt2/lists"}