Skip to content

Commit e2a5d5e

Browse files
committed
docs: update architectural layers
1 parent 070f909 commit e2a5d5e

1 file changed

Lines changed: 75 additions & 1 deletion

File tree

docs/architecture/clean-architecture.md

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,81 @@ Linux EDR has been refactored to follow Clean Architecture principles, organizin
66

77
The system is organized into four primary layers, following the dependency rule where inner layers are independent of outer layers:
88

9-
![Clean Architecture Diagram](../assets/clean-architecture.png)
9+
```mermaid
10+
flowchart TB
11+
%% Interfaces Layer
12+
subgraph Interfaces
13+
direction TB
14+
CLI["CLI<br/>(cli.py)"]
15+
Controllers["Controllers"]
16+
end
17+
18+
%% Application Layer
19+
subgraph Application
20+
direction TB
21+
UseCases["Use Cases"]
22+
Services["Services"]
23+
end
24+
25+
%% Domain Layer
26+
subgraph Domain
27+
direction TB
28+
Models["Models<br/>(Pydantic)"]
29+
end
30+
31+
%% Infrastructure Layer
32+
subgraph Infrastructure
33+
direction TB
34+
Repositories["Repositories"]
35+
TraceReader["Trace Reader"]
36+
Aggregator["Aggregator"]
37+
Reporter["Reporter"]
38+
end
39+
40+
%% Orchestration & Legacy Components
41+
subgraph Orchestration & Legacy
42+
direction TB
43+
Scheduler["Scheduler<br/>(APScheduler)"]
44+
ReportManager["ReportManager"]
45+
Summary["Summary"]
46+
AppCore["App<br/>(app.py)"]
47+
Config["Config<br/>(config.py)"]
48+
LegacyTrace["trace.py"]
49+
LegacyAgg["aggregator.py"]
50+
LegacySum["summary.py"]
51+
LegacyRep["reporter.py"]
52+
LegacyMgr["report_manager.py"]
53+
LegacyModels["models.py"]
54+
LegacyCLI["cli.py"]
55+
end
56+
57+
%% Data / Control Flow
58+
CLI --> Controllers
59+
Controllers --> UseCases
60+
UseCases --> Services
61+
Services --> Models
62+
Services --> Repositories
63+
64+
TraceReader --> Aggregator
65+
Aggregator --> UseCases
66+
UseCases --> Reporter
67+
Reporter --> External["JSON files<br/>& OpenAI"]
68+
69+
Scheduler --> UseCases
70+
UseCases --> ReportManager
71+
ReportManager --> Summary
72+
Summary --> ReportManager
73+
74+
AppCore --> Config
75+
AppCore --> TraceReader
76+
AppCore --> LegacyTrace
77+
LegacyAgg --> Aggregator
78+
LegacySum --> Summary
79+
LegacyRep --> Reporter
80+
LegacyMgr --> ReportManager
81+
LegacyModels --> Models
82+
LegacyCLI --> CLI
83+
```
1084

1185
### Domain Layer
1286

0 commit comments

Comments
 (0)