This is my personal website: a card game you can play against an AI or a friend, live stats for the computer it runs on, a few hosted services for people I know, and a set of free in-browser file tools. It is a single Python web application with a PostgreSQL database, and it runs on a small computer in my home. It is live at zubekanov.com, and you are welcome to make an account and try it.

What you can do

  • Play Forgetful Fish, a two-player card game with a full rules engine, against the built-in AI, against a neural-network opponent trained by self-play, or online against another person by sharing a code. Games are rated, can be watched live, and can be replayed afterwards.

Forgetful Fish game table

  • Browse the card gallery in a retro or minimalist style, and open a two-player sandbox with full manual control.

Forgetful Fish card gallery

  • Play PopuGame, a 9x9 grid game I rebuilt from a minigame in POPUCOM, locally or online by code, also rated.
  • Watch live metrics for the machine serving the page: CPU, temperature, memory, disk and network, from the last hour out to a year.

Server metrics

  • Use the tools: organise, merge, split, impose and watermark PDFs, convert, resize and compress images, remove image backgrounds, and convert or trim audio and video.

Tools

  • Check the Minecraft server, see who is online, open the live map, and request a whitelist spot.

Minecraft status and whitelist request

  • Request an account on my Audiobookshelf server and sign in to it with your website account.
  • Register an account, verify your email, reset a password, and manage sessions from your profile.
  • Store files in a personal drive (members, after a quota is approved): folders, large uploads in chunks, and public share links.
  • Subscribe a Discord webhook to site events.
  • Read my resume, framed in the site.

How it is built

The site is self-hosted on an ODROID-H4 Ultra (Intel N305, 32 GB RAM, 8 TB of storage) in my house. Visitors reach it through a Cloudflare tunnel, and the connection is behind carrier-grade NAT, so the Minecraft server is published through a relay. The repository has about 2,200 commits since April 2025.

  • Flask application. Three blueprints: HTML pages, a JSON API of 327 routes, and the resume PDF, served by gunicorn behind nginx.
  • Page builders. Every page is built server-side from typed Python components into one HTML skeleton whose placeholders are filled in a single pass, with no template engine and no JavaScript framework. A table of pages declares each page's access, and the header and sidebar are driven by a JSON config.
  • Frontend. Hand-written JavaScript and CSS, no bundler. Shared pieces are a fetch wrapper that stamps the CSRF marker, a widget set (dialogs, tabs, copy chips, charts), and the uPlot charting library, vendored. The tools suite runs pdf.js, pdf-lib and ffmpeg.wasm in the browser and installs as a PWA.
  • Data layer. Two PostgreSQL databases, one for the application and one for server telemetry, plus a disposable one for the browser tests. The schema is 128 tables defined as JSON files and reconciled at startup. A pooled client provides parameterised SQL and transactions.
  • Authentication. Session cookies backed by hashed tokens, login lockout, single-use tokens for verification, reset and email change, an authenticator code for admin sessions, and an OpenID Connect provider so Audiobookshelf logs people in with their website account.
  • API framework. A uniform response envelope, a CSRF marker enforced on every mutating request, an admin guard, and an audit trail of admin mutations.
  • Integrations. Discord webhooks, Gmail for email, the AMP panel that runs Minecraft, Audiobookshelf's admin API, and per-user OAuth for Google Calendar.
  • Collectors. Six systemd services that poll brokers, exchanges, filings, news, TV captions and the AI trainer into the database, plus an hourly database telemetry timer.
  • Deploy. A tracked nginx config, systemd units, and one script that pulls, installs, checks, restarts and verifies.

Design decisions

I write the pages in Python rather than a frontend framework because my background was in backend work and Python, and I was more comfortable writing HTML generators than learning a framework for a site I would mostly build alone. The cost is that every page is a function, which the tests exploit by rendering all of them.

The database schema lives in JSON files and startup only ever adds tables and columns. I made destructive changes a separate, explicit command after deciding that a routine restart must never be able to lose data.

Pages are declared in a table with their access level, and a repository-specific linter checks that every admin API route calls the admin guard. I moved that policy into the linter so it is enforced on every push rather than remembered in review. The same linter bans silent exception handlers without a waiver, bans unsafe request parsing, and checks copy style.

Live game and dashboard updates use server-sent events backed by one-second database polling. I evaluated PostgreSQL LISTEN/NOTIFY and deferred it, because the simple version holds until around 25 concurrent viewers and the site does not have them.

Verification and email-change links were once consumed while the page rendered, which let a link-prefetching crawler burn them before the person clicked. The mutation now runs in the route and the page only shows the outcome.

Static assets ship with the git hash in their URL and an immutable cache header, so a deploy invalidates everything and nothing else is ever refetched.

Upgrades

  • Charts moved from Plotly to a vendored uPlot in July 2026. Plotly was a 1.07 MB download and took 50-150 ms per chart; uPlot is 48 KB and draws the 22-chart monitor wall in about 50 ms.
  • The Minecraft server moved from a hosted tunnelling service to my own Oracle Cloud relay with WireGuard and nftables, with the rebuild recipe kept in the repository.
  • A September 2026 audit of the codebase led to a restructure: transactions in the database client, the central database class split into auth, migrations and feature accessors, SQL moved out of request handlers into service modules, and continuous integration added.

Testing

There are about 9,900 unit tests in Python, about 700 JavaScript tests, and about 390 browser tests written with Playwright. The browser suite starts the application in-process against a disposable database, reseeds it before every test, and stubs the outbound integrations, so it needs no live service. It runs locally; the linter, the JavaScript tests and the unit suite run in CI on every push.

Setup

deploy/scripts/setup.sh prepares a fresh checkout: submodules, a virtualenv with dependencies, and the config files from their examples. deploy/BOOTSTRAP.md covers the production box.

Attributions