Context

Deadlink Protocol is a browser MMO strategy game set in a fragmented digital network. Players control a Cell, expand its infrastructure, write programs, run operations against other players and coordinate with a Syndicate.

A season runs for twelve months. The grid is split into 20 sectors with 12 Cells each, which sets the design target at 240 players per server. There is no pay-to-win: progression is earned through play.

Role and constraints

I am the creator and work across the whole system: architecture, backend services, the server-rendered frontend, the data model and operations.

The constraints shape the design: browser-first with no client install, long-lived seasons, server-authoritative game state, a single deployment that still uses every CPU core, and a realtime layer that degrades without taking the game down.

  • Browser client, server-rendered pages, progressive enhancement.
  • State and economy are authoritative on the server.
  • No pay-to-win mechanics; the economy is a ledger, not a balance field.

Architecture

The system is a modular monolith deployed as two Fastify applications. The frontend renders EJS and acts as a backend-for-frontend: it holds no sessions and forwards the signed cookie. The backend owns the REST API, business logic, database access and Socket.IO realtime.

PostgreSQL is the system of record. Valkey holds sessions, cache and rate limits. Bull runs scheduled and deferred work; only worker 0 registers the recurring jobs, so a season tick is never duplicated across cluster workers.

  • Frontend: Fastify, EJS, static assets, BFF proxy.
  • Backend: Fastify, controllers → services → models, REST and Socket.IO.
  • Persistence: PostgreSQL with Sequelize migrations; Valkey for sessions and rate limits.
  • Jobs: Bull queues, a single scheduler worker, cluster workers for the request path.

Decisions that matter

A few choices carry most of the operational weight.

  • Sessions live in Valkey, not in the frontend. The frontend forwards a signed cookie, so there is one place to revoke access and no second session model to drift.
  • The wallet is an append-only ledger. Balances are derived from the sum of deltas; code cannot quietly overwrite a balance and lose the audit trail.
  • The monolith stays modular. Controllers, services and models have a one-way dependency direction enforced by lint rules; splitting into services is a later scaling step, not a starting assumption.
  • Schema changes are migrations. The service never calls sync() against a real database; the baseline and every later change are reviewable files.

Operations

The deployment is observed like a production system: Prometheus scrapes host, application, PostgreSQL and Valkey exporters; Loki collects logs; Grafana holds the dashboards and alert rules. The backend exposes request, database and connected-player metrics.

Nginx terminates TLS in front of the frontend and status page, while the backend stays on the internal network. Health endpoints and a separate status page make failures visible outside the game client.

Status

Deadlink Protocol is in development. This case study documents the system and its decisions, not player numbers or outcomes. Features in the repository are labelled implemented, in progress or planned; this page follows the same rule.