Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions architectures/agentic-architecture/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ last_updated: 2026-04-17

# πŸ€– Agentic Architecture (AI Agent Orchestration) Production-Ready Best Practices

# Context & Scope
# 🎯 Context & Scope
- **Primary Goal:** Document and execute the best practices for AI Agent Orchestration and Multi-Agent Systems.
- **Target Tooling:** AI Agents and Human Developers.
- **Tech Stack Version:** Agnostic
Expand Down Expand Up @@ -64,7 +64,7 @@ Agentic Architecture emphasizes the decomposition of monolithic tasks into granu

---

## 1. Monolithic Agent State Management
## 🚧 1. Monolithic Agent State Management

### ❌ Bad Practice
```typescript
Expand Down
10 changes: 5 additions & 5 deletions architectures/backend-for-frontend/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ last_updated: 2026-03-29

This engineering directive defines the **best practices** for the Backend-For-Frontend (BFF) architecture. This document is designed to ensure maximum scalability, security, and code quality when developing applications that require tailored APIs for different clients (e.g., web, mobile).

# Context & Scope
# 🎯 Context & Scope
- **Primary Goal:** Provide strict architectural rules and practical patterns for creating specialized backend services dedicated to specific frontend applications.
- **Description:** A pattern where a separate backend service is created for each specific frontend application or interface type, rather than having a single general-purpose API backend for all clients.

## Map of Patterns
## πŸ—ΊοΈ Map of Patterns
- πŸ“Š [**Data Flow:** Request and Event Lifecycle](./data-flow.md)
- πŸ“ [**Folder Structure:** Layering logic](./folder-structure.md)
- βš–οΈ [**Trade-offs:** Pros, Cons, and System Constraints](./trade-offs.md)
- πŸ› οΈ [**Implementation Guide:** Code patterns and Anti-patterns](./implementation-guide.md)



### Structural Comparison: Backend-for-Frontend (BFF) vs API Gateway
### βš–οΈ Structural Comparison: Backend-for-Frontend (BFF) vs API Gateway

| Feature | Backend-for-Frontend (BFF) | API Gateway |
| :--- | :--- | :--- |
Expand Down Expand Up @@ -59,15 +59,15 @@ graph TD
```


## Core Principles
## 🧱 Core Principles

1. **Client Focus:** Each BFF is built and maintained by the same team that builds the frontend client.
2. **Aggregation:** The BFF orchestrates and aggregates calls to various downstream microservices.
3. **Resilience:** The BFF must gracefully handle failures from downstream services, ensuring a seamless user experience.

---

## 1. Single Universal API for All Clients
## 🚧 1. Single Universal API for All Clients

### ❌ Bad Practice
```typescript
Expand Down
2 changes: 1 addition & 1 deletion architectures/backend-for-frontend/trade-offs.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ last_updated: 2026-03-29
4. **Maintenance Burden:** Requires frontend teams to have backend development and DevOps skills to maintain the BFF.


### Structural Comparison: Pros vs Cons
### βš–οΈ Structural Comparison: Pros vs Cons

| Category | Factor | Description |
| :--- | :--- | :--- |
Expand Down
14 changes: 7 additions & 7 deletions architectures/clean-architecture/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ last_updated: 2026-03-29

This engineering directive defines the **best practices** for Clean Architecture. This document is designed to ensure maximum scalability, security, and code quality when developing enterprise-level applications.

# Context & Scope
# 🎯 Context & Scope
- **Primary Goal:** Provide strict architectural rules and practical patterns for creating scalable systems.
- > [!IMPORTANT]
> **Description:** A concept created by Robert C. Martin (Uncle Bob). It separates a project into concentric rings. The main rule is the Dependency Rule: dependencies MUST STRICTLY only point inward.

## Map of Patterns
## πŸ—ΊοΈ Map of Patterns
- πŸ“Š [**Data Flow:** Request and Event Lifecycle](./data-flow.md)
- πŸ“ [**Folder Structure:** Layering logic](./folder-structure.md)
- βš–οΈ [**Trade-offs:** Pros, Cons, and System Constraints](./trade-offs.md)
- πŸ› οΈ [**Implementation Guide:** Code patterns and Anti-patterns](./implementation-guide.md)

## Core Principles
## 🧱 Core Principles

1. **Isolation & Testability:** Changing a single feature doesn't break the entire business process.
2. **Strict Boundaries:** Enforce rigid structural barriers between business logic and infrastructure.
Expand All @@ -41,7 +41,7 @@ graph LR
class Isolation,Boundaries,Decoupling default;
```

## Architecture Diagram
## πŸ“ Architecture Diagram

```mermaid
graph TD
Expand All @@ -62,7 +62,7 @@ graph TD

---

## 1. ORM Models Bleeding into Domain
## 🚧 1. ORM Models Bleeding into Domain

### ❌ Bad Practice
```typescript
Expand Down Expand Up @@ -111,7 +111,7 @@ Isolate your Domain models from any external libraries. Use Data Mapper patterns

---

## 2. Direct Infrastructure Injection into Use Cases
## 🚧 2. Direct Infrastructure Injection into Use Cases

### ❌ Bad Practice
```typescript
Expand Down Expand Up @@ -154,7 +154,7 @@ export class UploadAvatarUseCase {

---

## 3. Fat Controllers Dictating Business Flow
## 🚧 3. Fat Controllers Dictating Business Flow

### ❌ Bad Practice
```typescript
Expand Down
10 changes: 5 additions & 5 deletions architectures/cqrs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ last_updated: 2026-03-29
---

This engineering directive defines the **best practices** for the CQRS (Command Query Responsibility Segregation) architecture. This document is designed to ensure maximum scalability, security, and code quality when developing enterprise-level applications.
# Context & Scope
# 🎯 Context & Scope
- **Primary Goal:** Provide strict architectural rules and practical patterns for creating scalable systems.
- **Description:** A powerful pattern where Commands (actions that mutate system data) are entirely decoupled from Queries (actions that only read data).
## Map of Patterns
## πŸ—ΊοΈ Map of Patterns
- πŸ“Š [**Data Flow:** Request and Event Lifecycle](./data-flow.md)
- πŸ“ [**Folder Structure:** Layering logic](./folder-structure.md)
- βš–οΈ [**Trade-offs:** Pros, Cons, and System Constraints](./trade-offs.md)
- πŸ› οΈ [**Implementation Guide:** Code patterns and Anti-patterns](./implementation-guide.md)
## Core Principles
## 🧱 Core Principles

1. **Isolation & Testability:** Changing a single feature doesn't break the entire business process.
2. **Strict Boundaries:** Enforce rigid structural barriers between business logic and infrastructure.
Expand All @@ -38,7 +38,7 @@ graph LR
class Isolation,Boundaries,Decoupling default;
```

## Architecture Diagram
## πŸ“ Architecture Diagram

```mermaid
graph LR
Expand All @@ -62,7 +62,7 @@ graph LR

---

## 1. Mixing Reads and Writes in a Monolithic Service
## 🚧 1. Mixing Reads and Writes in a Monolithic Service

### ❌ Bad Practice
```typescript
Expand Down
10 changes: 5 additions & 5 deletions architectures/domain-driven-design/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ last_updated: 2026-03-22
---

Π­Ρ‚ΠΎΡ‚ ΠΈΠ½ΠΆΠ΅Π½Π΅Ρ€Π½Ρ‹ΠΉ Π΄ΠΈΡ€Π΅ΠΊΡ‚ΠΈΠ² опрСдСляСт **Π»ΡƒΡ‡ΡˆΠΈΠ΅ ΠΏΡ€Π°ΠΊΡ‚ΠΈΠΊΠΈ (best practices)** для Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Ρ‹ Domain-Driven Design. Π”Π°Π½Π½Ρ‹ΠΉ Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚ спроСктирован для обСспСчСния максимальной ΠΌΠ°ΡΡˆΡ‚Π°Π±ΠΈΡ€ΡƒΠ΅ΠΌΠΎΡΡ‚ΠΈ, бСзопасности ΠΈ качСства ΠΊΠΎΠ΄Π° ΠΏΡ€ΠΈ Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ΅ ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ ΠΊΠΎΡ€ΠΏΠΎΡ€Π°Ρ‚ΠΈΠ²Π½ΠΎΠ³ΠΎ уровня.
# Context & Scope
# 🎯 Context & Scope
- **Primary Goal:** ΠŸΡ€Π΅Π΄ΠΎΡΡ‚Π°Π²ΠΈΡ‚ΡŒ строгиС Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Π½Ρ‹Π΅ ΠΏΡ€Π°Π²ΠΈΠ»Π° ΠΈ практичСскиС ΠΏΠ°Ρ‚Ρ‚Π΅Ρ€Π½Ρ‹ для создания ΠΌΠ°ΡΡˆΡ‚Π°Π±ΠΈΡ€ΡƒΠ΅ΠΌΡ‹Ρ… систСм.
- **Description:** A philosophy and design approach centered entirely around the business "Domain". The whole team communicates using a "Ubiquitous Language," and domains are split into Bounded Contexts.
## Map of Patterns
## πŸ—ΊοΈ Map of Patterns
- πŸ“Š [**Data Flow:** Request and Event Lifecycle](./data-flow.md)
- πŸ“ [**Folder Structure:** Layering logic](./folder-structure.md)
- βš–οΈ [**Trade-offs:** Pros, Cons, and System Constraints](./trade-offs.md)
- πŸ› οΈ [**Implementation Guide:** Code patterns and Anti-patterns](./implementation-guide.md)
## Core Principles
## 🧱 Core Principles

1. **Isolation & Testability:** Changing a single feature doesn't break the entire business process.
2. **Strict Boundaries:** Enforce rigid structural barriers between business logic and infrastructure.
3. **Decoupling:** Decouple how data is stored from how it is queried and displayed.

## Architecture Diagram
## πŸ“ Architecture Diagram

```mermaid
graph TD
Expand All @@ -50,7 +50,7 @@ graph TD

---

## 1. Anemic Domain Models
## 🚧 1. Anemic Domain Models

### ❌ Bad Practice
```typescript
Expand Down
8 changes: 4 additions & 4 deletions architectures/event-driven-architecture/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ To deeply understand the nuances of EDA, consult the following specialized modul
- πŸ› οΈ [**Implementation Guide:** Code patterns and Anti-patterns](./implementation-guide.md)
---

### Structural Comparison: Event-Driven vs Request-Response
### βš–οΈ Structural Comparison: Event-Driven vs Request-Response

| Feature | Event-Driven Architecture | Request-Response (REST/RPC) |
| :--- | :--- | :--- |
Expand All @@ -43,7 +43,7 @@ To deeply understand the nuances of EDA, consult the following specialized modul
| **Scalability** | Excellent (Easy to add new consumers) | Good (Requires load balancing) |
| **Complexity** | High (Eventual consistency, tracking flows) | Low (Straightforward flows) |

## Architecture Diagram
## πŸ“ Architecture Diagram

```mermaid
graph LR
Expand All @@ -62,7 +62,7 @@ graph LR
class Pub component;
```

## Core Principles
## 🧱 Core Principles

1. **Asynchronous by Default:** Synchronous RPC (REST/gRPC) is restricted only to immediate read-queries or initial gateway ingress. All inter-service state mutations must occur asynchronously.
2. **Event Sourcing (Optional but Recommended):** State is derived from an immutable, append-only log of events rather than overwriting records in a database.
Expand All @@ -74,7 +74,7 @@ graph LR
<b>Adhere to these EDA principles to establish a relentlessly scalable, highly-decoupled system ecosystem! πŸš€</b>
</div>

## 1. Synchronous Blocking on Events
## 🚧 1. Synchronous Blocking on Events

### ❌ Bad Practice
```typescript
Expand Down
10 changes: 5 additions & 5 deletions architectures/event-sourcing/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ last_updated: 2026-03-29

This engineering directive defines the **best practices** for the Event Sourcing architecture. This document is designed to ensure maximum scalability, security, and code quality when developing applications that require a robust audit trail and complex state reconstruction.

# Context & Scope
# 🎯 Context & Scope
- **Primary Goal:** Provide strict architectural rules and practical patterns for building systems where state is derived from an immutable sequence of events.
- **Description:** A pattern where all changes to application state are stored as a sequence of events. Instead of storing just the current state of the data in a domain, use an append-only store to record the full series of actions taken on that data.

## Map of Patterns
## πŸ—ΊοΈ Map of Patterns
- πŸ“Š [**Data Flow:** Request and Event Lifecycle](./data-flow.md)
- πŸ“ [**Folder Structure:** Layering logic](./folder-structure.md)
- βš–οΈ [**Trade-offs:** Pros, Cons, and System Constraints](./trade-offs.md)
- πŸ› οΈ [**Implementation Guide:** Code patterns and Anti-patterns](./implementation-guide.md)

## Architecture Diagram
## πŸ“ Architecture Diagram

```mermaid
graph TD
Expand All @@ -51,13 +51,13 @@ graph TD

---

## Core Principles
## 🧱 Core Principles

1. **Immutable Log:** Events are facts that happened in the past. They cannot be changed or deleted, only appended.
2. **Replayable State:** Any entity's current state can be fully reconstructed by replaying all its past events from the beginning.
3. **Decoupled Read/Write:** Often combined with CQRS, Event Sourcing naturally decouples the write model (Event Store) from the read models (Projections).

## 1. Mutating State Instead of Appending Events
## 🚧 1. Mutating State Instead of Appending Events

### ❌ Bad Practice
```typescript
Expand Down
Loading
Loading