{"id":20606826,"url":"https://github.com/jochumdev/microlobby","last_synced_at":"2025-04-15T02:45:05.509Z","repository":{"id":44445760,"uuid":"428796174","full_name":"jochumdev/microlobby","owner":"jochumdev","description":"Warzone2100 MicroService lobby","archived":false,"fork":false,"pushed_at":"2022-09-26T05:37:51.000Z","size":1325,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T02:44:59.319Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jochumdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.spdx","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-16T20:00:49.000Z","updated_at":"2023-11-16T05:31:19.000Z","dependencies_parsed_at":"2023-01-18T17:46:58.958Z","dependency_job_id":null,"html_url":"https://github.com/jochumdev/microlobby","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/jochumdev%2Fmicrolobby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jochumdev%2Fmicrolobby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jochumdev%2Fmicrolobby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jochumdev%2Fmicrolobby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jochumdev","download_url":"https://codeload.github.com/jochumdev/microlobby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997087,"owners_count":21195797,"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":[],"created_at":"2024-11-16T09:34:48.680Z","updated_at":"2025-04-15T02:45:05.492Z","avatar_url":"https://github.com/jochumdev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MicroLobby - 3rd gen lobbyserver for Warzone 2100\n\nMicroLobby is the next, next gen lobbyserver for Warzone 2100 after [wzlobbserver-ng](https://github.com/Warzone2100/wzlobbyserver-ng).\n\n## Why another lobby\n\n- wzlobbyserver-ng is 10 years old, time for a new one\n- Allows registering names\n- Allows to verify users\n- Adds a new REST Protocol\n- Features are easy to add, like GameNetworkSockets, TOTP and others\n\n## Technical features\n\n- Requires only:\n  - podman\n  - docker-compose\n  - [Task](https://taskfile.dev/#/installation)\n- Everything in containers, leaves nothing on the Host except Podman/Docker volumes. \"task rm\" removes everything.\n- Automated migrations, migrating on start\n- gRPC+Protobuf internal, JSON/XML external\n- Argon2-id Hashes\n- JWT Tokens\n- Integrated RBAC K/V store -\u003e settings/v1\n- Loosely coupled Microservices\n- Fast to copy\u0026paste a service, easy to start a new one\n- Event System as example for IRC/Discord bots\n- Registry and Broker over NATS\n- Scale your db and everything else scales easy as it needs no Filesystem\n\n## Basic Architecture\n\nIt's written in Golang by using [go-micro.dev/v4](https://go-micro.dev) for simplicity. All communication happens over NATS.\n\nFor this project we have written 2 reuseable components:\n\n- [jo-micro/router](https://jochum.dev/jo-micro/router)\n- [jo-micro/auth2](https://jochum.dev/jo-micro/auth2)\n\nThe draw.io flowchart for the Architecture:\n![Micro Service Architecture](/docs/micro-service-architecture.png)\n\n## Services\n\n### settings/v1 Service\n\nBasic Key/Value Store with Permissions\n\n### gamedb/v1 Service\n\nRegister a game, get list of games and unregister it.\n\nIt provides 4 routes:\n| METHOD | Route             | AUTH | Description           |\n| ------ | ----------------- | ---- | --------------------- |\n| GET    | /                 |  y   | List games            |\n| POST   | /                 |  y   | Create a new game     |\n| PUT    | /:id              |  y   | Update a game         |\n| DELETE | /:id              |  y   | Delete a game         |\n\n## Development\n\n### Prerequesits\n\n- [Task](https://taskfile.dev/#/installation)\n- podman\n- docker-compose\n\nLatest docker-compose (v2.7.0) works with podman \u003e=4.1.1 only, for Debian testing I've used [Method 2: Ansible](https://computingforgeeks.com/how-to-install-podman-on-debian/) way to install the latest podman.\n\n### Run\n\nTo run this you have to do the following steps.\n\n```bash\ngit clone https://github.com/pcdummy/microlobby.git\ncd microlobby\n# To develop you don't need to change anything, for production you have to change all passwords\ncp .env.sample .env\ntask\n# Some containers don't start on first run, start them again\ntask up\n```\n\nNow enjoy the [health api](http://localhost:8080/health)\n\n### Testing the API\n\n- Get a token:\n\n  It exports 3 variables:\n  - MICROLOBBY\n  - ACCESS_TOKEN\n  - REFRESH_TOKEN\n\n```bash\nsource ./token_login.sh http://localhost:8080 admin asdf1234\n```\n\n- Or refresh it:\n\n```bash\nsource ./token_refresh.sh\n```\n\n- Check the proxy health api\n\n```bash\ncurl -s -H \"Content-Type: application/json\" -H \"Authorization: Bearer $ACCESS_TOKEN\" $MICROLOBBY/api/debug/v1/health | jq\n```\n\n- Get a list of routes\n\n```bash\ncurl -s -H \"Content-Type: application/json\" -H \"Authorization: Bearer $ACCESS_TOKEN\" $MICROLOBBY/api/router/v1/routes | jq\n```\n\n- Create a game\n\n```bash\ncurl -s -d @./docs/json-test/gamedb_v1_create.json -H \"Content-Type: application/json\" -H \"Authorization: Bearer $ACCESS_TOKEN\" $MICROLOBBY/api/gamedb/v1/ | jq\n```\n\n- List games\n\n```bash\ncurl -s -H \"Content-Type: application/json\" -H \"Authorization: Bearer $ACCESS_TOKEN\" $MICROLOBBY/api/gamedb/v1/ | jq\n```\n\n- Query GeoIP2-Lite\n\n```bash\ncurl -s -H \"Content-Type: application/json\" -H \"Authorization: Bearer $ACCESS_TOKEN\" $MICROLOBBY/api/geoip/v1/city/142.250.203.99/en | jq\n```\n\n```json\n{\n  \"isoCode\": \"US\",\n  \"timeZone\": \"America/Chicago\",\n  \"countryName\": {\n    \"en\": \"United States\"\n  },\n  \"latitude\": 37.751,\n  \"longitude\": -97.822\n}\n```\n\n### Remove everything or start from new\n\n```bash\ntask rm\n```\n\n## Authors\n\n- René Jochum - rene@jochum.dev\n- Pastdue (ideas)\n\n## License\n\nIts dual licensed:\n\n- Apache-2.0\n- GPL-2.0-or-later\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjochumdev%2Fmicrolobby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjochumdev%2Fmicrolobby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjochumdev%2Fmicrolobby/lists"}