monica-business-modular-monolith

Structure Monica solutions into a DDD modular monolith with bounded contexts.

13|6|Updated Feb 19, 2025
One-click install
npx skills add https://github.com/Tairitsua/Monica --skill monica-business-modular-monolith
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: monica-business-modular-monolith
Source: https://github.com/Tairitsua/Monica/tree/main/.claude/skills/monica-business-modular-monolith
Command: npx skills add https://github.com/Tairitsua/Monica --skill monica-business-modular-monolith

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps teams avoid anemic or entangled solution layouts by prescribing a domain-first modular monolith structure for Monica projects, clarifying ownership, dependency direction, and composition rules so bounded contexts remain explicit within a single deployment.

Core Features & Use Cases

  • Domain-first solution layout: Guides splitting the solution by bounded context under src/Domains with single merged domain packages per subdomain.
  • Strict reference and ownership rules: Enforces AppHost -> Domains.{Subdomain} -> Platform.Infrastructure -> Platform.Protocol -> Platform.BuildingBlocks chain, domain-owned Repository and DbContext placement, and where shared protocol contracts live.
  • Practical workflows and checklist: Step-by-step instructions for creating new subdomains, defining PublishedLanguages in Platform.Protocol, deciding cross-domain collaboration (requests vs events), and a delivery checklist for safe composition and registration.

Quick Start

Design a new Ordering bounded context in this Monica solution and produce the recommended folder layout, Domains.Ordering.csproj naming, Platform.Protocol PublishedLanguages locations, and AppHost composition steps.

Frequently Asked Questions about monica-business-modular-monolith

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

FAQPage Schema
How do I structure a modular monolith with DDD bounded contexts?

Structure a modular monolith by splitting the solution by bounded context under src/Domains, enforcing an AppHost to Platform.BuildingBlocks reference chain to ensure domain boundaries remain explicit within a single deployment.

Where should I place Repository and DbContext classes in a DDD modular monolith?

Place Repository and DbContext within the domain layer under Domains.{Subdomain}, ensuring domain ownership of persistence responsibilities rather than centralizing them in shared infrastructure.

What is the correct project reference chain for a Monica business solution?

The correct reference chain is AppHost -> Domains.{Subdomain} -> Platform.Infrastructure -> Platform.Protocol -> Platform.BuildingBlocks, dictating strict dependency direction for safe composition.

How do I define cross-domain collaboration contracts in a modular monolith?

Define cross-domain collaboration contracts as PublishedLanguages within Platform.Protocol, deciding between direct requests versus events to maintain decoupled bounded contexts.

Can I use this modular monolith approach for multiple deployments?

This approach applies to single-deployment Monica projects, prescribing domain-first layout and composition rules specifically when creating or extending bounded contexts within one deployment.

Why does my modular monolith solution layout become entangled?

Solution layouts become entangled without strict reference rules, but enforcing domain-owned persistence and Platform.Protocol contract locations clarifies ownership and dependency direction across bounded contexts.