An open API service indexing awesome lists of open source software.

https://github.com/devoverid/aksaria

Aksaria discord bot implementation in Typescript.
https://github.com/devoverid/aksaria

bot discord discord-js discordjs grinding

Last synced: 5 months ago
JSON representation

Aksaria discord bot implementation in Typescript.

Awesome Lists containing this project

README

          

Welcome to Aksaria! πŸ‘‹

[![All Contributors](https://img.shields.io/github/contributors/devoverid/aksaria)](https://github.com/devoverid/aksaria/graphs/contributors)
![GitHub last commit](https://img.shields.io/github/last-commit/devoverid/aksaria)

πŸ€” What is Aksaria?

> *"Where discipline meets destiny."*

Aksaria is a Discord-based community and system designed for those who choose discipline, consistency, and long-term growth. In a world saturated with distractions, Aksaria emerges as a space where each day is recorded, every step is acknowledged, and every spark is carefully tended🌸.

We call those who walk this path Grinders.

🀨 What features are available in Aksaria?

- **Daily Check-In System**

Log your consistency and discipline daily to maintain your streak and unlock new roles.

- **Dynamic Streak Roles**

Special Discord roles are awarded based on your check-in streaks, marking milestones and dedication.

- **Discord Slash Commands Integration**

Fast and intuitive command set for all server interactions directly from Discord.

- **Comprehensive User Profiles**

Track your progression, personal stats, and received awards.

- **Streak Leaderboards *(WIP)***

See where you stand! View rankings of Grinders based on their check-in streaks and totals.

- **Automated Reminders *(WIP)***

Bots automatically remind you to check-in and stay on track.

- **Flexible Deployment**

Ready to run with Docker or via local development with Bun.

- **Multi-Platform Ready**

Runs anywhere via Docker (Linux, macOS, ARM, AMD64).

πŸ’Ύ Pre-requisite

Here are the prerequisites required for installing and running the application.

- [Bun](https://bun.sh/) (for local development) β‰₯ v1.3
- [PostgreSQL](https://www.postgresql.org/) (for DB) β‰₯ v17.6
- [Docker](https://www.docker.com/) (for containerized deployment)
- [Make](https://www.gnu.org/software/make/) (recommended for migration scripts)

πŸ’» Installation

πŸƒβ€β™‚οΈ Develop by yourself

1. Clone repository and install its deps
```sh
git clone https://github.com/devoverid/aksaria.git
cd aksaria
bun install
bun prisma
```

2. Copy `.env.example` file with `cp .env.example .env` and configure database:

```yml
# Your application's token (APP_TOKEN)
# Obtain this from the [Discord Developer Portal](https://discord.com/developers/applications):
# 1. Navigate to your application
# 2. Go to "Bot" in the sidebar
# 3. Under "Bot", you will see the "Token" section, click "Reset Token" or "Copy" to get your token.
# 4. NEVER share your token publicly
APP_TOKEN=MTQxxxxxxxxxxxx

# Your Discord server's guild id (GUILD_ID)
# To get your guild (server) ID:
# 1. In Discord, go to User Settings > Advanced, and turn on "Developer Mode"
# 2. Right-click your server's icon in the guild/server list
# 3. Click "Copy Server ID"
GUILD_ID=99999999999999

# Your application's ID (APP_ID)
# To get your application (client) ID:
# 1. Go to the [Discord Developer Portal](https://discord.com/developers/applications)
# 2. Select your application
# 3. Your App's "Application ID" (Client ID) is displayed at the top under the app name
APP_ID=99999999999999

# Your DB's creds
DB_HOST=localhost
DB_NAME=aksaria
DB_USER=postgres
DB_PASS=password
```

3. Do migrations with `Makefile`

```sh
make migrate-up
# Use this command below if you want to reset all of the data on database
make migrate-reset
```

4. Deploy its commands and launch the bot

```sh
bun commands
bun start
```

🐳 Develop w/ Docker

1. Clone the repository
```sh
git clone https://github.com/devoverid/aksaria.git
cd aksaria
```

2. Copy `.env.example` file with `cp .env.example .env` and configure database:

```yml
APP_TOKEN=MTQxxxxxxxxxxxx
GUILD_ID=99999999999999
APP_ID=99999999999999

DB_HOST=db
DB_NAME=aksaria
DB_USER=postgres
DB_PASS=password
```

3. Make sure you have Docker installed and run:
```bash
docker compose up --build -d
```

πŸ” Commands

- Bun
- - `docker compose run --rm --entrypoint "" app bunx prisma migrate reset`
- PostgreSQL
- - `docker compose exec db psql -U postgres -d aksaria`

🌐 Production

🐳 Deployment w/ Docker (use Virtual Private Server)

- Clone the repository w/ SSH method `git clone git@github.com:devoverid/aksaria` and go to the directory with `cd aksaria` command.

- Copy `.env.example` file to `.env` and do configs.

```yml
APP_TOKEN=MTQxxxxxxxxxxxx
GUILD_ID=99999999999999
APP_ID=99999999999999

DB_HOST=db
DB_NAME=aksaria
DB_USER=postgres
DB_PASS=password
```

- Let's deploy with `docker compose -f ./docker-compose.prod.yaml up -d` command.

- Congrats! The bot is running securely, connected to persistent Postgres, and auto-updating when `devover/aksaria:latest` changes.

πŸ” Commands

- `docker compose -f docker-compose.prod.yml ps`
- `docker compose -f docker-compose.prod.yml logs -f app`
- `docker compose -f docker-compose.prod.yml logs -f watchtower`
- `docker compose -f docker-compose.prod.yml logs -f db`

πŸ’Œ Support us

You can support us and the further development of Aksaria! Even the smallest contribution goes a long way. Giving a ⭐️ to this repo or sharing it with others is already greatly appreciated.


If you'd like to treat us to a coffee, you can support via Trakteer:

Trakteer Us

🀝 Contributing

Contributions, issues, and feature requests are highly appreciated as this application is far from perfect. Please do not hesitate to make a pull request and make changes to this project!

πŸ“ License

Aksaria is open-sourced software licensed under the [MIT License](./LICENSE).