AoC Guild Bot

Discord Companion for Gaming Communities

A sophisticated Discord bot built for Ashes of Creation guilds, featuring advanced crafting order management, automated artisan role systems, and comprehensive guild economy tools.

craftingOrder.js
// Sophisticated order management system
async createOrder(itemGuid, buyerId, qty, guildId) {
  const order = await this.orderStorage.create({
    status: CraftingOrderStatus.OPEN,
    craftingInfoGuid: craftingInfo.guid,
    buyerId, itemGuid, qty, guildId
  });
  return this.formatOrderResponse(order);
}

Enterprise-Grade Features

Built with modern software development practices and designed for scalability, reliability, and exceptional user experience.

๐Ÿ›ก๏ธ

Artisan Role Management

Sophisticated profession and expertise tracking across 22 different crafting disciplines with automatic Discord role assignment and quality rating systems.

โš’๏ธ

Crafting Order System

Full lifecycle management for crafting orders with automated channel creation, expertise validation, and intelligent order matching between guild members.

๐Ÿ’ฐ

Guild Economy Tools

Advanced buy/sell order management with quality filtering, trader participation tracking, and automated marketplace integration.

๐Ÿ”ง

Modern Architecture

Clean service-oriented architecture with dependency injection, comprehensive test coverage, and automated CI/CD deployment pipeline.

๐Ÿš€

Production Ready

Deployed on Fly.io with Docker containerization, automated database migrations, health monitoring, and scheduled cleanup jobs.

๐Ÿ“Š

Data-Driven Design

Comprehensive item database with 10,000+ game items, crafting recipes, profession requirements, and automated data seeding scripts.

Technology Stack

Built with cutting-edge technologies and following industry best practices for maintainable, scalable software development.

๐ŸŸจ
Node.js
๐Ÿค–
Discord.js
๐Ÿ—„๏ธ
SQLite
๐Ÿ”ท
Sequelize
โšก
Vitest
๐Ÿณ
Docker
๐Ÿš€
Fly.io
โš™๏ธ
GitHub Actions

Clean Architecture in Action

Demonstrating enterprise-level software design patterns with real code examples from each architectural layer.

Service Layer Pattern

Business logic separated from Discord API concerns with clear domain boundaries.

craftingOrderService.js
// Clean service layer with dependency injection
export class CraftingOrderService {
  constructor(orderStorage, itemStorage, professionsStorage) {
    this.orderStorage = orderStorage;
    this.itemStorage = itemStorage;
    this.professionsStorage = professionsStorage;
  }
  async claimOrder(orderId, artisanId, guildId) {
    const order = await this.validateOrderClaim(orderId, artisanId);
    const artisan = await this.validateArtisanExpertise(artisanId, order);
    return this.orderStorage.updateStatus(orderId, 'CLAIMED');
  }
}

Repository Pattern

Data access abstraction supporting multiple storage providers (SQLite, in-memory for testing).

sequelizeCraftingOrderStorage.js
export class SequelizeCraftingOrderStorage {
  constructor(db) {
    this.craftingOrderModel = db.models.CraftingOrder;
    this.itemModel = db.models.Item;
  }
  async getOrderInfo(orderId) {
    const order = await this.craftingOrderModel.findOne({
      where: { id: orderId },
      include: { all: true, nested: true }
    });
    return this.formatOrderDTO(order);
  }
}

Test-Driven Development

Comprehensive test coverage with behavior-driven tests ensuring business logic correctness.

craftingOrder.test.js
describe("An open crafting order", () => {
  beforeEach(async () => {
    order = await craftingService.createOrder(ITEM_GUID, "buyerId");
  });
  it("can't be claimed by member without required expertise", async () => {
    await expect(
      craftingService.claimOrder(order.id, NOVICE_ARMORSMITH, guildId)
    ).rejects.toThrowError(
      "Member doesn't have minimum Armor Smithing required expertise"
    );
  });
});

Command Pattern Implementation

Modular slash command system with clean separation of concerns and validation.

newGuildCraftOrder.js
export default {
  data: new SlashCommandBuilder()
    .setName("crafting-order")
    .setDescription("Create a new guild crafting order")
    .addStringOption(option => option
      .setName("item").setRequired(true).setAutocomplete(true)),
  async execute(interaction, context) {
    const { craftingOrderService, guildService } = context;
    const itemGuid = interaction.options.getString("item");
    const order = await craftingOrderService.createOrder(
      itemGuid, interaction.member.user.id, qty, guildId
    );
    await this.createOrderChannel(order, interaction);
  }
};

Automated CI/CD Pipeline

Production-ready deployment pipeline with automated testing, quality gates, and zero-downtime deployments.

๐Ÿ“

Code Commit

Push to main branch triggers automated pipeline

โ†’
๐Ÿ”ง

Build & Install

Node.js setup, dependency installation with Yarn

โ†’
๐Ÿงช

Test Suite

Unit tests, integration tests, quality gates

โ†’
๐Ÿš€

Deploy

Discord command sync, Fly.io deployment

deploy.yml
name: Deploy
on:
  push:
    branches: [main]
jobs:
  tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Unit Tests
        run: yarn test --watch=false
      - name: Integration Tests
        run: yarn test:integration --watch=false
      - name: Deploy Commands
        run: yarn deploy-prod

System Integration Architecture

Comprehensive integration between Discord APIs, database systems, and external services.

External Systems

Discord API
Ashes Codex API
Fly.io Platform

Application Layer

Command Router
Event Handlers
Cron Jobs

Business Services

Order Service
Member Service
Guild Service

Data Layer

Repository Pattern
Sequelize ORM
SQLite Database

๐Ÿ”„ Event-Driven Architecture

Automated order lifecycle management with Discord webhook integration and scheduled cleanup jobs.

๐Ÿ“Š Data Synchronization

Real-time synchronization between Discord roles, database state, and external game data sources.

๐Ÿ›ก๏ธ Error Handling

Comprehensive error handling with graceful degradation and automatic recovery mechanisms.

Ready to Build Something Amazing?

This project showcases the kind of thoughtful, scalable software architecture I bring to every engagement. Let's discuss how I can help accelerate your team's success.