game-backend-architecture-patterns

Standardize server-authoritative game backend architecture with modular monolith and hexagonal design.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/caicedov/netwatch --skill game-backend-architecture-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: game-backend-architecture-patterns
Source: https://github.com/caicedov/netwatch/tree/main/.github/skills/game-backend-architecture-patterns
Command: npx skills add https://github.com/caicedov/netwatch --skill game-backend-architecture-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill standardizes backend architecture for server-authoritative real-time games, enabling consistent behavior across the game server.

Core Features & Use Cases

  • Modular Monolith First: A single deployable backend with clear internal module boundaries; MVP focuses on maintainability over microservices.
  • Clean Architecture (Pragmatic): Domain → Application → Infrastructure layering; domain code remains framework-free and fully testable.
  • Hexagonal Architecture (Ports & Adapters): Domain defines ports; infrastructure implements adapters; transport and persistence are treated as adapters.
  • Domain-Driven Design (DDD – Pragmatic): Focus on aggregates, domain events, explicit invariants, and ubiquitous language to avoid over-modeling.

Quick Start

Analyze the current backend, split into domain, application, and infrastructure layers, and align modules and boundaries while introducing ports and adapters as needed.

Frequently Asked Questions about game-backend-architecture-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a server-authoritative real-time game backend for deterministic behavior?

To structure a server-authoritative game backend deterministically, apply a modular monolith design with hexagonal architecture. This separates domain, application, and infrastructure layers, ensuring clear module boundaries and consistent game server behavior.

What is the best way to keep game backend domain logic testable and framework-free?

The best way to keep game backend domain logic testable is using pragmatic clean architecture. By layering Domain, Application, and Infrastructure, your domain code remains completely framework-free and fully testable across the game server.

How do I implement hexagonal architecture ports and adapters in a TypeScript game backend?

To implement hexagonal architecture in a TypeScript game backend, define ports within your domain layer and implement adapters in the infrastructure layer. This treats transport and persistence as swappable adapters around the domain.

When should I use a modular monolith instead of microservices for a game backend?

You should use a modular monolith for a game backend during your MVP phase. It provides a single deployable backend with clear internal module boundaries, prioritizing maintainability over the complexity of microservices.

How do I apply Domain-Driven Design to a game backend without over-modeling?

To apply DDD to a game backend without over-modeling, take a pragmatic approach. Focus strictly on aggregates, domain events, explicit invariants, and ubiquitous language to maintain clear module boundaries.

What are the limitations of using a modular monolith for a real-time game backend?

A limitation of using a modular monolith for a real-time game backend is scaling individual modules independently. While it provides clear internal boundaries, the entire backend remains a single deployable unit, which may affect large-scale infrastructure demands.