{"id":26054801,"url":"https://github.com/jwizard-bot/jwizard-lib","last_synced_at":"2026-04-20T00:33:16.634Z","repository":{"id":259807799,"uuid":"877001176","full_name":"jwizard-bot/jwizard-lib","owner":"jwizard-bot","description":"Library providing common configurations and classes for JWizard Core and JWizard API projects.","archived":false,"fork":false,"pushed_at":"2025-03-06T19:40:30.000Z","size":622,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-06T20:29:12.661Z","etag":null,"topics":["gradle-dsl","javalin","jvm","jwizard-bot","kotlin","kotlin-library"],"latest_commit_sha":null,"homepage":"https://jwizard.pl","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jwizard-bot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["jwizard-bot","milosz08"]}},"created_at":"2024-10-22T23:12:48.000Z","updated_at":"2025-03-06T19:40:34.000Z","dependencies_parsed_at":"2024-12-09T17:19:48.164Z","dependency_job_id":"13fb4e39-e9c4-42ba-9944-5bec7b8c4a5a","html_url":"https://github.com/jwizard-bot/jwizard-lib","commit_stats":null,"previous_names":["jwizard-bot/jwizard-lib"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwizard-bot%2Fjwizard-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwizard-bot%2Fjwizard-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwizard-bot%2Fjwizard-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwizard-bot%2Fjwizard-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwizard-bot","download_url":"https://codeload.github.com/jwizard-bot/jwizard-lib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242532349,"owners_count":20144726,"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":["gradle-dsl","javalin","jvm","jwizard-bot","kotlin","kotlin-library"],"created_at":"2025-03-08T09:59:59.985Z","updated_at":"2025-12-08T00:03:19.361Z","avatar_url":"https://github.com/jwizard-bot.png","language":"Kotlin","funding_links":["https://github.com/sponsors/jwizard-bot","https://github.com/sponsors/milosz08"],"categories":[],"sub_categories":[],"readme":"![](.github/banner.png)\n\n[[About project](https://jwizard.pl/about)]\n\nJWizard is an open-source Discord music bot handling audio content from various multimedia sources\nwith innovative web player. This repository contains a library that shares code between the JWizard\nCore and JWizard API projects. It includes additional helper classes for logging, database handling,\nand communication protocols based on AMQP and WebSockets.\n\n## Table of content\n\n* [Clone and install](#clone-and-install)\n* [Package on local environments](#package-on-local-environments)\n* [Docker containers](#docker-containers)\n* [Contributing](#contributing)\n* [License](#license)\n\n## Clone and install\n\n1. Make sure you have at least JDK 21 and Kotlin 2.2.\n2. Clone this repository via:\n\n```shell\n$ git clone https://github.com/jwizard-bot/jwizard-lib\n```\n\n## Package on local environments\n\n1. To package library to maven local, type:\n\n- for UNIX based systems:\n\n```bash\n$ ./gradlew clean\n$ ./gradlew publishToMavenLocal\n```\n\n- for Windows systems:\n\n```bash\n.\\gradlew clean\n.\\gradlew publishToMavenLocal\n```\n\n## Docker containers\n\n1. Before run containers, create `.env` file based `example.env` and fill with below schema:\n\n```properties\n# core instances\nJWIZARD_JDA_SECRET_1_INSTANCE=\u003cJDA application secret (first instance)\u003e\nJWIZARD_JDA_SECRET_2_INSTANCE=\u003cJDA application secret (second instance)\u003e\nJWIZARD_REST_API_TOKEN=\u003cRest API token used in communication between JWizard API and Core instances\u003e\n# discord oidc (oauth2)\nJWIZARD_OIDC_APP_ID=\u003cOAuth2 application identifier\u003e\nJWIZARD_OIDC_SECRET=\u003cOAuth2 application secret\u003e\n# server (api)\nJWIZARD_GITHUB_TOKEN=\u003cGitHub personal token (used for GitHub API calls)\u003e\n# vault\nJWIZARD_VAULT_ROOT_TOKEN=\u003cVault root token (used in .env files in other JWizard projects\u003e\n# mysql\nJWIZARD_MYSQL_USERNAME=\u003cMySQL database username, by default root\u003e\nJWIZARD_MYSQL_PASSWORD=\u003cMySQL database password\u003e\nJWIZARD_MYSQL_DB_NAME=\u003cMySQL database name, by default jwizard-db\u003e\n# rabbitmq\nJWIZARD_RABBITMQ_USERNAME=\u003cRabbitMQ server username\u003e\nJWIZARD_RABBITMQ_PASSWORD=\u003cRabbitMQ server password\u003e\n# management\nJWIZARD_MANAGEMENT_DEFAULT_ADMIN_LOGIN=\u003cManagement panel default admin login\u003e\nJWIZARD_MANAGEMENT_CF_CAPTCHA_SECRET_KEY=1x0000000000000000000000000000000AA\n# common\nJWIZARD_GEOLOCATION_API_KEY=\u003cgeolocation api key, when is blank api is turned off\u003e\nJWIZARD_AES_SECRET_KEY=\u003c16 bytes of AES-128 secret value\u003e\n# lavalink\nJWIZARD_AUDIO_NODE_TOKEN=\u003cAuthentication token for development Lavalink nodes (all)\u003e\nJWIZARD_AUDIO_YT_SOURCE_VERSION=\u003cyt source version\u003e\nJWIZARD_AUDIO_YT_PO_TOKEN=\u003cproof of origin token\u003e\nJWIZARD_AUDIO_YT_PO_VISITOR_DATA=\u003cproof of origin visitor data\u003e\n# ports (leave unchanged)\nJWIZARD_VAULT_PORT=8761\nJWIZARD_MYSQL_PORT=8762\nJWIZARD_AUDIO_NODE_1_PORT=8766\nJWIZARD_AUDIO_NODE_2_PORT=8767\nJWIZARD_CORE_INSTANCE_1_PORT=8768\nJWIZARD_CORE_INSTANCE_2_PORT=8769\n```\n\n2. To run all docker containers for this project, type:\n\n```bash\n$ docker compose up -D\n```\n\nThis command will create and run following containers:\n\n| Name                | Port(s)    | Description                           |\n|---------------------|------------|---------------------------------------|\n| jwizard-vault       | 8761       | Secret keys storage service.          |\n| jwizard-mysql-db    | 8762       | MySQL database.                       |\n| jwizard-lava-node-1 | 8767       | Lavalink #1 node.                     |\n| jwizard-lava-node-2 | 8768       | Lavalink #2 node.                     |\n| jwizard-rabbitmq    | 8771, 8772 | RabbitMQ server and management panel. |\n\n\u003e [!TIP]\n\u003e Alternatively, you can run single Lavalink node, but in `docker-compose.yml` file you must\n\u003e remove second Lavalink node declaration. Running 2 nodes are useful for checking load-balancer in\n\u003e performance tests.\n\nAD: Alternatively you can run containers separately via:\n\n```bash\n$ docker compose up -D \u003ccontainer name\u003e\n```\n\nwhere `\u003ccontainer name\u003e` is the name of the container (available container you will find above in\nthe table).\n\n3. Apply database migrations:\n\n* Clone `jwizard-tools` repository via:\n\n```bash\n$ git clone https://github.com/jwizard-bot/jwizard-tools\n```\n\n* Set-up Python environment (see `README.md` file\n  in [jwizard-tools](https://github.com/jwizard-bot/jwizard-tools) repository),\n* Run migrations for `self` and `infra` via:\n\n```bash\n$ (venv) python src/db_migrator.py --pipeline infra\n$ (venv) python src/db_migrator.py --pipeline self\n```\n\n\u003e [!TIP]\n\u003e More information about JWizard Python migrator you could find in\n\u003e [jwizard-tools](https://github.com/jwizard-bot/jwizard-tools) repository.\n\n## Contributing\n\nWe welcome contributions from the community! Please read our [CONTRIBUTING](./CONTRIBUTING.md) file\nfor guidelines on how to get involved.\n\n## License\n\nThis project is licensed under the Apache 2.0 License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwizard-bot%2Fjwizard-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwizard-bot%2Fjwizard-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwizard-bot%2Fjwizard-lib/lists"}