{"id":"6b08bd3b80884893657cc9c8","slug":"modular-monolith","title":"Modularny monolit: twarde granice bez kosztów sieci","summary":"Jeden proces i jedno wdrożenie, ale moduły z publicznym API, własnymi danymi i komunikacją przez zdarzenia. Jak to zbudować w .NET, Javie (Spring Modulith), Node.js, Go i Pythonie i jak pilnować granic testami.","servedLang":"pl","availableLangs":["pl","en"],"topics":["modular-monolith","monolith","microservices","ddd-strategic-design"],"techs":["dotnet","java","typescript","go","python"],"tags":["architecture","modules","spring-modulith","boundaries","architecture-tests","outbox"],"level":"intermediate","kind":"article","access":"members","status":"published","cover":null,"author":{"id":"6b08bd2e80884893657cc8cf","name":"Redakcja Art of Devs","avatar":null,"handle":"redakcja","community":false},"readingMinutes":12,"stats":{"views":4,"likes":0,"bookmarks":0,"comments":0},"publishedAt":"2026-11-26T23:14:03.263Z","updatedAt":"2026-11-27T10:04:42.829Z","requestedLang":"pl","theme":{"hero":"classic","heroMedia":null,"accent":"teal","background":"grid","weaveResources":true,"toc":"right"},"seoDescription":"Modularny monolit (modular monolith): definicja, zasady modułów, struktura solucji w C#, Java, TypeScript, Go i Python, testy granic (NetArchTest, Spring Modulith, dependency-cruiser), zdarzenia między modułami i droga do mikroserwisów.","wordCount":2398,"doc":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Po dwóch latach system pierogarni Haliny obsługuje sieć trzech lokali, catering i program lojalnościowy. Pracują nad nim trzy zespoły, a zwykła zmiana w zamówieniach potrafi zepsuć naliczanie punktów. Zamiast od razu ciąć system na mikroserwisy, zespół wybiera "},{"type":"text","text":"modularny monolit","marks":[{"type":"bold"}]},{"type":"text","text":" (ang. "},{"type":"text","text":"modular monolith","marks":[{"type":"italic"}]},{"type":"text","text":"): nadal jedno wdrożenie, ale z granicami, których kompilator i testy pilnują tak samo surowo, jak sieć pilnuje granic usług."}]},{"type":"callout","attrs":{"variant":"tip","title":"W skrócie"},"content":[{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Modularny monolit to "},{"type":"text","text":"jedna jednostka wdrożenia","marks":[{"type":"bold"}]},{"type":"text","text":" podzielona na "},{"type":"text","text":"moduły biznesowe","marks":[{"type":"bold"}]},{"type":"text","text":" z publicznym API i ukrytym wnętrzem."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Każdy moduł ma "},{"type":"text","text":"własne dane","marks":[{"type":"bold"}]},{"type":"text","text":" (schemat lub tabele), a z innymi rozmawia przez kontrakty i "},{"type":"text","text":"zdarzenia w procesie","marks":[{"type":"bold"}]},{"type":"text","text":"."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Dobrze pocięty modularny monolit to najtańsza droga do mikroserwisów – "},{"type":"text","text":"jeśli","marks":[{"type":"bold"}]},{"type":"text","text":" kiedyś okażą się potrzebne."}]}]}]}]},{"type":"stats","attrs":{"items":[{"value":"1","label":"proces i jedno wdrożenie","hint":"jak w zwykłym monolicie"},{"value":"3–10","label":"typowa liczba modułów","hint":"po jednym na obszar biznesowy"},{"value":"0","label":"wywołań sieciowych między modułami","hint":"błąd sieci nie jest scenariuszem"}]}},{"type":"heading","attrs":{"level":2,"id":"kontekst-i-sily"},"content":[{"type":"text","text":"Kontekst i siły"}]},{"type":"paragraph","content":[{"type":"text","text":"Klasyczny monolit pierogarni zaczął przypominać wielką kulę błota: klasa "},{"type":"text","text":"Customer","marks":[{"type":"code"}]},{"type":"text","text":" ma pola dla sprzedaży, dostaw i lojalności, a raport kuchni robi "},{"type":"text","text":"JOIN","marks":[{"type":"code"}]},{"type":"text","text":" po siedmiu tabelach należących do różnych obszarów. Siły, które trzeba pogodzić:"}]},{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Niezależność zespołów","marks":[{"type":"bold"}]},{"type":"text","text":" – zespół lojalności chce zmieniać swój model bez pytania zespołu zamówień o zgodę."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Koszt operacyjny","marks":[{"type":"bold"}]},{"type":"text","text":" – nikt nie chce utrzymywać dziesięciu pipeline'ów, brokera wiadomości i rozproszonego śledzenia dla systemu, który mieści się na dwóch serwerach."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Spójność danych","marks":[{"type":"bold"}]},{"type":"text","text":" – część operacji nadal potrzebuje transakcji, ale nie każda."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Opcja na przyszłość","marks":[{"type":"bold"}]},{"type":"text","text":" – jeśli catering urośnie dziesięciokrotnie, powinno się dać go wydzielić bez przepisywania."}]}]}]},{"type":"pullQuote","attrs":{"text":"Jeśli nie potrafisz zbudować dobrze ustrukturyzowanego monolitu, dlaczego sądzisz, że mikroserwisy są odpowiedzią?","author":"Simon Brown","role":"autor modelu C4","source":"tłum."}},{"type":"heading","attrs":{"level":2,"id":"struktura"},"content":[{"type":"text","text":"Struktura"}]},{"type":"paragraph","content":[{"type":"text","text":"Moduł to pionowy wycinek systemu wokół jednej zdolności biznesowej, a nie warstwa techniczna. Ma trzy części: "},{"type":"text","text":"publiczny kontrakt","marks":[{"type":"bold"}]},{"type":"text","text":" (fasada, komendy, zapytania, zdarzenia integracyjne), "},{"type":"text","text":"wnętrze","marks":[{"type":"bold"}]},{"type":"text","text":" (domena, przypadki użycia, dostęp do danych) i "},{"type":"text","text":"własne dane","marks":[{"type":"bold"}]},{"type":"text","text":"."}]},{"type":"diagram","attrs":{"kind":"mermaid","code":"flowchart TB\n  api[\"Host: API HTTP i composition root\"]\n  subgraph orders[\"Moduł Orders\"]\n    direction TB\n    oc{{\"Kontrakt: IOrdersModule, OrderPlaced\"}}\n    oi[\"Wnętrze: domena, handlery\"]\n    oc --- oi\n  end\n  subgraph kitchen[\"Moduł Kitchen\"]\n    direction TB\n    kc{{\"Kontrakt: IKitchenModule\"}}\n    ki[\"Wnętrze\"]\n    kc --- ki\n  end\n  subgraph loyalty[\"Moduł Loyalty\"]\n    direction TB\n    lc{{\"Kontrakt: ILoyaltyModule\"}}\n    li[\"Wnętrze: AwardPointsOnOrderPlaced\"]\n    lc --- li\n  end\n  bus([\"Szyna zdarzeń w procesie\"])\n  db[(\"Jedna baza, osobne schematy:<br/>orders · kitchen · loyalty\")]\n  api --> oc & kc & lc\n  oi -- \"publikuje OrderPlaced\" --> bus\n  bus -- \"dostarcza\" --> li\n  bus -- \"dostarcza\" --> ki\n  oi --> db\n  ki --> db\n  li --> db","caption":"Moduły w jednym procesie: kontrakty na zewnątrz, wnętrze ukryte"}},{"type":"table","content":[{"type":"tableRow","content":[{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Zasada"}]}]},{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Co oznacza w praktyce"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Publiczne API modułu"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Inne moduły widzą tylko kontrakty: interfejs fasady, DTO, zdarzenia. Reszta jest "},{"type":"text","text":"internal","marks":[{"type":"code"}]},{"type":"text","text":", w pakiecie "},{"type":"text","text":"internal","marks":[{"type":"code"}]},{"type":"text","text":" albo w katalogu "},{"type":"text","text":"internal/","marks":[{"type":"code"}]}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Własność danych"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Moduł ma swój schemat lub prefiks tabel; nikt inny nie robi do nich "},{"type":"text","text":"SELECT","marks":[{"type":"code"}]},{"type":"text","text":" ani "},{"type":"text","text":"JOIN","marks":[{"type":"code"}]}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Komunikacja"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Synchronicznie przez fasadę (gdy potrzebna jest odpowiedź) albo asynchronicznie przez zdarzenia (gdy wystarcza reakcja)"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Brak cykli"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Graf zależności między modułami jest acykliczny – inaczej to jeden moduł w przebraniu"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Mały wspólny kod"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Część współdzielona to infrastruktura (szyna zdarzeń, "},{"type":"text","text":"Result","marks":[{"type":"code"}]},{"type":"text","text":"), nigdy logika biznesowa"}]}]}]}]},{"type":"heading","attrs":{"level":2,"id":"jak-to-wyglada-w-kodzie"},"content":[{"type":"text","text":"Jak to wygląda w kodzie"}]},{"type":"paragraph","content":[{"type":"text","text":"Każdy stos ma swój mechanizm ukrywania wnętrza: w .NET osobne projekty i "},{"type":"text","text":"internal","marks":[{"type":"code"}]},{"type":"text","text":", w Javie konwencja pakietów Spring Modulith, w Node.js publiczny "},{"type":"text","text":"index.ts","marks":[{"type":"code"}]},{"type":"text","text":" i reguły lintera, w Go katalog "},{"type":"text","text":"internal/","marks":[{"type":"code"}]},{"type":"text","text":" egzekwowany przez kompilator, w Pythonie konwencja podkreślnika sprawdzana testem."}]},{"type":"codeGroup","attrs":{"title":"Struktura modułów w pięciu stosach"},"content":[{"type":"codeBlock","attrs":{"language":"plaintext","filename":"dotnet/solution-tree.txt"},"content":[{"type":"text","text":"src/\n├── Pierogarnia.Host/                    ← the only deployable: Program.cs wires all modules\n├── Modules/\n│   ├── Orders/\n│   │   ├── Pierogarnia.Orders.Contracts/  ← PUBLIC: IOrdersModule, OrderPlaced (integration event)\n│   │   └── Pierogarnia.Orders.Core/       ← INTERNAL: domain, handlers, OrdersDbContext (schema \"orders\")\n│   ├── Kitchen/\n│   │   ├── Pierogarnia.Kitchen.Contracts/\n│   │   └── Pierogarnia.Kitchen.Core/\n│   └── Loyalty/\n│       ├── Pierogarnia.Loyalty.Contracts/\n│       └── Pierogarnia.Loyalty.Core/      ← may reference Orders.Contracts, never Orders.Core\n└── Pierogarnia.Shared/                  ← tiny: event bus abstraction, Result type. No business logic."}]},{"type":"codeBlock","attrs":{"language":"plaintext","filename":"java/spring-modulith-tree.txt"},"content":[{"type":"text","text":"src/main/java/pl/pierogarnia/\n├── PierogarniaApplication.java          ← @SpringBootApplication, the only deployable\n├── orders/                              ← application module (top-level package)\n│   ├── OrdersApi.java                   ← public: classes in the module's base package\n│   ├── OrderPlaced.java                 ← public event record\n│   └── internal/                        ← hidden from other modules (Spring Modulith rule)\n│       ├── Order.java\n│       └── OrderRepository.java\n├── kitchen/\n│   └── ...\n└── loyalty/\n    ├── LoyaltyApi.java\n    └── internal/OrderPlacedListener.java"}]},{"type":"codeBlock","attrs":{"language":"plaintext","filename":"node/nx-workspace-tree.txt"},"content":[{"type":"text","text":"apps/\n└── pierogarnia/                         ← the only deployable (NestJS)\n    └── src/app.module.ts                ← imports OrdersModule, KitchenModule, LoyaltyModule\nlibs/\n├── orders/\n│   ├── src/index.ts                     ← PUBLIC barrel: OrdersService, OrderPlacedEvent\n│   └── src/lib/internal/                ← everything else, never imported directly\n├── kitchen/\n└── loyalty/                             ← lint rule: may import \"@pierogarnia/orders\", not its internals"}]},{"type":"codeBlock","attrs":{"language":"plaintext","filename":"go/module-tree.txt"},"content":[{"type":"text","text":"pierogarnia/\n├── cmd/pierogarnia/main.go              ← the only binary\n└── internal/\n    ├── orders/\n    │   ├── orders.go                    ← PUBLIC API of the module: type Module, func (m *Module) Place(...)\n    │   └── internal/                    ← compiler-enforced: only internal/orders/... may import it\n    │       ├── domain/\n    │       └── store/                   ← tables in schema \"orders\"\n    ├── kitchen/\n    └── loyalty/"}]},{"type":"codeBlock","attrs":{"language":"plaintext","filename":"python/package-tree.txt"},"content":[{"type":"text","text":"pierogarnia/\n├── main.py                              ← the only deployable (FastAPI app)\n├── orders/\n│   ├── __init__.py                      ← PUBLIC: from .api import place_order, OrderPlaced\n│   ├── api.py\n│   └── _internal/                       ← underscore = private by convention, checked by a test\n├── kitchen/\n└── loyalty/"}]}]},{"type":"paragraph","content":[{"type":"text","text":"Granice, których nikt nie sprawdza, znikają po kilku miesiącach. Dlatego test architektury jest częścią modułu tak samo jak testy domeny:"}]},{"type":"codeGroup","attrs":{"title":"Testy granic modułów"},"content":[{"type":"codeBlock","attrs":{"language":"csharp","filename":"ModuleBoundaryTests.cs"},"content":[{"type":"text","text":"using System.Reflection;\nusing NetArchTest.Rules;\n\npublic class ModuleBoundaryTests\n{\n    // One marker type per module implementation assembly\n    private static readonly Dictionary<string, Assembly> Modules = new()\n    {\n        [\"Orders\"] = typeof(Pierogarnia.Orders.Core.OrdersModule).Assembly,\n        [\"Kitchen\"] = typeof(Pierogarnia.Kitchen.Core.KitchenModule).Assembly,\n        [\"Loyalty\"] = typeof(Pierogarnia.Loyalty.Core.LoyaltyModule).Assembly,\n    };\n\n    public static IEnumerable<object[]> ModuleNames => Modules.Keys.Select(k => new object[] { k });\n\n    [Theory]\n    [MemberData(nameof(ModuleNames))]\n    public void A_module_never_depends_on_the_internals_of_another(string module)\n    {\n        var forbidden = Modules.Keys\n            .Where(m => m != module)\n            .Select(m => $\"Pierogarnia.{m}.Core\")   // internals; \"Pierogarnia.Orders.Contracts\" stays allowed\n            .ToArray();\n\n        var result = Types.InAssembly(Modules[module])\n            .ShouldNot()\n            .HaveDependencyOnAny(forbidden)\n            .GetResult();\n\n        Assert.True(result.IsSuccessful,\n            $\"{module} reaches into another module: \" + string.Join(\", \", result.FailingTypeNames ?? []));\n    }\n}"}]},{"type":"codeBlock","attrs":{"language":"java","filename":"ModularityTests.java"},"content":[{"type":"text","text":"import org.junit.jupiter.api.Test;\nimport org.springframework.modulith.core.ApplicationModules;\nimport org.springframework.modulith.docs.Documenter;\n\nclass ModularityTests {\n\n    private final ApplicationModules modules = ApplicationModules.of(PierogarniaApplication.class);\n\n    @Test\n    void modulesRespectTheirBoundaries() {\n        // Fails when \"loyalty\" touches a type in \"orders.internal\" or when modules form a cycle.\n        modules.verify();\n    }\n\n    @Test\n    void writeDocumentation() {\n        // Generates C4-style component diagrams of the modules (PlantUML) into target/spring-modulith-docs.\n        new Documenter(modules).writeModulesAsPlantUml();\n    }\n}"}]},{"type":"codeBlock","attrs":{"language":"javascript","filename":".dependency-cruiser.js"},"content":[{"type":"text","text":"/** Run in CI: npx depcruise libs --config .dependency-cruiser.js */\nmodule.exports = {\n  forbidden: [\n    {\n      name: \"no-reaching-into-other-modules\",\n      comment: \"A module may import another module only through its public index.ts\",\n      severity: \"error\",\n      from: { path: \"^libs/([^/]+)/\" },\n      to: {\n        path: \"^libs/([^/]+)/src/lib/\",\n        pathNot: \"^libs/$1/\", // its own internals are fine\n      },\n    },\n    {\n      name: \"no-cycles-between-modules\",\n      severity: \"error\",\n      from: { path: \"^libs/\" },\n      to: { circular: true },\n    },\n  ],\n  options: { tsConfig: { fileName: \"tsconfig.base.json\" } },\n};"}]},{"type":"codeBlock","attrs":{"language":"go","filename":"internal/loyalty/handler.go"},"content":[{"type":"text","text":"package loyalty\n\nimport (\n\t\"context\"\n\n\t\"pierogarnia/internal/orders\" // OK: the public API of the orders module\n\t// \"pierogarnia/internal/orders/internal/domain\"\n\t// ^ does not compile: \"use of internal package ... not allowed\".\n\t//   Go enforces module boundaries in the compiler, no extra tooling needed.\n)\n\ntype Module struct{ store pointsStore }\n\n// OnOrderPlaced is subscribed to the in-process event bus in main.go.\nfunc (m *Module) OnOrderPlaced(ctx context.Context, e orders.OrderPlaced) error {\n\treturn m.store.AddPoints(ctx, e.CustomerID, int(e.Total))\n}\n\ntype pointsStore interface {\n\tAddPoints(ctx context.Context, customerID string, points int) error\n}"}]},{"type":"codeBlock","attrs":{"language":"python","filename":"tests/test_module_boundaries.py"},"content":[{"type":"text","text":"import ast\nimport pathlib\n\nROOT = pathlib.Path(__file__).parents[1] / \"pierogarnia\"\nMODULES = {\"orders\", \"kitchen\", \"loyalty\"}\n\n\ndef imports_of(path: pathlib.Path) -> set[str]:\n    tree = ast.parse(path.read_text(encoding=\"utf-8\"))\n    found = set()\n    for node in ast.walk(tree):\n        if isinstance(node, ast.Import):\n            found |= {a.name for a in node.names}\n        elif isinstance(node, ast.ImportFrom) and node.module and node.level == 0:\n            found.add(node.module)\n    return found\n\n\ndef test_modules_use_only_public_apis_of_other_modules():\n    leaks = []\n    for module in MODULES:\n        for file in (ROOT / module).rglob(\"*.py\"):\n            for name in imports_of(file):\n                parts = name.split(\".\")\n                # \"pierogarnia.orders\" is public, \"pierogarnia.orders._internal...\" is not\n                if len(parts) > 2 and parts[1] in MODULES - {module} and parts[2].startswith(\"_\"):\n                    leaks.append(f\"{file.relative_to(ROOT)} -> {name}\")\n    assert not leaks, \"Module boundary violations:\\n\" + \"\\n\".join(leaks)"}]}]}]},"toc":[{"id":"kontekst-i-sily","text":"Kontekst i siły","level":2,"locked":false},{"id":"struktura","text":"Struktura","level":2,"locked":false},{"id":"jak-to-wyglada-w-kodzie","text":"Jak to wygląda w kodzie","level":2,"locked":false},{"id":"kompromisy","text":"Kompromisy","level":2,"locked":true},{"id":"sciezka-migracji","text":"Ścieżka migracji","level":2,"locked":true},{"id":"w-praktyce","text":"W praktyce","level":2,"locked":true},{"id":"antywzorce","text":"Antywzorce","level":2,"locked":true},{"id":"powiazane-tematy","text":"Powiązane tematy","level":2,"locked":true},{"id":"sprawdz-sie","text":"Sprawdź się","level":2,"locked":true}],"locked":true,"paywall":null,"previewRatio":0.3,"totalBlocks":38,"visibleBlocks":16,"resources":[{"id":"6b0857bf3c96f2d34d0b423d","type":"article","provider":"web","url":"https://www.kamilgrzybek.com/blog/posts/modular-monolith-primer","embedUrl":null,"title":"Modular Monolith: A Primer — Kamil Grzybek","description":"Kamil Grzybek Personal Site","author":"Kamil Grzybek","thumbnailUrl":null,"durationSec":null,"lang":"en","topics":["monolith","modular-monolith"],"techs":["general"],"tags":["software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":null,"popularity":70,"verifiedAt":"2026-11-26T11:25:59.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:02.417Z","updatedAt":"2026-11-26T16:01:02.417Z"},{"id":"6b0857a53c96f2d34d0b3217","type":"video","provider":"youtube","url":"https://www.youtube.com/watch?v=5OjqD-ow8GE","embedUrl":"https://www.youtube-nocookie.com/embed/5OjqD-ow8GE","title":"Modular Monoliths • Simon Brown • GOTO 2018","description":"","author":"GOTO Conferences","thumbnailUrl":"https://i.ytimg.com/vi/5OjqD-ow8GE/hqdefault.jpg","durationSec":null,"lang":"en","topics":["modular-monolith","monolith"],"techs":["general"],"tags":[],"price":"free","featured":true,"featuredOrder":13,"packageName":null,"source":"seed","publishedAt":null,"popularity":0,"verifiedAt":"2026-11-26T00:00:00.000Z","curated":true,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:37.149Z","updatedAt":"2026-11-26T16:00:37.149Z"},{"id":"6b0857b23c96f2d34d0b346f","type":"repo","provider":"github","url":"https://github.com/kgrzybek/modular-monolith-with-ddd","embedUrl":null,"title":"kgrzybek/modular-monolith-with-ddd","description":"Full Modular Monolith application with Domain-Driven Design approach.","author":"kgrzybek","thumbnailUrl":"https://opengraph.githubassets.com/1/kgrzybek/modular-monolith-with-ddd","durationSec":null,"lang":"en","topics":["clean-architecture","ddd-strategic-design","cqrs","event-sourcing","modular-monolith"],"techs":["dotnet"],"tags":["architecture","clean-architecture","clean-code","cqrs","ddd","ddd-architecture","design-patterns","software-architecture","api-design","ddd-cqrs"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"github","publishedAt":"2019-08-23T00:12:03.000Z","popularity":80,"verifiedAt":"2026-11-26T10:58:51.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:49.541Z","updatedAt":"2026-11-26T16:00:49.541Z"},{"id":"6b0857c53c96f2d34d0b4860","type":"video","provider":"youtube","url":"https://www.youtube.com/watch?v=Xo3rsiZYsJQ","embedUrl":"https://www.youtube-nocookie.com/embed/Xo3rsiZYsJQ","title":"Modular Monoliths: How To Build One & Lessons Learned","description":"☄️ Master the Modular Monolith Architecture: https://bit.ly/3SXlzSt 📌 Accelerate your Clean Architecture skills: https://bit.ly/3PupkOJ 🚀 Support me on Patreon to access the source code: https://www.patreon.com/milanjovanovic What is a Modular Monolith? It's a monolith system designed in a…","author":"Milan Jovanović","thumbnailUrl":"https://i.ytimg.com/vi/Xo3rsiZYsJQ/hqdefault.jpg","durationSec":null,"lang":"en","topics":["monolith","modular-monolith","clean-architecture"],"techs":["dotnet"],"tags":["system-design","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"youtube-rss","publishedAt":"2023-02-26T12:00:30.000Z","popularity":74,"verifiedAt":"2026-11-26T10:54:09.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:07.480Z","updatedAt":"2026-11-26T16:01:07.480Z"},{"id":"6b0857b63c96f2d34d0b3adb","type":"podcast","provider":"apple-podcasts","url":"https://podcasts.apple.com/us/podcast/modular-monoliths-in-net-with-steve-smith/id130068596?i=1000757562012","embedUrl":"https://embed.podcasts.apple.com/us/podcast/id130068596?i=1000757562012","title":"Modular Monoliths in .NET with Steve Smith","description":"Modular Monoliths strike the middle ground between monoliths and microservices! Carl and Richard talk to Steve Smith about his work striking a balance between the simplicity of a monolithic set of services and the complexity of breaking everything into microservices. Steve discusses the…","author":".NET Rocks!","thumbnailUrl":"https://is1-ssl.mzstatic.com/image/thumb/Podcasts211/v4/47/0f/7e/470f7e13-2035-87e9-c578-9163bfdaa5b4/mza_14666437949801840208.jpg/600x600bb.jpg","durationSec":3060,"lang":"en","topics":["monolith","modular-monolith","microservices"],"techs":["dotnet"],"tags":["podcast","testing","performance","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"itunes","publishedAt":"2024-03-07T06:35:07.000Z","popularity":77,"verifiedAt":"2026-11-26T10:58:27.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:53.924Z","updatedAt":"2026-11-26T16:00:53.924Z"},{"id":"6b0857b53c96f2d34d0b39f6","type":"article","provider":"web","url":"https://www.fearofoblivion.com/build-a-modular-monolith-first","embedUrl":null,"title":"Build the Modular Monolith First","description":"Even talking about building a monolith today, is a bit taboo. It is all about microservices at the moment, and has been for a few years. But they aren’t a silver bullet…","author":"Fear of Oblivion","thumbnailUrl":"https://www.fearofoblivion.com/assets/images/covers/modular-monolith.jpg","durationSec":null,"lang":"en","topics":["monolith","modular-monolith","microservices"],"techs":["general"],"tags":["software-architecture","hacker-news"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"hn","publishedAt":"2022-11-13T17:23:54.000Z","popularity":62,"verifiedAt":"2026-11-26T11:15:37.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:52.228Z","updatedAt":"2026-11-26T16:00:52.228Z"}],"challenges":[{"id":"6b093dc291bd8fbaf2a0c8d8","slug":"payment-circuit-breaker","title":"Bezpiecznik przed bramką płatności","summary":"Circuit breaker ze stanami zamknięty, otwarty i półotwarty, wstrzykiwanym zegarem, progiem prób testowych i filtrem błędów biznesowych – żeby awaria bramki płatności nie położyła całego sklepu.","servedLang":"pl","availableLangs":["pl","en"],"kind":"code","category":"architecture","status":"published","difficulty":"hard","topics":["circuit-breaker","microservices"],"techs":["typescript","javascript","python","dotnet","java","go"],"tags":["circuit-breaker","resilience","fault-tolerance","state-machine","payments"],"languages":["typescript","javascript","python","csharp","java","go"],"questionCount":null,"xp":40,"stats":{"attempts":0,"solves":0,"solutions":0,"comments":0},"solveRate":null,"publishedAt":"2026-11-27T08:22:26.251Z"}],"attachments":[],"hasCode":true,"repoUrl":null,"series":[{"slug":"architecture-path","title":"Od monolitu do mikroserwisów","items":[{"slug":"monolith","title":"Monolit: jedna aplikacja, jedno wdrożenie i dlaczego to często dobry start","current":false},{"slug":"modular-monolith","title":"Modularny monolit: twarde granice bez kosztów sieci","current":true},{"slug":"layered-architecture","title":"Architektura warstwowa: prezentacja, logika, dane – i gdzie to się psuje","current":false},{"slug":"hexagonal-architecture","title":"Pierogi w Heksagonie","current":false},{"slug":"clean-architecture","title":"Czysta architektura: reguła zależności i przypadki użycia w centrum","current":false},{"slug":"onion-architecture","title":"Architektura cebulowa: model domeny w środku, infrastruktura na zewnątrz","current":false},{"slug":"vertical-slice-architecture","title":"Architektura pionowych wycinków: kod według funkcji, nie według warstw","current":false},{"slug":"cqrs","title":"CQRS: osobny model do zmieniania, osobny do czytania","current":false},{"slug":"event-sourcing","title":"Event sourcing: zapisuj fakty, a nie tylko ostatni stan","current":false},{"slug":"event-driven-architecture","title":"Architektura sterowana zdarzeniami: kto publikuje, kto słucha i co może pójść nie tak","current":false},{"slug":"microservices","title":"Mikroserwisy: niezależne wdrożenia, prawdziwe koszty i kiedy to się opłaca","current":false},{"slug":"ddd-strategic-design","title":"DDD – projektowanie strategiczne: poddomeny, konteksty ograniczone i mapy kontekstów","current":false}]}],"prev":{"slug":"monolith","title":"Monolit: jedna aplikacja, jedno wdrożenie i dlaczego to często dobry start"},"next":{"slug":"layered-architecture","title":"Architektura warstwowa: prezentacja, logika, dane – i gdzie to się psuje"},"featured":false,"authorCard":{"id":"6b08bd2e80884893657cc8cf","name":"Redakcja Art of Devs","avatar":null,"handle":"redakcja","headline":"Wzorce projektowe · Architektura · AI i LLM","community":false,"reputation":{"points":3900,"level":{"key":"mentor","label":"Mentor"}},"articles":68,"skills":[{"key":"typescript","title":"TypeScript","level":5,"levelLabel":"Autorytet","articles":63},{"key":"dotnet","title":".NET","level":5,"levelLabel":"Autorytet","articles":53},{"key":"python","title":"Python","level":5,"levelLabel":"Autorytet","articles":52},{"key":"java","title":"Java","level":5,"levelLabel":"Autorytet","articles":38}]}}