https://github.com/norbit4/licensesystem
System to manage and implement product licenses
https://github.com/norbit4/licensesystem
api discord docker java javascript license product-license
Last synced: 5 months ago
JSON representation
System to manage and implement product licenses
- Host: GitHub
- URL: https://github.com/norbit4/licensesystem
- Owner: Norbit4
- License: mit
- Created: 2024-02-13T22:47:34.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-03T20:08:30.000Z (about 2 years ago)
- Last Synced: 2025-09-30T04:30:57.369Z (9 months ago)
- Topics: api, discord, docker, java, javascript, license, product-license
- Language: Java
- Homepage:
- Size: 219 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
License System
The License System project provides full control over the application license system through an API with built-in authorization. It allows quick management of licenses, including creating, editing, deleting and viewing information. Integration with the Discord bot allows you to generate reports, check the validity of licenses and assign them to users, making administration much easier.
API is dedicate to minecraft plugins but can by used in other products and apps.
Used Languages and Tools:
Table of contents
- [How does it work?](#work)
- [Documentation](#doc)
- [Discord bot](#bot)
- [Example implementation](#implementation)
- [Tests](#tests)
How does it work?

- *On startup:*
```yml
curl -X 'GET' \
'http://localhost:8080/api/v1/license/generateServerKey/' \
-H 'accept: */*' \
-H 'Authorization: admin-secret-token'
```
When the application starts, it performs a reqest to the API to verify if the token key is correct and generate a new serverKey.
If the license key is correct it sends the new generated serverKey.
- *On running:*
```yml
curl -X 'PUT' \
'http://localhost:8080/api/v1/license/isValidServerKey' \
-H 'accept: */*' \
-H 'Authorization: admin-secret-token' \
-H 'Content-Type: application/json' \
-d '{
"licenseKey": "string",
"serverKey": "string"
}'
```
The application every x time sends a request to the API to verify if the server key is correct.
If it is not correct it means that another application with the same license key has been started. Then the application closes.
Run
1. Clone repository
```
git clone https://github.com/Norbit4/LicenseSystem
```
2. [Create discord bot](https://discord.com/developers/docs/intro) and invite bot to your server
3. Copy bot token and paste it to docker-compose.yml
4. Start app
```
docker-compose up
```
Documentation
Documentation was created using [OpenApi](https://github.com/OAI)
- local env: http://localhost:8080/swagger-ui/index.html
preview:

Discord bot
The discord bot allows easy management of licenses and tokens.
preview:
- Licenses


- Report

- Tokens


Example implementation
[Click to view](https://github.com/Norbit4/LicenseSystem/tree/master/example/exampleplugin/src/main/java/pl/norbit/exampleplugin)
Tests
