Website https://coh2stats.com/
With all the data, player cards, leaderboards, maps, stats, commanders, inte-bulletins and much more!
Desktop App here
For current match details, player information and other features.
This project is set to create new usage charts for the game COH2. And also create web access to leaderboards, player cards and recent matches for players. The author of the game doesn't provide any global statistics. And online leaderboards has been shutdown recently.
This project is inspired by coh2chart.com which has data only for years 2016-2017 after which it was shut down.
For open source data visit www.coh2stats.com/other/open-data
In case you will use the data, please mention the source and give a shout-out to the website coh2stats.com, thank you!
The project is created in Google Cloud with usage of Firebase. The main language of the project is set to be JavaScript. Which will be used on both FE and BE.
- FE - JavaScript, React
- BE - Serverless JS
- DB - FireStore (NoSQL DB)
GCP services to be used:
- Firebase Hosting - For hosting the website
- Firebase Firestore - NoSQL Database
- Firebase Cloud functions - Is the main backend for crawling and data processing
- GCP Pub/Sub - For messaging between the functions
- GCP Storage - For storing extra data
Thing to consider:
- There is a large amount of matches, we store them in the FireStore, however once you store the match. You don't do any changes to it, therefore it would be better to store them in the BigQuery where we could run our analysis more easily and it would be Faster and Cheaper.
Only web package is automatically deploy. Cloud functions need to be done manually for now.
Tagged versions are automatically deployed to https://coh2stats.com/
master branch is automatically deployed to https://dev.coh2stats.com
The repository is yarn workspace. Use yarn to manage this.
Do yarn install from the project root to install dependencies.
To run beautifier and linting:
yarn fix
Use Node version 16.x or as described in /packages/functions/package.json
- To start local web dev:
yarn web dev - Test:
yarn web test(located inpackages/web/src/tests) - Build:
yarn web build
The project includes a Dockerfile at the root for containerized deployment:
# Build the Docker image
yarn docker:build
# or
docker build -t coh2stats-web .
# Run the container
yarn docker:run
# or
docker run -p 3000:3000 coh2stats-webThe Dockerfile handles the Yarn workspaces monorepo structure and uses the root yarn.lock file.
BE has been moved to repo coh2-stats-be
- Run script
bulletinsAndCommanders.pywith correct path to your COH2 folder - Run script
fixCommanderImages.pyto fix the generated commanderData.json file - Copy the generated files
*ServerData.jsonintopackages/functions/src/libs/data/- bulletinServerData.json
- commanderServerData.json
- Copy the generates files
*Data.jsonintopackages/web/src/coh/data/- bulletinData.json
- commanderData.json
- Run formatter by using commander
yarn fix - Observe the changes
- Update the
packages/web/src/config.tsxwith the right date / patch name
Provided by Janne252 https://github.com/Janne252/coh2-replay-discord-bot/tree/master/data/scenario-preview-images
For mass reformats from .png to .webp - use Infraview https://www.irfanview.com/ (best image utility)