{"id":"6b08bd3080884893657cc906","slug":"clean-architecture","title":"Czysta architektura: reguła zależności i przypadki użycia w centrum","summary":"Clean Architecture Roberta C. Martina bez mitów: cztery kręgi, reguła zależności, porty wejściowe i wyjściowe, prezenter. Struktura i przypadek użycia w C#, TypeScript, Javie, Go i Pythonie oraz uczciwa lista kosztów.","servedLang":"pl","availableLangs":["pl","en"],"topics":["clean-architecture","hexagonal-architecture","onion-architecture"],"techs":["dotnet","java","typescript","go","python"],"tags":["architecture","clean-architecture","dependency-rule","use-cases","ports-and-adapters"],"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":11,"stats":{"views":2,"likes":0,"bookmarks":0,"comments":0},"publishedAt":"2026-11-26T23:13:52.617Z","updatedAt":"2026-11-27T10:05:02.889Z","requestedLang":"pl","theme":{"hero":"classic","heroMedia":null,"accent":"teal","background":"hex","weaveResources":true,"toc":"right"},"seoDescription":"Czysta architektura (Clean Architecture): encje, przypadki użycia, adaptery interfejsów, frameworki, reguła zależności, interaktor i prezenter, przykłady w C#, TypeScript, Java, Go i Python, porównanie z heksagonem i cebulą.","wordCount":2034,"doc":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Program lojalnościowy pierogarni Haliny miał być prosty: punkty za zamówienia, nagrody za punkty. Po roku działa w aplikacji mobilnej, w kasie w lokalu i w chatbocie, a reguły wymiany punktów zmieniają się co kwartał. Zespół przebudowuje go według "},{"type":"text","text":"czystej architektury","marks":[{"type":"bold"}]},{"type":"text","text":" (ang. "},{"type":"text","text":"Clean Architecture","marks":[{"type":"italic"}]},{"type":"text","text":") – tak, żeby reguły i przypadki użycia nie wiedziały nic o tym, czy wywołuje je kontroler HTTP, czy bot."}]},{"type":"callout","attrs":{"variant":"tip","title":"W skrócie"},"content":[{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"System to "},{"type":"text","text":"koncentryczne kręgi","marks":[{"type":"bold"}]},{"type":"text","text":": encje, przypadki użycia, adaptery interfejsów, frameworki i sterowniki."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Reguła zależności","marks":[{"type":"bold"}]},{"type":"text","text":": zależności w kodzie źródłowym wskazują wyłącznie do środka. Nic w kręgu wewnętrznym nie zna nazw z zewnętrznego."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Przypadek użycia "},{"type":"text","text":"posiada swoje porty","marks":[{"type":"bold"}]},{"type":"text","text":": wejście (żądanie), wyjście (prezenter) i bramy do danych; frameworki są szczegółem."}]}]}]}]},{"type":"stats","attrs":{"items":[{"value":"2012","label":"wpis „The Clean Architecture”","hint":"Robert C. Martin łączy heksagon, cebulę, BCE i DCI"},{"value":"4","label":"kręgi na klasycznym rysunku","hint":"liczba nie jest święta – ważna jest reguła"},{"value":"1","label":"reguła zależności","hint":"wszystko inne z niej wynika"}]}},{"type":"heading","attrs":{"level":2,"id":"kontekst-i-sily"},"content":[{"type":"text","text":"Kontekst i siły"}]},{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Wiele kanałów","marks":[{"type":"bold"}]},{"type":"text","text":" – ta sama wymiana punktów z aplikacji, kasy i chatbota."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Zmienne reguły","marks":[{"type":"bold"}]},{"type":"text","text":" – biznes chce zmieniać progi i nagrody bez ruszania integracji."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Długi horyzont","marks":[{"type":"bold"}]},{"type":"text","text":" – framework webowy i baza zmienią się szybciej niż zasady lojalności."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Testowalność","marks":[{"type":"bold"}]},{"type":"text","text":" – przypadki użycia muszą dać się testować w milisekundach."}]}]}]},{"type":"paragraph","content":[{"type":"text","text":"Robert C. Martin w 2012 roku zauważył, że architektura heksagonalna, cebulowa, "},{"type":"text","text":"Boundary-Control-Entity","marks":[{"type":"italic"}]},{"type":"text","text":" Ivara Jacobsona i DCI mówią to samo, i zebrał to w jeden rysunek z regułą zależności. W 2017 roku rozwinął temat w książce "},{"type":"text","text":"Clean Architecture","marks":[{"type":"italic"}]},{"type":"text","text":"."}]},{"type":"heading","attrs":{"level":2,"id":"struktura"},"content":[{"type":"text","text":"Struktura"}]},{"type":"paragraph","content":[{"type":"text","text":"Kręgi narysowane jako zagnieżdżone prostokąty – zewnętrzny zawiera wewnętrzne, a strzałki zależności idą tylko do środka:"}]},{"type":"diagram","attrs":{"kind":"mermaid","code":"flowchart TB\n  subgraph fw[\"Frameworki i sterowniki: ASP.NET Core, Spring, Express, PostgreSQL, bramka SMS\"]\n    subgraph ad[\"Adaptery interfejsów: kontrolery, prezentery, bramy (gateways)\"]\n      subgraph uc[\"Przypadki użycia: RedeemReward, EarnPoints\"]\n        en([\"Encje: LoyaltyAccount, Reward\"])\n      end\n    end\n  end","caption":"Cztery kręgi czystej architektury (od zewnątrz do środka)"}},{"type":"table","content":[{"type":"tableRow","content":[{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Krąg"}]}]},{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Zawiera"}]}]},{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Zależy od"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Encje"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Reguły biznesu niezależne od aplikacji: "},{"type":"text","text":"LoyaltyAccount.Redeem","marks":[{"type":"code"}]}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"niczego"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Przypadki użycia"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Reguły aplikacji: interaktory, porty wejściowe i wyjściowe, DTO żądań i odpowiedzi"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"encji"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Adaptery interfejsów"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Kontrolery, prezentery, bramy do bazy, mapowanie formatów"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"przypadków użycia"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Frameworki i sterowniki"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Serwer HTTP, ORM, baza, kolejki, UI"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"adapterów (tylko „klej”)"}]}]}]}]},{"type":"paragraph","content":[{"type":"text","text":"Najmniej znanym, a najciekawszym elementem rysunku Martina jest prawy dolny róg: "},{"type":"text","text":"przepływ sterowania i zależności idą w różnych kierunkach","marks":[{"type":"bold"}]},{"type":"text","text":". Kontroler woła interaktor, interaktor woła prezenter – ale interaktor nie zna prezentera, tylko port wyjściowy, który sam zdefiniował:"}]},{"type":"diagram","attrs":{"kind":"mermaid","code":"flowchart LR\n  ctl[\"Controller\"] -- \"woła\" --> inp{{\"Input Port<br/>(RedeemReward)\"}}\n  inter[\"Interactor\"] -. \"implementuje\" .-> inp\n  inter -- \"woła\" --> outp{{\"Output Port<br/>(IRedeemRewardPresenter)\"}}\n  pres[\"Presenter\"] -. \"implementuje\" .-> outp\n  pres --> vm[\"ViewModel / odpowiedź HTTP\"]","caption":"Przekraczanie granicy: przepływ sterowania kontra zależności"}},{"type":"paragraph","content":[{"type":"text","text":"W wielu projektach port wejściowy jest po prostu publiczną metodą klasy interaktora, a prezenter zastępuje zwracana wartość. To uproszczenie jest w porządku, dopóki przypadek użycia nie zaczyna zwracać typów frameworka (np. "},{"type":"text","text":"IActionResult","marks":[{"type":"code"}]},{"type":"text","text":")."}]},{"type":"heading","attrs":{"level":2,"id":"jak-to-wyglada-w-kodzie"},"content":[{"type":"text","text":"Jak to wygląda w kodzie"}]},{"type":"codeGroup","attrs":{"title":"Struktura w pięciu stosach"},"content":[{"type":"codeBlock","attrs":{"language":"plaintext","filename":"dotnet/solution-tree.txt"},"content":[{"type":"text","text":"src/\n├── Loyalty.Domain/            ← ENTITIES: LoyaltyAccount, Reward, domain errors. No packages.\n├── Loyalty.Application/       ← USE CASES: RedeemReward interactor, ports (IAccounts, IRedeemRewardPresenter)\n├── Loyalty.Infrastructure/    ← FRAMEWORKS & DRIVERS: EF Core gateways, SMS, clock\n└── Loyalty.Web/               ← INTERFACE ADAPTERS + composition root: controllers, presenters, Program.cs\n   references: Web → Application, Infrastructure → Application → Domain"}]},{"type":"codeBlock","attrs":{"language":"plaintext","filename":"java/maven-modules.txt"},"content":[{"type":"text","text":"loyalty/\n├── loyalty-domain/            ← entities, plain Java, no Spring\n├── loyalty-application/       ← use cases + port interfaces (depends on domain)\n├── loyalty-adapters/          ← controllers, presenters, JPA gateways (depends on application)\n└── loyalty-boot/              ← @SpringBootApplication, wiring (depends on everything)"}]},{"type":"codeBlock","attrs":{"language":"plaintext","filename":"node/src-tree.txt"},"content":[{"type":"text","text":"src/\n├── domain/                    ← entities: loyalty-account.ts (no imports from outside domain/)\n├── application/               ← use cases + ports: redeem-reward.ts, ports.ts\n├── adapters/                  ← http/ (controllers, presenters), persistence/ (Prisma gateways)\n└── main.ts                    ← composition root: builds the object graph"}]},{"type":"codeBlock","attrs":{"language":"plaintext","filename":"go/module-tree.txt"},"content":[{"type":"text","text":"loyalty/\n├── domain/                    ← package domain: entities and rules\n├── usecase/                   ← package usecase: interactors + port interfaces\n├── adapter/\n│   ├── http/                  ← handlers and presenters\n│   └── postgres/              ← gateways implementing usecase ports\n└── cmd/loyalty/main.go        ← wiring"}]},{"type":"codeBlock","attrs":{"language":"plaintext","filename":"python/package-tree.txt"},"content":[{"type":"text","text":"loyalty/\n├── domain/                    ← dataclasses with behaviour, no framework imports\n├── application/               ← use cases + Protocol ports\n├── adapters/                  ← fastapi_routes.py, presenters.py, sqlalchemy_gateways.py\n└── main.py                    ← composition root"}]}]},{"type":"paragraph","content":[{"type":"text","text":"Przypadek użycia „wymień punkty na nagrodę” z encją, interaktorem, portami i prezenterem:"}]},{"type":"codeGroup","attrs":{"title":"Interaktor RedeemReward z portami"},"content":[{"type":"codeBlock","attrs":{"language":"csharp","filename":"RedeemReward.cs"},"content":[{"type":"text","text":"// ENTITIES (Loyalty.Domain) – rules true for every application of the business\npublic sealed class LoyaltyAccount(Guid customerId, int points)\n{\n    public Guid CustomerId { get; } = customerId;\n    public int Points { get; private set; } = points;\n\n    public void Redeem(Reward reward)\n    {\n        if (Points < reward.Cost) throw new NotEnoughPointsException(Points, reward.Cost);\n        Points -= reward.Cost;\n    }\n}\n\n// USE CASE (Loyalty.Application) – owns its ports, knows no framework\npublic sealed record RedeemRewardRequest(Guid CustomerId, string RewardCode);\npublic sealed record RedeemRewardResponse(string Reward, int PointsLeft);\n\npublic interface IAccounts { Task<LoyaltyAccount> Get(Guid id); Task Save(LoyaltyAccount a); }\npublic interface IRewards { Task<Reward> Get(string code); }\npublic interface IRedeemRewardPresenter                    // output port\n{\n    void Success(RedeemRewardResponse response);\n    void NotEnoughPoints(int has, int needs);\n}\n\npublic sealed class RedeemReward(IAccounts accounts, IRewards rewards)    // the interactor\n{\n    public async Task Execute(RedeemRewardRequest req, IRedeemRewardPresenter presenter)\n    {\n        var account = await accounts.Get(req.CustomerId);\n        var reward = await rewards.Get(req.RewardCode);\n        try { account.Redeem(reward); }\n        catch (NotEnoughPointsException e) { presenter.NotEnoughPoints(e.Has, e.Needs); return; }\n\n        await accounts.Save(account);\n        presenter.Success(new RedeemRewardResponse(reward.Name, account.Points));\n    }\n}\n\n// INTERFACE ADAPTER (Loyalty.Web) – a presenter turns the response into HTTP\npublic sealed class HttpRedeemPresenter : IRedeemRewardPresenter\n{\n    public IResult Result { get; private set; } = Results.StatusCode(500);\n    public void Success(RedeemRewardResponse r) => Result = Results.Ok(new { r.Reward, r.PointsLeft });\n    public void NotEnoughPoints(int has, int needs) =>\n        Result = Results.Problem($\"You have {has} points, this reward costs {needs}.\", statusCode: 422);\n}"}]},{"type":"codeBlock","attrs":{"language":"typescript","filename":"redeem-reward.ts"},"content":[{"type":"text","text":"// ENTITIES – src/domain/loyalty-account.ts\nexport class NotEnoughPoints extends Error {\n  constructor(readonly has: number, readonly needs: number) { super(\"not enough points\"); }\n}\n\nexport class LoyaltyAccount {\n  constructor(readonly customerId: string, private _points: number) {}\n  get points() { return this._points; }\n\n  redeem(reward: Reward): void {\n    if (this._points < reward.cost) throw new NotEnoughPoints(this._points, reward.cost);\n    this._points -= reward.cost;\n  }\n}\n\n// USE CASE – src/application/redeem-reward.ts (imports only from ../domain)\nexport interface Accounts { get(id: string): Promise<LoyaltyAccount>; save(a: LoyaltyAccount): Promise<void>; }\nexport interface Rewards { get(code: string): Promise<Reward>; }\nexport interface RedeemRewardPresenter {\n  success(r: { reward: string; pointsLeft: number }): void;\n  notEnoughPoints(has: number, needs: number): void;\n}\n\nexport class RedeemReward {\n  constructor(private readonly accounts: Accounts, private readonly rewards: Rewards) {}\n\n  async execute(req: { customerId: string; rewardCode: string }, out: RedeemRewardPresenter) {\n    const account = await this.accounts.get(req.customerId);\n    const reward = await this.rewards.get(req.rewardCode);\n    try {\n      account.redeem(reward);\n    } catch (e) {\n      if (e instanceof NotEnoughPoints) return out.notEnoughPoints(e.has, e.needs);\n      throw e;\n    }\n    await this.accounts.save(account);\n    out.success({ reward: reward.name, pointsLeft: account.points });\n  }\n}\n\n// INTERFACE ADAPTER – src/adapters/http/redeem.route.ts\napp.post(\"/rewards/redeem\", async (req, res) => {\n  await redeemReward.execute(req.body, {\n    success: (r) => res.json(r),\n    notEnoughPoints: (has, needs) => res.status(422).json({ error: `You have ${has}, need ${needs}` }),\n  });\n});"}]},{"type":"codeBlock","attrs":{"language":"java","filename":"RedeemReward.java"},"content":[{"type":"text","text":"// ENTITIES – loyalty-domain\npublic final class LoyaltyAccount {\n    private final UUID customerId;\n    private int points;\n\n    public LoyaltyAccount(UUID customerId, int points) { this.customerId = customerId; this.points = points; }\n\n    public void redeem(Reward reward) {\n        if (points < reward.cost()) throw new NotEnoughPointsException(points, reward.cost());\n        points -= reward.cost();\n    }\n    public int points() { return points; }\n}\n\n// USE CASE – loyalty-application (no Spring, no JPA)\npublic interface Accounts { LoyaltyAccount get(UUID id); void save(LoyaltyAccount account); }\npublic interface Rewards { Reward get(String code); }\npublic interface RedeemRewardPresenter {                 // output port\n    void success(String reward, int pointsLeft);\n    void notEnoughPoints(int has, int needs);\n}\n\npublic final class RedeemReward {                         // the interactor\n    private final Accounts accounts;\n    private final Rewards rewards;\n\n    public RedeemReward(Accounts accounts, Rewards rewards) { this.accounts = accounts; this.rewards = rewards; }\n\n    public void execute(UUID customerId, String rewardCode, RedeemRewardPresenter out) {\n        var account = accounts.get(customerId);\n        var reward = rewards.get(rewardCode);\n        try {\n            account.redeem(reward);\n        } catch (NotEnoughPointsException e) {\n            out.notEnoughPoints(e.has(), e.needs());\n            return;\n        }\n        accounts.save(account);\n        out.success(reward.name(), account.points());\n    }\n}"}]},{"type":"codeBlock","attrs":{"language":"go","filename":"usecase/redeem_reward.go"},"content":[{"type":"text","text":"package usecase\n\nimport (\n\t\"context\"\n\t\"errors\"\n\n\t\"loyalty/domain\"\n)\n\n// Ports owned by the use case; adapters in adapter/postgres and adapter/http implement them.\ntype Accounts interface {\n\tGet(ctx context.Context, id string) (*domain.LoyaltyAccount, error)\n\tSave(ctx context.Context, a *domain.LoyaltyAccount) error\n}\ntype Rewards interface {\n\tGet(ctx context.Context, code string) (domain.Reward, error)\n}\ntype RedeemRewardPresenter interface {\n\tSuccess(reward string, pointsLeft int)\n\tNotEnoughPoints(has, needs int)\n}\n\ntype RedeemReward struct {\n\tAccounts Accounts\n\tRewards  Rewards\n}\n\nfunc (uc RedeemReward) Execute(ctx context.Context, customerID, code string, out RedeemRewardPresenter) error {\n\tacc, err := uc.Accounts.Get(ctx, customerID)\n\tif err != nil {\n\t\treturn err\n\t}\n\treward, err := uc.Rewards.Get(ctx, code)\n\tif err != nil {\n\t\treturn err\n\t}\n\tvar np *domain.NotEnoughPointsError\n\tif err := acc.Redeem(reward); errors.As(err, &np) {\n\t\tout.NotEnoughPoints(np.Has, np.Needs)\n\t\treturn nil\n\t} else if err != nil {\n\t\treturn err\n\t}\n\tif err := uc.Accounts.Save(ctx, acc); err != nil {\n\t\treturn err\n\t}\n\tout.Success(reward.Name, acc.Points)\n\treturn nil\n}"}]},{"type":"codeBlock","attrs":{"language":"python","filename":"loyalty/application/redeem_reward.py"},"content":[{"type":"text","text":"from dataclasses import dataclass\nfrom typing import Protocol\n\nfrom loyalty.domain import LoyaltyAccount, NotEnoughPoints, Reward\n\n\nclass Accounts(Protocol):\n    def get(self, customer_id: str) -> LoyaltyAccount: ...\n    def save(self, account: LoyaltyAccount) -> None: ...\n\n\nclass Rewards(Protocol):\n    def get(self, code: str) -> Reward: ...\n\n\nclass RedeemRewardPresenter(Protocol):  # output port\n    def success(self, reward: str, points_left: int) -> None: ...\n    def not_enough_points(self, has: int, needs: int) -> None: ...\n\n\n@dataclass\nclass RedeemReward:  # the interactor: plain Python, no FastAPI, no SQLAlchemy\n    accounts: Accounts\n    rewards: Rewards\n\n    def execute(self, customer_id: str, reward_code: str, out: RedeemRewardPresenter) -> None:\n        account = self.accounts.get(customer_id)\n        reward = self.rewards.get(reward_code)\n        try:\n            account.redeem(reward)\n        except NotEnoughPoints as e:\n            out.not_enough_points(e.has, e.needs)\n            return\n        self.accounts.save(account)\n        out.success(reward.name, account.points)"}]}]}]},"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":"czysta-heksagonalna-cebulowa-czym-sie-roznia","text":"Czysta, heksagonalna, cebulowa – czym się różnią","level":2,"locked":true},{"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":17,"resources":[{"id":"6b0857be3c96f2d34d0b41d9","type":"article","provider":"web","url":"https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html","embedUrl":null,"title":"Clean Coder Blog","description":"","author":"Robert C. Martin","thumbnailUrl":null,"durationSec":null,"lang":"en","topics":["clean-architecture"],"techs":["general"],"tags":["clean-code","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":null,"popularity":90,"verifiedAt":"2026-11-26T11:25:57.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:59.965Z","updatedAt":"2026-11-26T16:00:59.965Z"},{"id":"6b0857b23c96f2d34d0b3441","type":"repo","provider":"github","url":"https://github.com/jasontaylordev/CleanArchitecture","embedUrl":null,"title":"jasontaylordev/CleanArchitecture","description":"Clean Architecture Solution Template for ASP.NET Core","author":"jasontaylordev","thumbnailUrl":"https://opengraph.githubassets.com/1/jasontaylordev/CleanArchitecture","durationSec":null,"lang":"en","topics":["clean-architecture","cqrs"],"techs":["dotnet","typescript"],"tags":["angular","asp-net","aspire","clean-architecture","dotnet","entity-framework","software-architecture","react","template","web-api"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"github","publishedAt":"2019-10-07T18:44:32.000Z","popularity":83,"verifiedAt":"2026-11-26T10:57:47.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:49.541Z","updatedAt":"2026-11-26T16:00:49.541Z"},{"id":"6b0857c63c96f2d34d0b48a1","type":"video","provider":"youtube","url":"https://www.youtube.com/watch?v=yB01HaG0i0w","embedUrl":"https://www.youtube-nocookie.com/embed/yB01HaG0i0w","title":"Unleashing Clean Architecture in .NET 8 - Jason Taylor - Copenhagen DevFest 2023","description":"Unleashing Clean Architecture in .NET 8: Exploring the Clean Architecture Solution Template Join us on a captivating exploration of Clean Architecture in the dynamic world of .NET 8. In this session, we deep dive into the Clean Architecture Solution Template, an open-source .NET template that…","author":"NDC Conferences","thumbnailUrl":"https://i.ytimg.com/vi/yB01HaG0i0w/hqdefault.jpg","durationSec":null,"lang":"en","topics":["clean-architecture"],"techs":["dotnet","typescript"],"tags":["software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"youtube-rss","publishedAt":"2023-09-30T18:21:16.000Z","popularity":71,"verifiedAt":"2026-11-26T11:13:14.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:10.095Z","updatedAt":"2026-11-26T16:01:10.095Z"},{"id":"6b0857b23c96f2d34d0b3448","type":"repo","provider":"github","url":"https://github.com/ardalis/CleanArchitecture","embedUrl":null,"title":"ardalis/CleanArchitecture","description":"Clean Architecture Solution Template: A proven Clean Architecture Template for ASP.NET Core 10","author":"ardalis","thumbnailUrl":"https://opengraph.githubassets.com/1/ardalis/CleanArchitecture","durationSec":null,"lang":"en","topics":["clean-architecture","ddd-strategic-design"],"techs":["dotnet"],"tags":["architecture","clean-architecture","csharp","ddd","domain-driven-design","dotnet","software-architecture","hacktoberfest"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"github","publishedAt":"2016-09-30T14:19:20.000Z","popularity":82,"verifiedAt":"2026-11-26T10:58:11.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:49.541Z","updatedAt":"2026-11-26T16:00:49.541Z"},{"id":"6b0857b63c96f2d34d0b3b08","type":"podcast","provider":"apple-podcasts","url":"https://podcasts.apple.com/us/podcast/clean-architecture-in-2023-with-steven-smith/id130068596?i=1000597647866","embedUrl":"https://embed.podcasts.apple.com/us/podcast/id130068596?i=1000597647866","title":"Clean Architecture in 2023 with Steven Smith","description":"How is clean architecture evolving? Carl and Richard talk to Steve Smith about his efforts to build applications using clean architecture principles. The conversation starts with a comment from a listener about idealism around architecture - and a reminder that while there isn't one right way to…","author":".NET Rocks!","thumbnailUrl":"https://is1-ssl.mzstatic.com/image/thumb/Podcasts126/v4/10/f0/c0/10f0c0f2-6009-7e29-9a0f-8c65e1f2811a/mza_122489257731652668.jpg/600x600bb.jpg","durationSec":3361,"lang":"en","topics":["clean-architecture"],"techs":["dotnet"],"tags":["podcast","software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"itunes","publishedAt":"2023-02-02T02:45:01.000Z","popularity":74,"verifiedAt":"2026-11-26T11:01:07.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:53.924Z","updatedAt":"2026-11-26T16:00:53.924Z"},{"id":"6b0857c03c96f2d34d0b43d1","type":"article","provider":"web","url":"https://milanjovanovic.tech/blog/clean-architecture-the-missing-chapter","embedUrl":null,"title":"Clean Architecture Project Structure in .NET","description":"Clean Architecture's famous diagram is often misinterpreted as a project structure, scattering business logic across artificial technical layers.","author":"Milan Jovanović","thumbnailUrl":"https://milanjovanovic.tech/blog-covers/mnw_114.png","durationSec":null,"lang":"en","topics":["clean-architecture"],"techs":["dotnet"],"tags":["software-architecture"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":"2024-11-02T00:00:00.000Z","popularity":50,"verifiedAt":"2026-11-26T11:29:05.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:02.417Z","updatedAt":"2026-11-26T16:01:02.417Z"}],"challenges":[],"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":false},{"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":true},{"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":"hexagonal-architecture","title":"Pierogi w Heksagonie"},"next":{"slug":"onion-architecture","title":"Architektura cebulowa: model domeny w środku, infrastruktura na zewnątrz"},"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}]}}