Skip to content
All projects

Case study

BotCampus

A Discord bot that runs SouCampus build orders, from the first ticket to the client's review. I built it and run it on my own server.

My part
Built it alone; I run it
Stack
Node.js, discord.js, SQLite
Checked
175 automated tests, CI
Result
3 orders handled

Why I started it

Most clients and Minecraft builders have talked in Discord for years. It is where server owners, the people who buy builds, already are. So an order should start and end there, not in a form on another website.

The idea is old. Over a couple of years I tried to write such a bot myself several times. BotCampus, started in July 2026, is the version that works.

My role

I built the bot alone: the order flow, every step and button, who may do what, and how it talks to the website. I test it live on the SouCampus server and run it on my own VPS.

How an order moves

Each order is a ticket with one status. Builders compete with quotes, the client chooses, a manager confirms the payment, and the client reviews the work at the end.

One order, ticket to review. Red captions are the saved statuses

How it is built

A small Node.js process with a SQLite database. Every button carries an ID; one router sends each click to its handler.

One button press, what reacts to it, and the link to the website

Key design choices

One status, one table of moves
A ticket has one status column, and a table says which status can follow which. The move is a single SQL update with the allowed statuses in the condition, so a double click cannot confirm a payment twice.
Every button is a public door
Discord does not check who presses a button. So each handler first checks the person: the client of this ticket, or a manager by the role set on the server, never by a role name.
Time lives in the database
Reminders and deleting closed channels are dates in the database, checked on a schedule. A restart loses nothing; a failed step runs again on the next pass.
A queue to the website
Reviews and portfolio drafts go to soucampus.online only with the client's consent, through a queue. Every request is signed, failed ones are retried with growing pauses.

How it is checked

  • 175 automated tests run on fake Discord objects and an in-memory database; every new handler gets a test that an outsider is refused.
  • GitHub Actions runs them on Node 22 and 24 on every push.
  • Live runs on the server: the first real order went from the form to a confirmed payment in November 2026.

What is next

  • Orders paid 50/50: today the bot knows one payment status; the second half should be its own step.
  • Switch on the bot-to-website bridge on the server; the code is ready.
  • A team of builders, so orders go to quotes instead of being taken by me.

Result

3 orders handled through the bot so far. It runs 24/7 on my VPS in Docker, with a daily database backup.