Dev architecture

A strict engine.
A growing realm.

Realm of the Magisters is built on the Magister Engine: a strict, deterministic autobattler engine that separates authored balance, immutable published rules, asynchronous simulation, and recorded replays. Battles can be inspected without rerunning or quietly changing their history.

The stack

Small surfaces. Explicit boundaries.

Browser

React + TypeScript

The player, replay, and admin experiences share typed contracts but keep distinct responsibilities.

Identity

Amazon Cognito

Hosted UI authentication uses authorization code with PKCE. Players and administrators receive separate group membership.

Compute

Lambda + .NET 8

A thin Node.js web edge calls focused C# services for runs, authoring, replay access, and battle execution.

State

DynamoDB + S3

Mutable records live in DynamoDB; published rulesets, artwork, and replay chunks use immutable or versioned S3 objects.

Work

SQS battle queue

Battle inputs pin their ruleset version before a queue-driven worker simulates and persists the result.

Delivery

CloudFront + Route 53

Private origins, managed certificates, and explicit environment names deliver each public surface over HTTPS.

Resource map

Realm of the Magisters Dev on AWS

A curated service-level view. Resource identifiers and account details are intentionally omitted.

Read the architecture as text

Public delivery

Route 53 resolves Dev domains to CloudFront. ACM supplies certificates. CloudFront serves private S3 sites, artwork, and the player Web Function.

Identity and requests

Cognito signs in players and admins. The player Web Function invokes New Soul and Replay Lambdas; API Gateway routes administrative and legacy replay traffic.

Simulation

New Soul persists player commands, writes pinned battle inputs, and sends work to SQS. Battle Runner consumes the queue and executes the shared .NET battle engine.

Storage and history

DynamoDB stores authored content, player state, battle inputs, results, and replay indexes. S3 stores published rulesets, replay chunks, artwork, and deployable artifacts.

Operations

CloudWatch receives application and service logs. Terraform manages workload infrastructure and public domains; CloudFormation deploys the player Web Function.