This repository houses the core components of ActivityRank, including:
- The ActivityRank Bot for Discord
- The Manager Service responsible for routing database shard queries and managing webhooks
- The ActivityRank Website
ActivityRank is a Discord bot focusing on flexible statistics and ranking. It is sharded and capable of running in a distributed form across multiple servers. This repository contains the source code for the ActivityRank Discord Bot, the Manager service, and the ActivityRank Website. It allows all components to be developed, deployed, and maintained in a unified manner.
Important
If you only want to use the bot, invite it to your Discord server with this link.
Before you start developing, make sure you have the following installed:
- Node.js (v20.x or higher recommended)
- Pnpm
- Docker (optional, for containerized deployment)
-
Clone the repository:
git clone https://github.com/Rapha01/activityRank-bot.git activityrank cd activityrank
-
Install dependencies:
pnpm install
This will install dependencies for all packages within the monorepo, thanks to pnpm Workspaces.
-
Configure your environment:
The config folder hosts configuration files for the various apps in the monorepo. If you're using VSCode or another editor with a JSON Schema plug-in, these files will highlight potential errors.
You can run all the services (bot, manager, and website) individually, or spin up everything at once using Docker or pnpm scripts. It is strongly recommended that you run at least the database via Docker.
Build and run the database using Docker:
docker compose up db
Build and run the database and manager using Docker:
docker compose up db manager
Build and run the database, manager, and bot using Docker:
docker compose up db manager bot
This will build and start all the services listed - which are defined in the docker-compose.yml file.
-
Ensure a valid MySQL connection is available and configured.
-
Start the manager:
pnpm --filter=@activityrank/manager run start
-
Start the bot:
pnpm --filter=@activityrank/bot run start
We welcome contributions! If you’d like to contribute, follow these steps:
- Fork the repository and clone it to your local machine.
- Make your changes in a separate branch.
- Run tests and linting to ensure your code is in good shape.
- Create a pull request with a clear explanation of what you’ve changed.
For large changes, it's a good idea to discuss them first by opening an issue.
Feel free to contact a maintainer on Discord -
send a message request to @piemot
or ask around in the support server.
This project is licensed under the AGPL v3.0 License - see the LICENSE file for details.