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
13 changes: 13 additions & 0 deletions architectures/backend-for-frontend/trade-offs.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ last_updated: 2026-03-29
4. **Maintenance Burden:** Requires frontend teams to have backend development and DevOps skills to maintain the BFF.


### Process Flow: BFF Lifecycle
```mermaid
graph LR
Client[Client App] -->|Request| BFF[BFF Service]
BFF -->|Aggregate Request| Microservices[Downstream Microservices]
Microservices -->|Response| BFF
BFF -->|Optimized Payload| Client

classDef component fill:#e8f5e9,stroke:#4caf50,stroke-width:2px,color:#000;
class Client,BFF,Microservices component;
```


### Structural Comparison: Pros vs Cons

| Category | Factor | Description |
Expand Down
30 changes: 30 additions & 0 deletions architectures/event-sourcing/folder-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,33 @@ src/
└── 📁 infrastructure/ # Event Store bindings, Repositories, Message Bus
└── EventStoreRepository.ts
```

```mermaid
classDiagram
class src {
}
class commands {
Intentions to change state
}
class events {
Facts that have occurred
}
class aggregates {
Domain entities that process commands
}
class projections {
Listeners that update read models
}
class infrastructure {
Event Store bindings
}

src *-- commands
src *-- events
src *-- aggregates
src *-- projections
src *-- infrastructure

classDef default fill:#e1f5fe,stroke:#03a9f4,stroke-width:2px,color:#000;
class src,commands,events,aggregates,projections,infrastructure default;
```
36 changes: 36 additions & 0 deletions architectures/micro-frontends/folder-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,42 @@ workspace/
│ └── event-bus/ (Agnostic communication contract types)
```

```mermaid
classDiagram
class workspace {
}
class apps {
}
class app_shell {
Entry point, Router
}
class mfe_catalog {
Independent app
}
class mfe_checkout {
Independent app
}
class packages {
}
class design_system {
Pure UI components
}
class event_bus {
Agnostic communication contracts
}

workspace *-- apps
apps *-- app_shell
apps *-- mfe_catalog
apps *-- mfe_checkout
workspace *-- packages
packages *-- design_system
packages *-- event_bus

classDef default fill:#e1f5fe,stroke:#03a9f4,stroke-width:2px,color:#000;
class workspace,apps,app_shell,mfe_catalog,mfe_checkout,packages,design_system,event_bus default;
```



### Structural Comparison: Monorepo vs Polyrepo for MFEs
Expand Down
30 changes: 30 additions & 0 deletions architectures/space-based-architecture/folder-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,36 @@ src/
└── recovery/
```

```mermaid
classDiagram
class src {
}
class api_gateway {
Routing and basic validation
}
class middleware {
Virtualized middleware
}
class processing_units {
Independent processing components
}
class data_grid {
IMDG configuration
}
class data_pumps {
Background services syncing IMDG to DB
}

src *-- api_gateway
src *-- middleware
src *-- processing_units
src *-- data_grid
src *-- data_pumps

classDef default fill:#e1f5fe,stroke:#03a9f4,stroke-width:2px,color:#000;
class src,api_gateway,middleware,processing_units,data_grid,data_pumps default;
```

## Layering Logic

- **api-gateway:** The initial entry point. Minimal logic.
Expand Down
9 changes: 9 additions & 0 deletions frontend/javascript/clean-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ if (isValid === true) { /* ... */ }
```
### ⚠️ Problem
Comparing a boolean to `true` or `false` is redundant. It adds visual noise without increasing safety.

### Structural Comparison: Boolean Checking

| Feature | `x === true` | `x` (Truthiness) |
| :--- | :--- | :--- |
| **Readability** | Redundant & noisy | Idiomatic & clean |
| **Execution** | Strict equality check | Truthy evaluation |
| **Cognitive Load** | Higher (extra tokens) | Lower (direct intent) |

### ✅ Best Practice
```javascript
if (isValid) { /* ... */ }
Expand Down
Loading