Context

An active Discord server is a captive audience: people already gathered in one place, several hours a week. Axoquest builds on that: a full RPG with classes, procedural dungeons, loot, crafting and raids, playable without leaving Discord, through a single /adv command.

The bet rested on one constraint: Discord is not a game engine. No render loop, no client-side state, interactions that expire. Everything has to be stateless at the interface and authoritative on the server.

The game system

Twenty-two modules cover the scope: heroes and archetypes, turn-based combat, procedural dungeons, loot and rarities, crafting, professions, familiars, rituals and relics, a player marketplace, peer-to-peer trading, co-op, multi-action raid bosses, achievements and leaderboards.

Four areas took the most work:

Character variety. Twelve archetypes, each with its own spells, primary stats and passives: the Necromancer summons, the Alchemist throws bombs that scale with their stats, the Priest is the only class that can revive, the Virtuoso shields allies. Seven elements and eight familiars cut across those choices, so two players of the same class don’t play the same game.

Balancing. A badly tuned RPG shows immediately: one class dominates, another is unplayable. The actual release cadence tells the story. Defensive thresholds, class-specific spells, gear affixes, raid boss damage: each version fixes an asymmetry observed in play, not a spreadsheet hypothesis.

Auto-dungeon AI. Players can send a hero on an automatic expedition. That required an AI that picks actions by score: favouring heavy spells, managing its mana reserve, accounting for elemental affinities, and above all keeping squishy classes alive without over-defending, which drags fights out without winning them.

The player economy. The marketplace runs on offers held in escrow: goods and currency are locked server-side for the duration of a trade, listings expire, and notifications land both in Discord and in the app. Once currency circulates between people who know each other, any flaw becomes an exploit: this is the module that demanded the most rigour.

Raids close the progression loop: multi-phase bosses, playable by four or more, with threat management and class bonuses, followed in real time from the web app.

The web app

Discord is enough to play, not to browse. An installable React + Vite app (PWA) mirrors the experience across 17 screens: hero sheet, inventory, crafting bench, marketplace, leaderboards, guide, achievements, relics, raids. Authentication runs through Discord OAuth, so players land straight on their character.

Technical foundations

Everything lives in a TypeScript ESM monorepo on Node 22: discord.js v14, PostgreSQL via Prisma (85 models shared with the community bot), Zod validation, Pino logging and Vitest tests.

A few rules turned out to matter more than the stack itself:

  • No file over 400 lines, enforced in CI. A blunt constraint, but an effective one: it forces game systems to be split instead of allowed to sprawl.
  • Services exported as objects, never classes: dependencies are passed as arguments, so tests need no container.
  • upsert everywhere on profiles, which eliminates write races when several commands land in parallel.
  • Every business-logic bug fix ships with its regression test.

Axo’s Corp: opening the ecosystem to everyone

Axobot and Axoquest were built for one server. Axo’s Corp is where that leads: the same experience, installable by anyone, on any Discord server.

Axo's Corp landing page presenting the three bots Axobot, Axoquest and Axojack.

Going from community project to product forced an architectural rewrite:

  • A unified NestJS API hosting the REST layer, the real-time WebSocket gateway and the three Discord bots (via Necord), each startable separately in production through a mode flag.
  • Multi-server as an invariant, not an option: guildId required on every player-facing model, compound (discordId, guildId) uniqueness, and an economy strictly isolated per server, with no shared wallet.
  • Modular Stripe billing: each server enables only the modules it needs, managed from a dashboard.
  • Three React 19 applications: Axoquest (RPG), Axojack (casino) and the admin dashboard, sharing a component library and a typed API client generated automatically from the Swagger schema (orval), which removes drift between the server contract and frontend calls.
  • Turborepo + pnpm, with Redis for caching and event publishing.
Axojack, the casino app of the Axo's Corp platform.

Key deliverables

  • Complete game system: 22 modules, 12 archetypes, continuous balancing
  • /adv Discord bot and PWA web app (17 screens)
  • 85-model PostgreSQL schema with hand-written migrations
  • Auto-expedition AI based on action scoring
  • Axo’s Corp multi-server platform: NestJS API, 3 React apps, Stripe billing
  • Player and technical documentation, player-facing release notes