Enterprise IT · cybersecurity · homelab

Hi, I'm Flyx. I build systems that run themselves.

By day I keep enterprise infrastructure running. By night I build free, open-source software: a Discord economy with its own stock market, plugins for Obsidian, and small tools that make documentation less painful. All of it is yours to run.

$ flyconomy --about
A Discord economy game

runtime  Python 3.13 · discord.py 2.7
source   11,723 lines
tests    1,112, incl. a 365-day season
storage  SQLite · schema v15
deploy   Docker · Cloudflare Tunnel

$ flyconomy market
FLX      $10,340 ▲ 0.0%
ticker simulated in your browser

Featured project

Flyconomy

A game that lives inside a Discord server. Members earn and bank virtual dollars, mine a pretend cryptocurrency called Flyxcoin, try their luck in a casino, and race each other up a net-worth leaderboard. Behind the fun is a real piece of engineering: a market, a ledger that can't be cheated, a web dashboard and a test suite that plays a whole year of the game on every run.

Play money only: nothing in Flyconomy can be bought with real money or cashed out for it.

Lines of Python
11,723
Automated tests
1,112
Casino games
9
Achievements to earn
23

Figures as of October 2026.

The systems behind it

Six parts work together. Switch to Technical to see how each one is built.

  • Banking

    Members keep cash in a wallet or a bank. Wallet cash can be stolen by other players; banked cash is safe and earns interest every morning, automatically.

    Every balance change is one SQL statement with the guard in WHERE: wallet + ? >= 0. Zero rows updated becomes InsufficientFundsError, so a balance can never go negative.

  • Flyxcoin market

    A pretend coin whose price moves by itself every five minutes, with the occasional bull or bear run. Members buy miners, mine hourly and trade. The live price shows in the bot's status like a stock ticker.

    A tasks.loop tick runs a bounded random walk with market regimes. Purchases are capped at 100 coins a day per member, tracked in flx_purchases.

  • Casino

    Blackjack, roulette, crash, mines, slots and more, plus tic-tac-toe against another member. Every game is fair or favours the house, so nobody can farm it for free money.

    Game math lives in pure modules with no Discord imports, so the house edge is unit tested directly. test_antiabuse.py fails if any payout gains a positive expected value.

  • Events and competition

    A lottery, a player-funded jackpot, a weekly tournament, bounties, and surprise server events like Gold Rush and Crime Wave keep the server busy between sessions.

    Scheduled jobs handle draws and payouts. Head-to-head stakes are held in escrow and wagers tables so a restart mid-game loses nothing.

  • Dashboard and web casino

    A website any server member can sign in to, with charts for the coin price, the money supply and how much the richest players hold, plus a casino floor to play in the browser. Controls like steering the market or starting events are for the owner only.

    An aiohttp server inside the bot process on 127.0.0.1:8765, published through a Cloudflare Tunnel with no open inbound port. Sign-in is Discord OAuth2 with the identify scope: the owner gets admin, server members get viewer access, and everyone else is refused.

  • Reliability and security

    The bot runs in a locked-down container and restarts itself if it stops. Over a thousand automated checks, including a simulated 365-day season, run before any change ships.

    Docker, non-root, read-only root filesystem, 512 MB limit, no-new-privileges. pytest, mypy in strict mode and ruff with bandit rules.

How a command travels

Commands reach the bot two ways. Both then take the same three steps to the database.

Discord

Members play right in the chat. They type commands, tap buttons on the bot's messages, and get answers back in the channel.

Built into the chat
  • Every command works as a slash command with hints, or a classic $ command.
  • Blackjack, mines and tic-tac-toe play out on buttons in the message.
  • The bot's status shows the live Flyxcoin price like a stock ticker.
  • Mistakes come back as one clear message, however the command was typed.

Gateway websocket · hybrid commands · button views

Web dashboard and API

Members sign in with Discord to watch the economy live and play the casino in the browser. Each click sends a request to the bot's own API.

Locked down by design
  • No endpoint answers without a Discord sign-in. The bot won't even start the dashboard without one set up.
  • Owner-only actions are checked on every request, and leaving the server locks you out at once.
  • Members are only sent what they're allowed to see, so there's nothing hidden in the page to dig out.
  • Traffic is encrypted through a Cloudflare Tunnel, with no port open to the internet.

OAuth2 sessions · role check per request · Secure cookie · host allowlist · aiohttp on 127.0.0.1:8765

Both arrive at the same bot, with the same wallet, limits and rules

  1. The bot routes it

    One Python program picks the feature that handles it: banking, casino, market, lottery and so on.

    9 cogs, incl. Api · shared rate limit

  2. The rules decide

    Game logic works out the result without knowing anything about Discord, which keeps it easy to test.

    Pure rules modules

  3. The ledger records it

    Money moves in a single database step, so two players acting at once can never double spend.

    database.py · SQLite, one writer

These three steps run inside one Docker container on a single host.

Bugs worth learning from

Version 2 was a rebuild. These are four of the problems it fixed, and how.

  • Interest that never stopped growing

    10% a day, compounding, multiplies a balance about 1.28 quadrillion times in a year.

    Capped at $10,000 per account per day, paid once by a scheduled job.

  • A roulette wheel with two zeros

    Python reads 00 as 0, so the wheel had two 0 pockets and no 00. Betting on 0 paid double.

    A real 00 pocket, and the odds tested.

  • Negative bets paid out

    The bot checked the bet against the wallet, then subtracted it. Bet −$500 and you gained $500.

    Bets must be positive, and the balance check moved into the database update.

  • Begging beat mining

    A 3-second cooldown let members create about $30,000 an hour from nothing.

    60 seconds now, about $1,500 an hour: just under a top-level miner.

More projects

Other things I've built

Tools I wanted to exist, mostly.

  • TypeScriptObsidian plugin

    Vault Sidekick

    A chat in the Obsidian sidebar, powered by Claude, that reads, searches and edits your notes. It asks before every change and never leaves your vault.

  • TypeScriptObsidian plugin

    Confluence Integration Plus

    Publishes Obsidian notes to Confluence, and pulls the edits people make in Confluence back into your notes.

  • RustWindows app

    Step Recorder

    Records how to do something on Windows. Every click becomes an annotated screenshot, and the steps are written out as Markdown, ready to become documentation.

  • PythonDiscord bot

    Flyxbot

    Moderation and fun for one Discord server: kick, ban and slowmode for moderators, games for everyone, and a DM when someone edits or deletes a message that mentions you.

Free and open source

Your tools, your hardware, your data

Everything I build is free and open source. I want to help people be as digitally independent as possible: running the software they rely on themselves, on hardware they control, without a subscription and without handing their data to someone else.

  • Free, for good

    No price, no paid tier, no ads. Use it, share it, and change it however you like.

    GPL-3.0 · MIT · Apache-2.0

  • Open to inspect

    Every line is public on GitHub, so you can see exactly what it does before you run it, then fix it or make it your own.

    github.com/FlyxHub

  • Yours to host

    Flyconomy and Flyxbot come with step-by-step guides for Windows, Linux and Docker. An old PC or a small home server is plenty.

    Flyconomy's container is capped at 512 MB

  • Private by default

    No telemetry, no tracking. Your bot's data lives in a database on your own machine, and Step Recorder makes no network calls at all.

    Obsidian plugins: no usage data collected

About

Infrastructure by day, side projects by night

I work in enterprise IT operations, designing and running secure environments across on-premises servers, AWS and Azure. I automate whatever I can with PowerShell and Python, and I hold a B.S. in Cybersecurity.

Those habits follow me into side projects. Flyconomy's money rules live in the database rather than in the app, its dashboard sits behind a tunnel instead of an open port, and its container runs with the fewest permissions it needs.

Code and scripting

  • Python
  • PowerShell
  • Bash
  • TypeScript
  • Rust
  • HTML & CSS

Cloud and infrastructure

  • AWS
  • Azure
  • Windows Server
  • Active Directory
  • Linux

Networking and virtualisation

  • VMware
  • Proxmox
  • UniFi
  • Cisco
  • pfSense
  • Wireshark

Tools and DevOps

  • Docker
  • Terraform
  • Git
  • GitHub
  • VS Code

Want to talk shop?

Questions about a project, an idea for Flyconomy, or just want to say hi? Find me on GitHub.