Mettlestate One Engine
A complete multi-tenant software ecosystem, independently architected and built as its sole developer.
Role: Sole developer and architect
- Go
- React
- TypeScript
- PostgreSQL
- AWS
- Pulumi
- Valkey
- OpenAPI

Engineering scale
Repository snapshot, 2 December 2026. Independently architected and developed.
- Tracked repository files
- 5 864
- All tracked blobs, including documentation and generated assets.
- Go files
- 1 802
- Includes test files.
- TSX files
- 1 559
- Includes UI components and routes.
- Go test files
- 413
- Files, not individual tests or passing results.
- Forward SQL migrations
- 266
- Paired with 266 rollback migration files.
- Frontend app directories
- 7
- Repository layout, not deployment count.
- Business module directories
- 9
- Repository layout, not live service count.
- OpenAPI specifications
- 10
- Tracked JSON or YAML specification files.
Counts describe tracked files and directories, not live deployments, code quality or production usage.
A system of systems


Five capability layers
Explore the actual software architecture independently of the illustrative engine.
Domain services
Competition operations, commerce, business workflows, automation and AI orchestration.
Read all layers
- Product interfaces
- Player experiences, administrative console, client portals and live competition views.
- Contracts and access
- Typed APIs, tenant context, sessions and permission checks.
- Domain services
- Competition operations, commerce, business workflows, automation and AI orchestration.
- Data and asynchronous processing
- PostgreSQL, caching, object storage, background jobs and real-time notifications.
- Operational foundation
- Container infrastructure, deployment pipelines, security, monitoring and tracing.
Follow a request
Choose an engineering path to see how the capabilities work together.
Product request
How a product interface reaches shared business capabilities.
- Product interface
A player, administrator or client uses a dedicated React application.
- Contract and access
Typed API contracts connect the interface to server-side session and permission checks.
- Domain logic
The appropriate Go domain owns the business rules and data access.
- Authoritative state
PostgreSQL persists the resulting state; the interface can refresh from the API.
Engineering consideration: Shared capabilities reduce duplication without requiring every product to share its interface or business rules.
Live updates
How changing tournament state reaches connected views.
- State changes
A domain operation updates the authoritative database.
- Notification listener
A PostgreSQL listener receives notifications, with reconnect backoff and refreshed credentials.
- Real-time hub
The Go listener broadcasts events, including relevant query invalidation signals.
- Connected interface
Server-sent events notify clients so they can refresh relevant data.
Engineering consideration: Notifications are not a durable event log. Clients need to reconcile with authoritative state after interruptions.
AI workflow
How the documented agent architecture constrains model-driven work.
- Workflow request
An authorised request or scheduled workflow creates an agent run.
- Persistent execution
A background job executes a versioned skill with run history and resource limits.
- Model and tools
The model can request tools within granted permissions and applicable budgets.
- Review and outcome
Where required, execution waits for human approval; outcomes are recorded for inspection.
Engineering consideration: This describes the documented architecture, not a live execution trace. Accountability adds complexity but makes consequential automation easier to inspect.
Conceptual paths based on reviewed implementation and architecture documentation. Not a production network map or live telemetry.
Capability map
A simplified capability map, not a production network topology.
- Product interfaces
Player experiences, administrative console, client portals and live competition views.
- Contracts and access
Typed APIs, tenant context, sessions and permission checks.
- Domain services
Competition operations, commerce, business workflows, automation and AI orchestration.
- Data and asynchronous processing
PostgreSQL, caching, object storage, background jobs and real-time notifications.
- Operational foundation
Container infrastructure, deployment pipelines, security, monitoring and tracing.
Engineering decisions
Modular boundaries without premature service sprawl
Problem: Different business domains need independent ownership without multiplying operational overhead.
Approach: Use Go internal packages to enforce domain boundaries and separate shared capabilities from business rules. Co-locate workloads where appropriate.
Trade-off: Keep deployment topology flexible; process separation is not required for every domain.
Typed contracts between frontend and backend
Problem: Multiple frontend applications need a consistent API contract.
Approach: Generate TypeScript types from OpenAPI specifications and share reusable frontend capabilities. A documented migration plan separates versioned API contracts from UI packages.
Trade-off: Independent release cycles require deliberate version compatibility and contract publishing; the migration plan is a target, not proof of completed rollout.
Live updates and graceful recovery
Problem: Tournament and operational views need to reflect changing state without constant polling.
Approach: Use PostgreSQL notifications and server-sent events, with reconnect backoff, fresh connection credentials and observable listener behaviour.
Trade-off: Live notifications are not a durable event log; clients must reconcile with authoritative state after disruptions.
Safe data evolution
Problem: Schema changes must not accidentally destroy commercial data.
Approach: Maintain paired forward and rollback migrations and a CI migration-safety check; use explicit review for destructive changes.
Trade-off: Rollback scripts alone do not guarantee recovery of deleted data; operational review and backups remain essential.
Accountable AI and workflow execution
Problem: AI automation needs to operate within business permissions, budgets and human oversight.
Approach: Model agent execution as persistent jobs, with versioned skills, tool permissions, approval states, recorded run history and budget limits. Keep deterministic workflow actions separate from model reasoning.
Trade-off: Guardrails and human approvals add complexity but make consequential automation easier to control and inspect.
The problem
Multiple competition brands and internal business workflows need common engineering capabilities without forcing every product into the same user experience.
Ownership
I independently designed and implemented MOE across product discovery, architecture, frontend, backend, data modelling, infrastructure, security and engineering operations.
Architecture
The system separates reusable infrastructure capabilities from business domains, with modular Go services, independently deployable workloads, explicit data ownership and contract-driven APIs. Architectural evolution is documented rather than treated as a fixed topology.
Product engineering
React and TypeScript interfaces cover player experiences, administrative consoles and business portals. Shared contracts and components reduce duplicated integration work while allowing distinct product experiences.
Backend and data
PostgreSQL-backed services support competition management, commerce and business workflows. Background job queues handle asynchronous work, while server-sent events and database notifications support live updates.
Cloud and reliability
Infrastructure as Code provisions container workloads, networking, managed databases, caching, object storage and content delivery on AWS. Monitoring, structured logs and tracing support operational diagnosis.
Security and engineering quality
Tenant-aware access, granular permissions, least-privilege infrastructure, typed contracts, automated tests and migration safeguards are part of the engineering approach.
AI systems
Agent and workflow orchestration combines model tool use with permissions, human approvals and expenditure controls. The aim is useful automation that remains accountable to its operators.
Evidence and status
MOE is proprietary commercial software. This case study describes engineering work, not a claim that every component is currently live. Repository metrics describe a dated engineering snapshot, not live deployment or usage.