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
6 changes: 4 additions & 2 deletions architectures/agentic-architecture/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ last_updated: 2026-04-17

# 🤖 Agentic Architecture (AI Agent Orchestration) Production-Ready Best Practices

# Context & Scope
[🏠 На главную](../readme.md)

## 🎯 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 +66,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
12 changes: 7 additions & 5 deletions architectures/backend-for-frontend/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,21 @@ 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
[🏠 На главную](../readme.md)

## 🎯 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 +61,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
16 changes: 9 additions & 7 deletions architectures/clean-architecture/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ 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
[🏠 На главную](../readme.md)

## 🎯 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 +43,7 @@ graph LR
class Isolation,Boundaries,Decoupling default;
```

## Architecture Diagram
## 📐 Architecture Diagram

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

---

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

### ❌ Bad Practice
```typescript
Expand Down Expand Up @@ -111,7 +113,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 +156,7 @@ export class UploadAvatarUseCase {

---

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

### ❌ Bad Practice
```typescript
Expand Down
12 changes: 7 additions & 5 deletions architectures/cqrs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ 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
[🏠 На главную](../readme.md)

## 🎯 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 +40,7 @@ graph LR
class Isolation,Boundaries,Decoupling default;
```

## Architecture Diagram
## 📐 Architecture Diagram

```mermaid
graph LR
Expand All @@ -62,7 +64,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
12 changes: 7 additions & 5 deletions architectures/domain-driven-design/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,23 @@ last_updated: 2026-03-22
---

Этот инженерный директив определяет **лучшие практики (best practices)** для архитектуры Domain-Driven Design. Данный документ спроектирован для обеспечения максимальной масштабируемости, безопасности и качества кода при разработке приложений корпоративного уровня.
# Context & Scope
[🏠 На главную](../readme.md)

## 🎯 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 +52,7 @@ graph TD

---

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

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

This engineering directive contains strict architectural guidelines and 2026-grade patterns for using Event-Driven Architecture (EDA) to build highly scalable, decoupled, and fault-tolerant backend systems.
## Context & Scope
### 🎯 Context & Scope
- **Primary Goal:** Provide a determinist structural blueprint for managing asynchronous communication across autonomous microservices or domains using event streams and message brokers.
- **Target Tooling:** AI Agents (Cursor, Copilot) and Senior/Architect Developers.
- **Tech Stack Version:** Agnostic (Kafka, RabbitMQ, AWS EventBridge, Redis Pub/Sub, Node.js, Spring Boot).
Expand All @@ -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,13 @@ graph LR
class Pub component;
```

## Core Principles
## 🗺️ Map of Patterns
- 🌊 [**Data Flow:** Request and Event Lifecycle](./data-flow.md)
- 📁 [**Folder Structure:** Absolute isolation of the Core engine from volatile Plugins](./folder-structure.md)
- ⚖️ [**Trade-offs:** Extensibility vs. Contract Management complexity](./trade-offs.md)
- 🛠️ [**Implementation Guide:** Rules for defining strict interface boundaries and registry mechanisms](./implementation-guide.md)

## 🧱 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 +80,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
12 changes: 7 additions & 5 deletions architectures/event-sourcing/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@ 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
[🏠 На главную](../readme.md)

## 🎯 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 +53,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