{"id":41619817,"url":"https://github.com/cohstats/coh3-stats","last_synced_at":"2026-02-15T20:05:21.568Z","repository":{"id":61925647,"uuid":"540948461","full_name":"cohstats/coh3-stats","owner":"cohstats","description":"COH3 Stats - Leaderboards, PlayerCards, Matches, Statistics for players, Unit stats and much more!","archived":false,"fork":false,"pushed_at":"2026-02-08T09:54:57.000Z","size":769116,"stargazers_count":31,"open_issues_count":35,"forks_count":19,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-08T16:26:29.796Z","etag":null,"topics":["company-of-heroes-3","hacktoberfest","nextjs","react","typescript"],"latest_commit_sha":null,"homepage":"https://coh3stats.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cohstats.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"ko_fi":"cohstats"}},"created_at":"2022-09-24T19:45:29.000Z","updated_at":"2026-02-01T16:49:33.000Z","dependencies_parsed_at":"2023-10-16T04:13:40.289Z","dependency_job_id":"781d72be-1cce-4b29-8ff6-f66d4410b0a1","html_url":"https://github.com/cohstats/coh3-stats","commit_stats":null,"previous_names":[],"tags_count":236,"template":false,"template_full_name":null,"purl":"pkg:github/cohstats/coh3-stats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cohstats%2Fcoh3-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cohstats%2Fcoh3-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cohstats%2Fcoh3-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cohstats%2Fcoh3-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cohstats","download_url":"https://codeload.github.com/cohstats/coh3-stats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cohstats%2Fcoh3-stats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29487806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T19:29:10.908Z","status":"ssl_error","status_checked_at":"2026-02-15T19:29:10.419Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["company-of-heroes-3","hacktoberfest","nextjs","react","typescript"],"created_at":"2026-01-24T13:30:02.680Z","updated_at":"2026-02-15T20:05:21.563Z","avatar_url":"https://github.com/cohstats.png","language":"TypeScript","funding_links":["https://ko-fi.com/cohstats"],"categories":[],"sub_categories":[],"readme":"# COH3 Stats\n\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/cohstats/coh3-stats)\n[![DeepScan grade](https://deepscan.io/api/teams/15780/projects/22550/branches/667770/badge/grade.svg)](https://deepscan.io/dashboard#view=project\u0026tid=15780\u0026pid=22550\u0026bid=667770)\n![Uptime Robot ratio (30 days)](https://img.shields.io/uptimerobot/ratio/m795263234-6c03132c5b21b08d1534fe1d?label=uptime%2030%20days)\n[![Discord](https://img.shields.io/discord/959118129240350740?style=flat\u0026label=Chat%20on%20Discord)](https://discord.gg/jRrnwqMfkr)\n\nWebsite https://coh3stats.com/\n\nWe are looking not only for developers but anyone who would like to contribute\nin building the best site with most info for Company of Heroes 3. All the data will\nbe open source for anyone to use! We need people to get the data from the game\n/ organize the data. Come up with layouts and much more.\n\nAnyone can put a hand in building this site. Please consider joining our [Discord](https://discord.gg/jRrnwqMfkr).\n\nWe have open sourced our underlying data https://coh3stats.com/other/open-data\n\n- Leaderboards, Matches \u003c\u003c which we scrape and get from Relic API\n- Data (definitions / images ) which \u003c\u003c which we get from the game files\n\n## Localization\n\nThe website supports multiple languages through locale files located in `public/locales`. English (EN) is the source of truth for all translations.\n\nTo contribute translations:\n\n1. Check the current status of translations in our [localization issues](https://github.com/cohstats/coh3-stats/issues?q=label%3Alocalization%20)\n2. Find the locale files in `public/locales` directory\n3. Compare your target language files with the English versions in `public/locales/en`\n4. Submit translations through a pull request or Discord\n\n## Getting Started with development\n\nMaster branch is deployed to https://dev.coh3stats.com/\n\nFirst install dependencies:\n\n```bash\nyarn install\n```\n\nRun the development server:\n\n```bash\nyarn dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\nYou can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.\n\nBefore making an MR please create an issue describing what you want to change and how you want to change it so we can have some discussion. Furthermore, it avoids multiple people working on the same thing.\n\nFeel free to create a fork and make an MR. Before PR you can test your code with `yarn build` to make sure it builds.\nYou can also run `yarn build:slim` to build the app without prerendering all the pages. This is useful for faster development.\n\nAlso make sure the prettier is right `yarn fix` and `yarn test`\n\nDevelopment conventions:\n\n- Name the files with `-` instead of camelCase. Eg `color-scheme-toggle.tsx`\n- Try not to add any more eslint warnings (Don't worry if you don't know how to solve it though, we can solve on MR)\n- Prettier and eslint should cover the rest (Don't forget to run it)\n- We are using [Mantine](https://mantine.dev/) component library\n- You can find the routing for pages in the folder `pages` (includes SSR code, data fetching, etc)\n- You can find the implementation of the React code for each page in the folder `screens` (includes the UI code)\n- You can find the components in the folder `components` (includes the UI code which is reused across the app)\n\n## Development approach\n\n### How to:\n\n#### Add new map image and name\n\nMaps are specified in https://github.com/cohstats/coh3-stats/blob/master/src/coh3/coh3-data.ts#L284\n\n#### Utilize images from the game\n\nYou can use the function getIconsPathOnCDN where you can pass the image name or the full path and it should automatically\nresolve it on our hosting\nhttps://github.com/cohstats/coh3-stats/blob/master/src/utils.ts#L22\nIf the image is not found there, you can always add it to the /public folder.\n\n### How to update the data after a new game patch\n\n1. Go to https://github.com/cohstats/coh3-data and generate the new data as per readme\n2. Create a new tag in coh3-data as per readme\n3. Update config.ts in the root\n4. Add the patch into object patches\n5. Update latestPatch variable with the key of the new patch\n6. If new maps has been added - fix them in src/coh3/coh3-data.ts\n7. Run the project and verify that all pages work as expected\n\n### How to update the sitemap after adding new pages\n\nYou can run the [automated workflow](https://github.com/cohstats/coh3-stats/actions/workflows/sitemap.yml) in GitHub for this.\n\nOr manually you can do the following:\n\n1. Run `yarn build`\n2. Run `yarn sitemap`\n3. Check changes in `public/sitemap.xml`\n4. If the pages are not there, you can add them manually in `next-sitemap.config.js`\n5. Commit the changes\n\nFor more info see readme at https://www.npmjs.com/package/next-sitemap\n\n##### Generating the links to all units:\n\nWe have a special script for that.\n\n1. You need Node 19+\n2. Run\n\n```\nnpx --yes ts-node --compiler-options \"{\\\"module\\\":\\\"commonjs\\\"}\" scripts/unit-paths.ts \u003e unit-paths.txt\n```\n\n### NextJS development\n\n#### We would like to have most of the pages which require some data SSR ( Server Side Rendered).\n\nhttps://nextjs.org/docs/basic-features/data-fetching/get-server-side-props.\n\nExample pages:\n\n- Home Page\n- Player Cards\n- Leaderboards\n- ...\n- Generally any page which loads data from DB or API\n\n#### The rest of the pages should be SSG (Static Site Generation).\n\nExample pages:\n\n- Unit Stats\n- ...\n- Generally any page which doesn't load any data from API\n\n#### Reasons:\n\n- Because it's a public website, SSR pages will be much better read by search engines and it will provide an overall better experience.\n- All the data fetching (from DB, cloud functions and other) should happen in SSR, so that we can offer site avaliabily everywhere, as GCP services are blocked in\n  some countries ( China, Russia).\n- The SSR functions have the capability to connect to public APIs, retrieve data from Firestore, and invoke cloud functions when necessary.\n- The SSR functions should remain lightweight. For extensive data computations, utilize Cloud Functions on GCP, enabling performance control.\n- The complete source code for our Next.js frontend will be available in this repository and will be open source.\n- The BE of the CF will be closed source because, we will most likely connect to sensitive APIs.\n\n![image](https://user-images.githubusercontent.com/8086995/217599315-ff660c70-e9d6-4e99-88b9-c4ea21892433.png)\n\n## COH3 Stats technology stack\n\nApp platform:\n\n- Firebase\n\nFrontend:\n\n- NextJS (React) as main technology used\n- Edgio as a hosting platform\n- Mantine as a component library\n\nBackend:\n\n- GCP Cloud\n- Firebase Cloud Functions - in TypeScript\n- Database:\n  - Firestore - stats, players, matches\n  - GCP Storage (leaderboards, matches)\n\n### Additional domains\n\n- cdn.coh3stats.com - Contains all the images | hosted on Firebase hosting\n- storage.coh3stats.com - Contains matches and leaderboards | hosted on GCP Storage\n- cache.coh3stats.com - Cache for API calls\n- data.coh3stats.com - CDN for the data files hosted at Github - coh3-data repo\n\n### History of deployments\n\n#### NextJS App\n\n- Edgio - for many years - ended because edgio ended their sites services\n- Vercel - briefly - ended, because they are counting ISR as SSR, we have a LOT of ISR content, it was becoming really expensive,\n  also we have quite high traffic over the world and vercel was not caching from single resource.\n- Netlify - briefly - it was better than Vercel, but it ended, because they are become quite expensive\n- AWS - SST deployment - this work quite well, we were able to nicely integrate with other services at AWS, however we\n  added localization support for many languages. This moved the amount of unique pages to millions and google / bing and LLM bots are keen\n  on visiting them all - one day we got quite big Lambda bill from AWS.\n- Self Hosted Docker with Coolify on VPS - currently setup, flat rate\n\n### High level architecture - outdated\n\n![image](https://user-images.githubusercontent.com/8086995/217594185-93c7d83a-cb5f-4b93-a26d-bcc32d805d41.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcohstats%2Fcoh3-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcohstats%2Fcoh3-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcohstats%2Fcoh3-stats/lists"}