{"id":16380527,"url":"https://github.com/bastian/bstats","last_synced_at":"2025-04-05T01:04:15.584Z","repository":{"id":48141470,"uuid":"74682415","full_name":"Bastian/bStats","owner":"Bastian","description":"bStats collects data for plugin authors. It's free and easy to use!","archived":false,"fork":false,"pushed_at":"2025-02-26T18:23:10.000Z","size":1597,"stargazers_count":161,"open_issues_count":50,"forks_count":33,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-29T00:04:53.704Z","etag":null,"topics":["bstats","bukkit","bungeecord","metrics","minecraft","spigot","sponge"],"latest_commit_sha":null,"homepage":"https://bstats.org/","language":"Shell","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/Bastian.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":"2016-11-24T14:54:06.000Z","updated_at":"2025-03-20T01:55:27.000Z","dependencies_parsed_at":"2025-01-18T20:48:11.362Z","dependency_job_id":"f31383e3-81d7-4dff-b3ba-90d6da297942","html_url":"https://github.com/Bastian/bStats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bastian%2FbStats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bastian%2FbStats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bastian%2FbStats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bastian%2FbStats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bastian","download_url":"https://codeload.github.com/Bastian/bStats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271517,"owners_count":20911587,"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":["bstats","bukkit","bungeecord","metrics","minecraft","spigot","sponge"],"created_at":"2024-10-11T03:51:40.530Z","updated_at":"2025-04-05T01:04:15.565Z","avatar_url":"https://github.com/Bastian.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bStats\n\nThe parent repository of the [bStats] project.\n\n## Repository structure\n\nThis repository contains all bStats repositories as submodules. These are\n\n- `bstats-backend` - The backend of bStats.\n- `bstats-web` - The (new) frontend of bStats.\n- `bstats-legacy` - The original backend and frontend of bStats.\n- `bstats-metrics` - The Java-based metrics classes of bStats.\n\n\u003e Currently bStats is in a transition phase from the original backend + frontend\n\u003e to a complete rewrite. The \"live\" version of bStats is currently running with\n\u003e the old frontend and a combination of old and new backend. Which routes are\n\u003e served by which backend can be found in the nginx configuration at\n\u003e [`/prod/volumes/nginx/nginx.conf`](/prod/volumes/nginx/nginx.conf).\n\nThis repository also provides the development environment for bStats.\n\n## Clone repository\n\nWhen cloning the repository, it is recommended to use the `--recursive`\nflag to clone the repository with all submodules.\n\n```bash\ngit clone --recursive git@github.com:Bastian/bStats.git\n```\n\nAlternatively, you can also clone the submodules after cloning this parent\nrepository by running\n\n```bash\ngit submodule init \u0026\u0026 git submodule update\n```\n\n## Start Development\n\nThere are some prerequisites for development:\n\n- Docker\n- Linux. WSL2 is recommended for Windows. MacOS should work but is untested\n- GNU Make (should be available on most Unix systems)\n\nAdditionally, you need a Firebase account place the `firebase-config.json` file\nand the `service-account-file.json` file inside the `dev` directory (only for\nthe new frontend).\n\n- [Learn about the Google service account file]\n- [Learn about the Firebase config file]\n\nNext, rename the `/prod/postgres.env.example` file to `/prod/postgres.env` and\nreplace the `POSTGRES_PASSWORD` with a random (long) string of your choosing.\n\nThen you can start all services by running `make`. The services will run in\nDocker containers, thus no additional dependencies like Node.js and npm are\nrequired (even though it is recommended to have them installed for your IDE\ntooling).\n\n## Start Production\n\nThe `prod` directory contains the production environment for bStats. Similar to\nthe dev environment, you have to place the `firebase-config.json` file and the\n`service-account-file.json` file inside the `prod` directory.\nAdditionally, you have to update the `prod/volumes/bstats-legacy/config.json`\nfile with your Recaptcha secrets and replace the `sessionSecret` with a random\n(long) string of your choosing.\n\nYou can then start the services by running `make start-prod`.\n\n### Backups\n\nRedis and Postgres data is backed up to a remote server via SCP.\nCronjobs can be set up with the `add-backup-cronjobs.sh` script in the `prod`\ndirectory.\n\n### Disaster Recovery\n\nAssuming the worst happens and the current bStats server explodes. To get back\nup running, start the `prod` environment on a new server once and stop it after\nit has successfully started. Then place the backup Redis dumps (`dump.rdb`) in\nthe `prod/volumes/redis/node-\u003cx\u003em` directory. Make sure that the dump file is\nthe correct one for the current node. You can look at the\n`prod/volumes/redis/node-\u003cx\u003em/nodes.conf` file to find out for which key-range\nthe node is responsible.\nYou can then start the prod again and everything should work again (if it is a\nnew server with a new IP, you ofc also have to update the DNS settings in\nCloudflare).\n\n## License\n\nThis project is licensed under the [MIT License](/LICENSE).\n\n[bstats]: https://bStats.org\n[learn about the google service account file]: https://cloud.google.com/docs/authentication/getting-started\n[learn about the firebase config file]: https://firebase.google.com/docs/web/setup?authuser=0#config-object\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbastian%2Fbstats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbastian%2Fbstats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbastian%2Fbstats/lists"}