Reviewed-on: #4
Aurora
A comprehensive, feature-rich Discord RPG bot built with modern technologies.
Aurora is a powerful Discord bot designed to facilitate RPG-like elements within a Discord server. It features a robust economy, class system, inventory management, quests, and more, all built on top of a high-performance stack using Bun and Drizzle ORM.
✨ Features
- Class System: Users can join different classes.
- Economy: Complete economy system with balance, transactions, and daily rewards.
- Inventory & Items: sophisticated item system with rarities, types (Material, Consumable, etc.), and inventory management.
- Leveling: XP-based leveling system to track user activity and progress.
- Quests: Quest system with requirements and rewards.
- Trading: Secure trading system between users.
- Lootdrops: Random loot drops in channels to engage users.
- Admin Tools: Administrative commands for server management.
🛠️ Tech Stack
- Runtime: Bun
- Framework: Discord.js
- Database: PostgreSQL
- ORM: Drizzle ORM
- Validation: Zod
- Containerization: Docker
🚀 Getting Started
Prerequisites
Installation
-
Clone the repository
git clone <repository-url> cd aurora -
Install dependencies
bun install -
Environment Setup Copy the example environment file and configure it:
cp .env.example .envEdit
.envwith your Discord bot token, Client ID, and database credentials.Note
: The
DATABASE_URLin.env.exampleis pre-configured for Docker. -
Start the Database Run the database service using Docker Compose:
docker compose up -d db -
Run Migrations
bun run migrateOR
bun run db:push
Running the Bot
Development Mode (with hot reload):
bun run dev
Production Mode: Build and run with Docker (recommended):
docker compose up -d app
📜 Scripts
bun run dev: Start the bot in watch mode.bun run generate: Generate Drizzle migrations.bun run migrate: Apply migrations (via Docker).bun run db:push: Push, schema to DB (via Docker).bun run db:studio: Open Drizzle Studio to inspect the database.bun test: Run tests.
📂 Project Structure
├── src
│ ├── commands # Slash commands
│ ├── events # Discord event handlers
│ ├── modules # Feature modules (Economy, Inventory, etc.)
│ ├── db # Database schema and connection
│ └── lib # Shared utilities
├── drizzle # Drizzle migration files
├── config # Configuration files
└── scripts # Utility scripts
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
This project is licensed under the MIT License.