{"id":22004015,"url":"https://github.com/opengsq/opengsq-master-server","last_synced_at":"2025-05-05T17:19:57.955Z","repository":{"id":227194834,"uuid":"769773497","full_name":"opengsq/opengsq-master-server","owner":"opengsq","description":"This is an application that provides an API for searching game servers. The application supports the following games: BeamMP, Factorio, Palworld, Scum and The Front.","archived":false,"fork":false,"pushed_at":"2024-04-29T22:32:21.000Z","size":100,"stargazers_count":3,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-29T23:39:00.440Z","etag":null,"topics":["api","beammp","factorio","flask","master-server","master-server-search","opengsq","palworld","python","scum","thefront"],"latest_commit_sha":null,"homepage":"https://master-server.opengsq.com","language":"Python","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/opengsq.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}},"created_at":"2024-03-10T02:35:31.000Z","updated_at":"2024-04-17T14:06:36.000Z","dependencies_parsed_at":"2024-04-22T23:29:43.458Z","dependency_job_id":"f9d7e560-d78d-4847-8085-af9083e1095c","html_url":"https://github.com/opengsq/opengsq-master-server","commit_stats":null,"previous_names":["opengsq/opengsq-master-server"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengsq%2Fopengsq-master-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengsq%2Fopengsq-master-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengsq%2Fopengsq-master-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengsq%2Fopengsq-master-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opengsq","download_url":"https://codeload.github.com/opengsq/opengsq-master-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227239684,"owners_count":17752498,"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":["api","beammp","factorio","flask","master-server","master-server-search","opengsq","palworld","python","scum","thefront"],"created_at":"2024-11-30T00:12:03.005Z","updated_at":"2024-11-30T00:12:03.508Z","avatar_url":"https://github.com/opengsq.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenGSQ Master Server Search API\n\n[![Python application](https://github.com/opengsq/opengsq-master-server/actions/workflows/python-app.yml/badge.svg)](https://github.com/opengsq/opengsq-master-server/actions/workflows/python-app.yml)\n[![Docker Image CI](https://github.com/opengsq/opengsq-master-server/actions/workflows/docker-image.yml/badge.svg)](https://github.com/opengsq/opengsq-master-server/actions/workflows/docker-image.yml)\n[![GitHub release](https://img.shields.io/github/release/opengsq/opengsq-master-server)](https://github.com/opengsq/opengsq-master-server/releases/)\n[![GitHub license](https://img.shields.io/github/license/opengsq/opengsq-master-server)](https://github.com/opengsq/opengsq-master-server/blob/main/LICENSE)\n\nThis is an application that provides an API for searching game servers. The application supports the following games: BeamMP, Factorio, Palworld, Scum and The Front.\n\nTry now: https://master-server.opengsq.com\n\n## Usage\n\nThe application provides the following endpoints:\n\n- `/beammp/search?host=\u003chost\u003e\u0026port=\u003cport\u003e`\n- `/factorio/search?host=\u003chost\u003e\u0026port=\u003cport\u003e`\n- `/palworld/search?host=\u003chost\u003e\u0026port=\u003cport\u003e`\n- `/scum/search?host=\u003chost\u003e\u0026port=\u003cport\u003e`\n- `/thefront/search?host=\u003chost\u003e\u0026port=\u003cport\u003e`\n\nReplace `\u003chost\u003e` and `\u003cport\u003e` with the host and port of the game server you want to search.\n\n## Error Handling\n\nThe application will return a 400 error if the 'host' and 'port' parameters are not provided or if the 'port' parameter is not an integer. If no result is found, the application will return a 404 error.\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/opengsq/opengsq-master-server.svg?variant=adaptive)](https://starchart.cc/opengsq/opengsq-master-server)\n\n---\n\n## Development Setup\n\nFollow these steps to set up your development environment:\n\n1. Create a virtual environment:\n    ```bash\n    python -m venv venv\n    ```\n2. Activate the virtual environment:\n    - On Windows, run: `venv\\Scripts\\activate`\n    - On Unix or MacOS, run: `source venv/bin/activate`\n3. Install the required packages:\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n## Configuration\n\nCopy the `.env.example` file to a new file named `.env` and update the variables as needed:\n\n```bash\ncp .env.example .env\n```\n\nHere's what each variable in the `.env` file represents:\n\n| Variable | Description | Default Value | Best Practice |\n| --- | --- | --- | --- |\n| `DATABASE_URL` | The URL of your MongoDB database. | None | This is required. Make sure to keep this value secure and do not share it publicly. |\n| `PORT` | The port number on which the Flask application will run. | `8000` | Choose a port that is not being used by other services. |\n| `SECRET_KEY` | Flask application secret key. | None | This should be a random string. It is used for session management in Flask. Keep this value secure. |\n| `USERNAME` | The username for Flask-MonitoringDashboard. | `admin` | Change this to a unique username. |\n| `PASSWORD` | The password for Flask-MonitoringDashboard. | `admin` | Change this to a strong, unique password. |\n| `SECURITY_TOKEN` | The security token for Flask-MonitoringDashboard. | `cc83733cb0af8b884ff6577086b87909` | This should be a random string. Keep this value secure. |\n| `FACTORIO_USERNAME` | The username for Factorio. | None | Set this to your Factorio username. |\n| `FACTORIO_TOKEN` | The token for Factorio. | None | This should be your Factorio token. Keep this value secure. |\n\nRemember, it's important to keep all sensitive information such as `DATABASE_URL`, `SECRET_KEY`, `PASSWORD`, `SECURITY_TOKEN`, and `FACTORIO_TOKEN` secure and not to share them publicly or commit them to version control. It's a good practice to use environment variables or a secure method to store these values.\n\n## Running the Application (Development)\n\nYou can start the scheduled task or run the Flask application in debug mode:\n\n- Start the scheduled task:\n    ```bash\n    python main.py\n    ```\n- Run Flask in debug mode:\n    ```bash\n    python app.py\n    ```\n- Run the protocol:\n    ```bash\n    python -m protocol.BeamMP\n    ```\n\n---\n\n## Self-Hosting\n\n[![Docker Pulls](https://img.shields.io/docker/pulls/opengsq/opengsq-master-server.svg)](https://hub.docker.com/r/opengsq/opengsq-master-server)\n\nYou can use Docker Compose to self-host the application. Here's how:\n\n1. Create a `docker-compose.yml` file [docker-compose.yml example](/docker-compose.prod.yml)\n\n2. Run the following command to start the application:\n\n    ```bash\n    docker compose up -d\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengsq%2Fopengsq-master-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopengsq%2Fopengsq-master-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengsq%2Fopengsq-master-server/lists"}