A bot made using JDA & Spring Boot (and quite a bit more in the future I hope).
- A verifications flow for gated communities.
- A tickets system.
- More to come (secrets c:)
If you wish to contribute to the project, you should reach out to me on Discord @zorbyte. We have a board with design mock-ups, design plans, and the ability to allocate tasks via kanban.
- JDK 25 or later
- PostgreSQL (for production)
- Docker (for running PostgreSQL in development)
-
Clone the repository:
git clone https://github.com/zorbyte/amaranth.git cd amaranth -
Build the project:
./gradlew build
-
Run in development mode:
./gradlew bootRun
The following environment variables are required:
BOT_TOKEN: Your Discord bot tokenTEST_GUILD_ID: Guild ID for testing slash commands
You can also specify them in an applicaiton configuration if you are so inclined, just make sure not to commit them!
We use several tools for code quality checks, including checkstyle, spotless, and the eclipse formatter for use in Eclipse or with the VSCode Java Plugin by RedHat (you will need to install a plugin for Intellij). You can run Checkstyle and/or Spotless by doing the following:
-
Checkstyle: Enforces Java coding standards
./gradlew checkstyleMain checkstyleTest
-
Spotless: Formats code automatically
# Check if code needs formatting ./gradlew spotlessCheck # Apply formatting ./gradlew spotlessApply
Run all quality checks:
./gradlew checkProject organisation has some themes from domain driven design, but is not in any way faithful to it, as that is outside the scope of this project for the time being.
Modules have the following strucure:
dev.zorbyte.amaranth/
[module]/
commands/ - Triggers from our Application layer if you will.
Logic that drives a user's interaction with us lives here.
Commands are not public to other modules.
internal/ - All business logic that deals with processing events dispatched
that the "domain" needs to know about. No files in here are public
to other modules, they're usually all services, configs, and components
loaded by spring.
[...] - Files in the root of a module are our "domain" modules,
they describe events that happen in the bot (e.g. UserAddedToTicket)
as well as the data structures behind them.
You can think of
commandsas an application layer,internalas a hybrid of application and infrastructure (which would ordinarily be sub-packaged out further in theinternalpackage), and the module files ([...]) as the domain.
We're licensed under the GNU AGPL 3 license.