cohstats/coh2stats
About
Statistics, usage charts and other useful information for a game Company of Heroes 2
Science & EngineeringMeasured star growth
- in 24h
- Collecting history
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalCOH2 CHARTS, PLAYER STATS, LEADERBOARDS
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.
Open source data
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!
Technical description
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.
CI/CD
Only web package is automatically deploy. Cloud functions need to be done manually for now.
Prod
Tagged versions are automatically deployed to https://coh2stats.com/
Dev
master branch is automatically deployed to https://dev.coh2stats.com
Development
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
Web
- To start local web dev:
yarn web dev - Test:
yarn web test(located inpackages/web/src/tests) - Build:
yarn web build
Docker
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-web
The Dockerfile handles the Yarn workspaces monorepo structure and uses the root yarn.lock file.
Functions
BE has been moved to repo coh2-stats-be
Patch update steps for text bulletin / commander data
- 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
Images for maps
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)
Explore related projects
Loading…