@radicaltools/mcp 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +148 -2
- package/dist/chunk-OGN3UW2D.js +2594 -0
- package/dist/elkLayout-S62RLGTO.js +8 -0
- package/dist/hub-catalogue/adr/adr-api-versioning.radical +53 -0
- package/dist/hub-catalogue/adr/adr-auth-strategy.radical +53 -0
- package/dist/hub-catalogue/adr/adr-caching-strategy.radical +59 -0
- package/dist/hub-catalogue/adr/adr-data-consistency-model.radical +40 -0
- package/dist/hub-catalogue/adr/adr-data-store.radical +47 -0
- package/dist/hub-catalogue/adr/adr-deployment-strategy.radical +53 -0
- package/dist/hub-catalogue/adr/adr-event-schema-evolution.radical +53 -0
- package/dist/hub-catalogue/adr/adr-integration-style.radical +50 -0
- package/dist/hub-catalogue/adr/adr-ledger-reconciliation-strategy.radical +38 -0
- package/dist/hub-catalogue/adr/adr-llm-provider-strategy.radical +40 -0
- package/dist/hub-catalogue/adr/adr-marketplace-payments-model.radical +39 -0
- package/dist/hub-catalogue/adr/adr-multi-region.radical +60 -0
- package/dist/hub-catalogue/adr/adr-multi-tenancy-strategy.radical +41 -0
- package/dist/hub-catalogue/adr/adr-observability.radical +59 -0
- package/dist/hub-catalogue/adr/adr-realtime-transport.radical +38 -0
- package/dist/hub-catalogue/adr/adr-tech-stack.radical +45 -0
- package/dist/hub-catalogue/adr/adr-zero-trust-network.radical +40 -0
- package/dist/hub-catalogue/blueprint/bp-ai-assistant-platform.radical +1641 -0
- package/dist/hub-catalogue/blueprint/bp-analytical-data-platform.radical +1428 -0
- package/dist/hub-catalogue/blueprint/bp-ecommerce-platform.radical +1989 -0
- package/dist/hub-catalogue/blueprint/bp-fintech-ledger-platform.radical +1701 -0
- package/dist/hub-catalogue/blueprint/bp-marketplace-platform.radical +1792 -0
- package/dist/hub-catalogue/blueprint/bp-realtime-collaboration.radical +1421 -0
- package/dist/hub-catalogue/blueprint/bp-saas-b2b-platform.radical +1713 -0
- package/dist/hub-catalogue/fitness-function/ff-accessibility-scan.radical +34 -0
- package/dist/hub-catalogue/fitness-function/ff-ai-eval-gate.radical +52 -0
- package/dist/hub-catalogue/fitness-function/ff-api-contract.radical +36 -0
- package/dist/hub-catalogue/fitness-function/ff-capacity-load-test.radical +67 -0
- package/dist/hub-catalogue/fitness-function/ff-carbon-footprint-guard.radical +62 -0
- package/dist/hub-catalogue/fitness-function/ff-change-failure-rate.radical +45 -0
- package/dist/hub-catalogue/fitness-function/ff-chaos-resilience-test.radical +53 -0
- package/dist/hub-catalogue/fitness-function/ff-cost-efficiency-guard.radical +64 -0
- package/dist/hub-catalogue/fitness-function/ff-coupling-guard.radical +45 -0
- package/dist/hub-catalogue/fitness-function/ff-data-integrity-check.radical +51 -0
- package/dist/hub-catalogue/fitness-function/ff-data-residency.radical +43 -0
- package/dist/hub-catalogue/fitness-function/ff-dependency-rules.radical +37 -0
- package/dist/hub-catalogue/fitness-function/ff-deploy-frequency.radical +46 -0
- package/dist/hub-catalogue/fitness-function/ff-dr-drill-success.radical +52 -0
- package/dist/hub-catalogue/fitness-function/ff-duplication-guard.radical +53 -0
- package/dist/hub-catalogue/fitness-function/ff-error-budget.radical +59 -0
- package/dist/hub-catalogue/fitness-function/ff-fail-safe-verification.radical +34 -0
- package/dist/hub-catalogue/fitness-function/ff-infra-drift.radical +34 -0
- package/dist/hub-catalogue/fitness-function/ff-latency-slo.radical +59 -0
- package/dist/hub-catalogue/fitness-function/ff-lead-time.radical +44 -0
- package/dist/hub-catalogue/fitness-function/ff-ledger-balance-integrity.radical +45 -0
- package/dist/hub-catalogue/fitness-function/ff-license-compliance.radical +43 -0
- package/dist/hub-catalogue/fitness-function/ff-mttr.radical +45 -0
- package/dist/hub-catalogue/fitness-function/ff-noisy-neighbor-guard.radical +66 -0
- package/dist/hub-catalogue/fitness-function/ff-sast-scan.radical +35 -0
- package/dist/hub-catalogue/fitness-function/ff-scale-out-verification.radical +66 -0
- package/dist/hub-catalogue/fitness-function/ff-security-scan.radical +45 -0
- package/dist/hub-catalogue/fitness-function/ff-startup-shutdown-check.radical +66 -0
- package/dist/hub-catalogue/fitness-function/ff-sync-convergence-test.radical +45 -0
- package/dist/hub-catalogue/fitness-function/ff-test-coverage.radical +43 -0
- package/dist/hub-catalogue/fitness-function/ff-web-vitals.radical +57 -0
- package/dist/hub-catalogue/pattern/pattern-anti-corruption-layer.radical +88 -0
- package/dist/hub-catalogue/pattern/pattern-api-gateway.radical +168 -0
- package/dist/hub-catalogue/pattern/pattern-bff.radical +179 -0
- package/dist/hub-catalogue/pattern/pattern-bulkhead.radical +114 -0
- package/dist/hub-catalogue/pattern/pattern-circuit-breaker.radical +219 -0
- package/dist/hub-catalogue/pattern/pattern-cqrs.radical +195 -0
- package/dist/hub-catalogue/pattern/pattern-crdt-sync.radical +200 -0
- package/dist/hub-catalogue/pattern/pattern-event-driven.radical +210 -0
- package/dist/hub-catalogue/pattern/pattern-event-sourced-ledger.radical +211 -0
- package/dist/hub-catalogue/pattern/pattern-hexagonal.radical +196 -0
- package/dist/hub-catalogue/pattern/pattern-microservices.radical +262 -0
- package/dist/hub-catalogue/pattern/pattern-rag-pipeline.radical +213 -0
- package/dist/hub-catalogue/pattern/pattern-rate-limiter.radical +114 -0
- package/dist/hub-catalogue/pattern/pattern-saga.radical +208 -0
- package/dist/hub-catalogue/pattern/pattern-sidecar.radical +123 -0
- package/dist/hub-catalogue/pattern/pattern-strangler-fig.radical +227 -0
- package/dist/hub-catalogue/pattern/pattern-transactional-outbox.radical +209 -0
- package/dist/hub-catalogue/requirement/req-accessibility.radical +48 -0
- package/dist/hub-catalogue/requirement/req-ai-autonomous-resolution.radical +51 -0
- package/dist/hub-catalogue/requirement/req-ai-groundedness.radical +45 -0
- package/dist/hub-catalogue/requirement/req-ai-human-handoff.radical +46 -0
- package/dist/hub-catalogue/requirement/req-alerting.radical +52 -0
- package/dist/hub-catalogue/requirement/req-api-response-time.radical +51 -0
- package/dist/hub-catalogue/requirement/req-api-standard.radical +45 -0
- package/dist/hub-catalogue/requirement/req-audit-logging.radical +43 -0
- package/dist/hub-catalogue/requirement/req-auth-response-time.radical +45 -0
- package/dist/hub-catalogue/requirement/req-auth.radical +43 -0
- package/dist/hub-catalogue/requirement/req-autoscaling.radical +62 -0
- package/dist/hub-catalogue/requirement/req-availability.radical +50 -0
- package/dist/hub-catalogue/requirement/req-backward-compatibility.radical +46 -0
- package/dist/hub-catalogue/requirement/req-batch-job-completion.radical +50 -0
- package/dist/hub-catalogue/requirement/req-carbon-efficiency.radical +64 -0
- package/dist/hub-catalogue/requirement/req-centralised-logging.radical +45 -0
- package/dist/hub-catalogue/requirement/req-ci-pipeline-time.radical +43 -0
- package/dist/hub-catalogue/requirement/req-code-complexity.radical +43 -0
- package/dist/hub-catalogue/requirement/req-config-propagation.radical +45 -0
- package/dist/hub-catalogue/requirement/req-data-integrity.radical +35 -0
- package/dist/hub-catalogue/requirement/req-data-retention.radical +44 -0
- package/dist/hub-catalogue/requirement/req-db-query-response.radical +44 -0
- package/dist/hub-catalogue/requirement/req-disaster-recovery.radical +59 -0
- package/dist/hub-catalogue/requirement/req-distributed-tracing.radical +45 -0
- package/dist/hub-catalogue/requirement/req-encryption.radical +49 -0
- package/dist/hub-catalogue/requirement/req-error-rate.radical +45 -0
- package/dist/hub-catalogue/requirement/req-error-recovery.radical +34 -0
- package/dist/hub-catalogue/requirement/req-event-schema-compatibility.radical +37 -0
- package/dist/hub-catalogue/requirement/req-fail-safe-default.radical +55 -0
- package/dist/hub-catalogue/requirement/req-fast-startup-graceful-shutdown.radical +69 -0
- package/dist/hub-catalogue/requirement/req-gdpr-erasure.radical +44 -0
- package/dist/hub-catalogue/requirement/req-graceful-degradation.radical +39 -0
- package/dist/hub-catalogue/requirement/req-health-checks.radical +43 -0
- package/dist/hub-catalogue/requirement/req-iac.radical +36 -0
- package/dist/hub-catalogue/requirement/req-idempotency.radical +47 -0
- package/dist/hub-catalogue/requirement/req-input-validation.radical +37 -0
- package/dist/hub-catalogue/requirement/req-least-privilege.radical +47 -0
- package/dist/hub-catalogue/requirement/req-ledger-immutability.radical +38 -0
- package/dist/hub-catalogue/requirement/req-mfa.radical +36 -0
- package/dist/hub-catalogue/requirement/req-ml-extraction-accuracy.radical +42 -0
- package/dist/hub-catalogue/requirement/req-onboarding-time.radical +42 -0
- package/dist/hub-catalogue/requirement/req-page-load-time.radical +59 -0
- package/dist/hub-catalogue/requirement/req-payout-latency.radical +46 -0
- package/dist/hub-catalogue/requirement/req-presence-latency.radical +46 -0
- package/dist/hub-catalogue/requirement/req-rate-limiting.radical +45 -0
- package/dist/hub-catalogue/requirement/req-report-generation.radical +44 -0
- package/dist/hub-catalogue/requirement/req-resource-efficiency.radical +64 -0
- package/dist/hub-catalogue/requirement/req-resource-headroom.radical +53 -0
- package/dist/hub-catalogue/requirement/req-resource-isolation.radical +37 -0
- package/dist/hub-catalogue/requirement/req-search-response-time.radical +44 -0
- package/dist/hub-catalogue/requirement/req-secrets-management.radical +45 -0
- package/dist/hub-catalogue/requirement/req-task-success-rate.radical +42 -0
- package/dist/hub-catalogue/requirement/req-test-coverage.radical +42 -0
- package/dist/hub-catalogue/requirement/req-throughput.radical +55 -0
- package/dist/hub-catalogue/requirement/req-vulnerability-scanning.radical +52 -0
- package/dist/hub-catalogue/requirement/req-zero-downtime-deploy.radical +39 -0
- package/dist/index.js +19422 -0
- package/package.json +48 -4
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hub": {
|
|
3
|
+
"id": "pattern-event-sourced-ledger",
|
|
4
|
+
"category": "pattern",
|
|
5
|
+
"name": "Event-Sourced Double-Entry Ledger",
|
|
6
|
+
"description": "Every financial fact is appended as an immutable journal entry whose debits and credits net to zero; account balances are a projection rebuilt by replaying the journal, never mutated directly, so the books can always be reconstructed and reconciled from the append-only source of truth.",
|
|
7
|
+
"tags": [
|
|
8
|
+
"fintech",
|
|
9
|
+
"ledger",
|
|
10
|
+
"event-sourcing",
|
|
11
|
+
"double-entry",
|
|
12
|
+
"compliance"
|
|
13
|
+
],
|
|
14
|
+
"requiredMetamodel": "c4-ddd-governance-builtin",
|
|
15
|
+
"hubRefs": [
|
|
16
|
+
"req-ledger-immutability",
|
|
17
|
+
"ff-ledger-balance-integrity",
|
|
18
|
+
"adr-ledger-reconciliation-strategy",
|
|
19
|
+
"pattern-cqrs",
|
|
20
|
+
"req-audit-logging"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"nodes": [
|
|
24
|
+
{
|
|
25
|
+
"id": "finance-ops",
|
|
26
|
+
"type": "person",
|
|
27
|
+
"label": "Finance Ops",
|
|
28
|
+
"description": "Reviews reconciliation exceptions and authorises compensating entries; never edits a posted entry directly.",
|
|
29
|
+
"width": 150,
|
|
30
|
+
"height": 170,
|
|
31
|
+
"collapsed": false,
|
|
32
|
+
"x": 0,
|
|
33
|
+
"y": 0
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "platform",
|
|
37
|
+
"type": "system",
|
|
38
|
+
"label": "Ledger Service",
|
|
39
|
+
"description": "Records every financial fact as a balanced, immutable journal entry and projects it into account balances.",
|
|
40
|
+
"width": 1040,
|
|
41
|
+
"height": 510,
|
|
42
|
+
"collapsed": false,
|
|
43
|
+
"x": 0,
|
|
44
|
+
"y": 290
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "posting-api",
|
|
48
|
+
"type": "container",
|
|
49
|
+
"label": "Posting API",
|
|
50
|
+
"description": "Validates that a transaction's debits and credits are balanced before appending it; rejects anything that isn't.",
|
|
51
|
+
"technology": "Java",
|
|
52
|
+
"parentId": "platform",
|
|
53
|
+
"width": 300,
|
|
54
|
+
"height": 200,
|
|
55
|
+
"collapsed": false,
|
|
56
|
+
"x": 30,
|
|
57
|
+
"y": 110
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "balance-projector",
|
|
61
|
+
"type": "container",
|
|
62
|
+
"label": "Balance Projector",
|
|
63
|
+
"description": "Replays the journal into current-balance read models; can be reset and rebuilt from genesis at any time.",
|
|
64
|
+
"technology": "Java worker",
|
|
65
|
+
"parentId": "platform",
|
|
66
|
+
"width": 300,
|
|
67
|
+
"height": 200,
|
|
68
|
+
"collapsed": false,
|
|
69
|
+
"x": 370,
|
|
70
|
+
"y": 110
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "reconciliation-worker",
|
|
74
|
+
"type": "container",
|
|
75
|
+
"label": "Reconciliation Worker",
|
|
76
|
+
"description": "Matches posted entries against the external settlement feed, continuously and in a nightly batch sweep.",
|
|
77
|
+
"technology": "Java worker",
|
|
78
|
+
"parentId": "platform",
|
|
79
|
+
"width": 300,
|
|
80
|
+
"height": 200,
|
|
81
|
+
"collapsed": false,
|
|
82
|
+
"x": 710,
|
|
83
|
+
"y": 110
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"id": "journal-store",
|
|
87
|
+
"type": "database",
|
|
88
|
+
"label": "Journal Store",
|
|
89
|
+
"description": "The system of record: every posted entry, ever, in the order it was accepted. Never updated, never deleted.",
|
|
90
|
+
"technology": "PostgreSQL (append-only)",
|
|
91
|
+
"parentId": "platform",
|
|
92
|
+
"width": 190,
|
|
93
|
+
"height": 130,
|
|
94
|
+
"collapsed": false,
|
|
95
|
+
"x": 30,
|
|
96
|
+
"y": 350
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "balance-store",
|
|
100
|
+
"type": "database",
|
|
101
|
+
"label": "Balance Store",
|
|
102
|
+
"description": "Denormalised current balance per account — a projection, safely rebuildable from the journal.",
|
|
103
|
+
"technology": "PostgreSQL",
|
|
104
|
+
"parentId": "platform",
|
|
105
|
+
"width": 190,
|
|
106
|
+
"height": 130,
|
|
107
|
+
"collapsed": false,
|
|
108
|
+
"x": 370,
|
|
109
|
+
"y": 350
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "bank-rail",
|
|
113
|
+
"type": "system",
|
|
114
|
+
"label": "Bank / Payment Rail",
|
|
115
|
+
"description": "Settles the underlying money movement and reports what actually cleared.",
|
|
116
|
+
"width": 360,
|
|
117
|
+
"height": 260,
|
|
118
|
+
"collapsed": false,
|
|
119
|
+
"x": 0,
|
|
120
|
+
"y": 920
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"relations": [
|
|
124
|
+
{
|
|
125
|
+
"id": "bank-rail--posting-api",
|
|
126
|
+
"sourceId": "bank-rail",
|
|
127
|
+
"targetId": "posting-api",
|
|
128
|
+
"label": "Reports a settled transaction",
|
|
129
|
+
"technology": "webhook"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"id": "posting-api--journal-store",
|
|
133
|
+
"sourceId": "posting-api",
|
|
134
|
+
"targetId": "journal-store",
|
|
135
|
+
"label": "Appends a balanced double-entry",
|
|
136
|
+
"technology": "SQL insert-only"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"id": "balance-projector--journal-store",
|
|
140
|
+
"sourceId": "balance-projector",
|
|
141
|
+
"targetId": "journal-store",
|
|
142
|
+
"label": "Replays / subscribes to new entries",
|
|
143
|
+
"technology": "SQL"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "balance-projector--balance-store",
|
|
147
|
+
"sourceId": "balance-projector",
|
|
148
|
+
"targetId": "balance-store",
|
|
149
|
+
"label": "Updates account balance projection",
|
|
150
|
+
"technology": "SQL"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"id": "reconciliation-worker--journal-store",
|
|
154
|
+
"sourceId": "reconciliation-worker",
|
|
155
|
+
"targetId": "journal-store",
|
|
156
|
+
"label": "Reads posted entries",
|
|
157
|
+
"technology": "SQL"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"id": "reconciliation-worker--bank-rail",
|
|
161
|
+
"sourceId": "reconciliation-worker",
|
|
162
|
+
"targetId": "bank-rail",
|
|
163
|
+
"label": "Fetches settlement statement (nightly batch)",
|
|
164
|
+
"technology": "SFTP / API"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"id": "finance-ops--posting-api",
|
|
168
|
+
"sourceId": "finance-ops",
|
|
169
|
+
"targetId": "posting-api",
|
|
170
|
+
"label": "Submits a compensating entry to correct a prior mistake — never edits the original",
|
|
171
|
+
"technology": "HTTPS"
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"sequences": [
|
|
175
|
+
{
|
|
176
|
+
"id": "pattern-event-sourced-ledger-seq",
|
|
177
|
+
"name": "Settle a transaction and update balances",
|
|
178
|
+
"relationIds": [
|
|
179
|
+
"bank-rail--posting-api",
|
|
180
|
+
"posting-api--journal-store",
|
|
181
|
+
"balance-projector--journal-store",
|
|
182
|
+
"balance-projector--balance-store"
|
|
183
|
+
],
|
|
184
|
+
"stepDescriptions": [
|
|
185
|
+
"Bank / payment rail reports a settled transaction.",
|
|
186
|
+
"Posting API checks the transaction's debits and credits sum to zero and appends it to the journal.",
|
|
187
|
+
"Balance projector picks up the new entry from its subscription to the journal.",
|
|
188
|
+
"Balance projector updates the affected accounts' balance projection — never the journal itself."
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
"views": [
|
|
193
|
+
{
|
|
194
|
+
"id": "pattern-event-sourced-ledger-flow",
|
|
195
|
+
"name": "Settle a transaction and update balances",
|
|
196
|
+
"kind": "dynamic",
|
|
197
|
+
"sequenceId": "pattern-event-sourced-ledger-seq",
|
|
198
|
+
"nodeIds": [
|
|
199
|
+
"finance-ops",
|
|
200
|
+
"platform",
|
|
201
|
+
"posting-api",
|
|
202
|
+
"balance-projector",
|
|
203
|
+
"reconciliation-worker",
|
|
204
|
+
"journal-store",
|
|
205
|
+
"balance-store",
|
|
206
|
+
"bank-rail"
|
|
207
|
+
],
|
|
208
|
+
"positions": {}
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hub": {
|
|
3
|
+
"id": "pattern-hexagonal",
|
|
4
|
+
"category": "pattern",
|
|
5
|
+
"name": "Hexagonal Architecture (Ports & Adapters)",
|
|
6
|
+
"description": "The domain model and application services sit in the middle with no framework or infrastructure dependencies; everything external — HTTP, databases, third parties — talks to them only through adapters that implement explicitly defined ports.",
|
|
7
|
+
"tags": [
|
|
8
|
+
"hexagonal",
|
|
9
|
+
"ports-and-adapters",
|
|
10
|
+
"clean-architecture",
|
|
11
|
+
"ddd",
|
|
12
|
+
"components"
|
|
13
|
+
],
|
|
14
|
+
"requiredMetamodel": "c4-ddd-governance-builtin",
|
|
15
|
+
"hubRefs": [
|
|
16
|
+
"ff-dependency-rules",
|
|
17
|
+
"ff-coupling-guard",
|
|
18
|
+
"req-code-complexity",
|
|
19
|
+
"pattern-anti-corruption-layer"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"nodes": [
|
|
23
|
+
{
|
|
24
|
+
"id": "customer",
|
|
25
|
+
"type": "person",
|
|
26
|
+
"label": "Customer",
|
|
27
|
+
"description": "Places and tracks orders.",
|
|
28
|
+
"x": 0,
|
|
29
|
+
"y": 0,
|
|
30
|
+
"width": 150,
|
|
31
|
+
"height": 170,
|
|
32
|
+
"collapsed": false
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "platform",
|
|
36
|
+
"type": "system",
|
|
37
|
+
"label": "Ordering System",
|
|
38
|
+
"description": "One service shown at component level.",
|
|
39
|
+
"x": 0,
|
|
40
|
+
"y": 270,
|
|
41
|
+
"width": 1030,
|
|
42
|
+
"height": 560,
|
|
43
|
+
"collapsed": false
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "service",
|
|
47
|
+
"type": "container",
|
|
48
|
+
"label": "Order Service",
|
|
49
|
+
"description": "Dependencies point inwards only: adapters → application → domain.",
|
|
50
|
+
"technology": "Kotlin / Spring Boot",
|
|
51
|
+
"parentId": "platform",
|
|
52
|
+
"x": 30,
|
|
53
|
+
"y": 110,
|
|
54
|
+
"width": 740,
|
|
55
|
+
"height": 420,
|
|
56
|
+
"collapsed": false
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "rest",
|
|
60
|
+
"type": "component",
|
|
61
|
+
"label": "REST Adapter (driving)",
|
|
62
|
+
"description": "Maps HTTP requests and responses to use-case calls. Knows nothing about persistence.",
|
|
63
|
+
"technology": "Spring MVC",
|
|
64
|
+
"parentId": "service",
|
|
65
|
+
"x": 30,
|
|
66
|
+
"y": 110,
|
|
67
|
+
"width": 200,
|
|
68
|
+
"height": 120,
|
|
69
|
+
"collapsed": false
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "app",
|
|
73
|
+
"type": "component",
|
|
74
|
+
"label": "Application Services",
|
|
75
|
+
"description": "Use cases such as PlaceOrder. Orchestrate the domain and call outbound ports (OrderRepository, PaymentGateway).",
|
|
76
|
+
"technology": "Plain Kotlin",
|
|
77
|
+
"parentId": "service",
|
|
78
|
+
"x": 270,
|
|
79
|
+
"y": 110,
|
|
80
|
+
"width": 200,
|
|
81
|
+
"height": 120,
|
|
82
|
+
"collapsed": false
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "domain",
|
|
86
|
+
"type": "component",
|
|
87
|
+
"label": "Domain Model",
|
|
88
|
+
"description": "Entities, value objects and invariants. Zero framework imports.",
|
|
89
|
+
"technology": "Plain Kotlin",
|
|
90
|
+
"parentId": "service",
|
|
91
|
+
"x": 510,
|
|
92
|
+
"y": 110,
|
|
93
|
+
"width": 200,
|
|
94
|
+
"height": 120,
|
|
95
|
+
"collapsed": false
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "repo",
|
|
99
|
+
"type": "component",
|
|
100
|
+
"label": "Repository Adapter (driven)",
|
|
101
|
+
"description": "Implements OrderRepository on top of the database.",
|
|
102
|
+
"technology": "Spring Data / JDBC",
|
|
103
|
+
"parentId": "service",
|
|
104
|
+
"x": 30,
|
|
105
|
+
"y": 270,
|
|
106
|
+
"width": 200,
|
|
107
|
+
"height": 120,
|
|
108
|
+
"collapsed": false
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "payment",
|
|
112
|
+
"type": "component",
|
|
113
|
+
"label": "Payment Adapter (driven)",
|
|
114
|
+
"description": "Implements PaymentGateway against the provider's API, including retries and mapping of provider errors.",
|
|
115
|
+
"technology": "HTTP client",
|
|
116
|
+
"parentId": "service",
|
|
117
|
+
"x": 270,
|
|
118
|
+
"y": 270,
|
|
119
|
+
"width": 200,
|
|
120
|
+
"height": 120,
|
|
121
|
+
"collapsed": false
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"id": "orders-db",
|
|
125
|
+
"type": "database",
|
|
126
|
+
"label": "Orders DB",
|
|
127
|
+
"description": "Relational storage; a detail hidden behind the repository port.",
|
|
128
|
+
"technology": "PostgreSQL",
|
|
129
|
+
"parentId": "platform",
|
|
130
|
+
"x": 810,
|
|
131
|
+
"y": 110,
|
|
132
|
+
"width": 190,
|
|
133
|
+
"height": 130,
|
|
134
|
+
"collapsed": false
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"id": "psp",
|
|
138
|
+
"type": "system",
|
|
139
|
+
"label": "Payment Provider",
|
|
140
|
+
"description": "External payment API.",
|
|
141
|
+
"external": true,
|
|
142
|
+
"x": 0,
|
|
143
|
+
"y": 930,
|
|
144
|
+
"width": 360,
|
|
145
|
+
"height": 260,
|
|
146
|
+
"collapsed": false
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"relations": [
|
|
150
|
+
{
|
|
151
|
+
"id": "customer--service",
|
|
152
|
+
"sourceId": "customer",
|
|
153
|
+
"targetId": "service",
|
|
154
|
+
"label": "Uses REST API",
|
|
155
|
+
"technology": "HTTPS / JSON"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"id": "rest--app",
|
|
159
|
+
"sourceId": "rest",
|
|
160
|
+
"targetId": "app",
|
|
161
|
+
"label": "Invokes use case (driving port)"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"id": "app--domain",
|
|
165
|
+
"sourceId": "app",
|
|
166
|
+
"targetId": "domain",
|
|
167
|
+
"label": "Executes domain logic"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"id": "app--repo",
|
|
171
|
+
"sourceId": "app",
|
|
172
|
+
"targetId": "repo",
|
|
173
|
+
"label": "OrderRepository port"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"id": "app--payment",
|
|
177
|
+
"sourceId": "app",
|
|
178
|
+
"targetId": "payment",
|
|
179
|
+
"label": "PaymentGateway port"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"id": "repo--orders-db",
|
|
183
|
+
"sourceId": "repo",
|
|
184
|
+
"targetId": "orders-db",
|
|
185
|
+
"label": "Reads / writes",
|
|
186
|
+
"technology": "SQL"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"id": "service--psp",
|
|
190
|
+
"sourceId": "service",
|
|
191
|
+
"targetId": "psp",
|
|
192
|
+
"label": "Charges card (via Payment Adapter)",
|
|
193
|
+
"technology": "HTTPS"
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hub": {
|
|
3
|
+
"id": "pattern-microservices",
|
|
4
|
+
"category": "pattern",
|
|
5
|
+
"name": "Microservices with Database per Service",
|
|
6
|
+
"description": "Independently deployable services, each owning its data store, fronted by a gateway and integrated through synchronous calls for queries and events for state changes.",
|
|
7
|
+
"tags": [
|
|
8
|
+
"microservices",
|
|
9
|
+
"distributed-systems",
|
|
10
|
+
"architecture",
|
|
11
|
+
"event-driven"
|
|
12
|
+
],
|
|
13
|
+
"requiredMetamodel": "c4-ddd-governance-builtin",
|
|
14
|
+
"hubRefs": [
|
|
15
|
+
"pattern-api-gateway",
|
|
16
|
+
"pattern-event-driven",
|
|
17
|
+
"adr-integration-style",
|
|
18
|
+
"req-health-checks",
|
|
19
|
+
"ff-coupling-guard",
|
|
20
|
+
"pattern-saga"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"nodes": [
|
|
24
|
+
{
|
|
25
|
+
"id": "customer",
|
|
26
|
+
"type": "person",
|
|
27
|
+
"label": "Customer",
|
|
28
|
+
"description": "Browses the catalogue and places orders.",
|
|
29
|
+
"x": 0,
|
|
30
|
+
"y": 0,
|
|
31
|
+
"width": 150,
|
|
32
|
+
"height": 170,
|
|
33
|
+
"collapsed": false
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "platform",
|
|
37
|
+
"type": "system",
|
|
38
|
+
"label": "Retail Platform",
|
|
39
|
+
"description": "Set of independently deployable services.",
|
|
40
|
+
"x": 0,
|
|
41
|
+
"y": 270,
|
|
42
|
+
"width": 1040,
|
|
43
|
+
"height": 750,
|
|
44
|
+
"collapsed": false
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "storefront",
|
|
48
|
+
"type": "webapp",
|
|
49
|
+
"label": "Storefront",
|
|
50
|
+
"description": "Single-page application served from a CDN.",
|
|
51
|
+
"technology": "React",
|
|
52
|
+
"parentId": "platform",
|
|
53
|
+
"x": 30,
|
|
54
|
+
"y": 110,
|
|
55
|
+
"width": 210,
|
|
56
|
+
"height": 140,
|
|
57
|
+
"collapsed": false
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "gateway",
|
|
61
|
+
"type": "container",
|
|
62
|
+
"label": "API Gateway",
|
|
63
|
+
"description": "Edge routing, authentication and rate limiting.",
|
|
64
|
+
"technology": "Envoy",
|
|
65
|
+
"parentId": "platform",
|
|
66
|
+
"x": 370,
|
|
67
|
+
"y": 110,
|
|
68
|
+
"width": 300,
|
|
69
|
+
"height": 200,
|
|
70
|
+
"collapsed": false
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "bus",
|
|
74
|
+
"type": "queue",
|
|
75
|
+
"label": "Event Bus",
|
|
76
|
+
"description": "Durable, partitioned event log shared by all services.",
|
|
77
|
+
"technology": "Apache Kafka",
|
|
78
|
+
"parentId": "platform",
|
|
79
|
+
"x": 710,
|
|
80
|
+
"y": 110,
|
|
81
|
+
"width": 220,
|
|
82
|
+
"height": 95,
|
|
83
|
+
"collapsed": false
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"id": "catalog",
|
|
87
|
+
"type": "container",
|
|
88
|
+
"label": "Catalog Service",
|
|
89
|
+
"description": "Products, prices, stock levels. Owns the catalogue data.",
|
|
90
|
+
"technology": "Go",
|
|
91
|
+
"parentId": "platform",
|
|
92
|
+
"x": 30,
|
|
93
|
+
"y": 350,
|
|
94
|
+
"width": 300,
|
|
95
|
+
"height": 200,
|
|
96
|
+
"collapsed": false
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "orders",
|
|
100
|
+
"type": "container",
|
|
101
|
+
"label": "Order Service",
|
|
102
|
+
"description": "Order lifecycle. Publishes OrderPlaced, reacts to PaymentCaptured.",
|
|
103
|
+
"technology": "Java / Spring Boot",
|
|
104
|
+
"parentId": "platform",
|
|
105
|
+
"x": 370,
|
|
106
|
+
"y": 350,
|
|
107
|
+
"width": 300,
|
|
108
|
+
"height": 200,
|
|
109
|
+
"collapsed": false
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "payments",
|
|
113
|
+
"type": "container",
|
|
114
|
+
"label": "Payment Service",
|
|
115
|
+
"description": "Charges cards via the provider and publishes payment outcomes.",
|
|
116
|
+
"technology": "Kotlin",
|
|
117
|
+
"parentId": "platform",
|
|
118
|
+
"x": 710,
|
|
119
|
+
"y": 350,
|
|
120
|
+
"width": 300,
|
|
121
|
+
"height": 200,
|
|
122
|
+
"collapsed": false
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"id": "catalog-db",
|
|
126
|
+
"type": "database",
|
|
127
|
+
"label": "Catalog DB",
|
|
128
|
+
"description": "Private to Catalog Service.",
|
|
129
|
+
"technology": "PostgreSQL",
|
|
130
|
+
"parentId": "platform",
|
|
131
|
+
"x": 30,
|
|
132
|
+
"y": 590,
|
|
133
|
+
"width": 190,
|
|
134
|
+
"height": 130,
|
|
135
|
+
"collapsed": false
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"id": "orders-db",
|
|
139
|
+
"type": "database",
|
|
140
|
+
"label": "Orders DB",
|
|
141
|
+
"description": "Private to Order Service.",
|
|
142
|
+
"technology": "PostgreSQL",
|
|
143
|
+
"parentId": "platform",
|
|
144
|
+
"x": 370,
|
|
145
|
+
"y": 590,
|
|
146
|
+
"width": 190,
|
|
147
|
+
"height": 130,
|
|
148
|
+
"collapsed": false
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id": "payments-db",
|
|
152
|
+
"type": "database",
|
|
153
|
+
"label": "Payments DB",
|
|
154
|
+
"description": "Private to Payment Service; stores provider references, never card data.",
|
|
155
|
+
"technology": "PostgreSQL",
|
|
156
|
+
"parentId": "platform",
|
|
157
|
+
"x": 710,
|
|
158
|
+
"y": 590,
|
|
159
|
+
"width": 190,
|
|
160
|
+
"height": 130,
|
|
161
|
+
"collapsed": false
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"id": "psp",
|
|
165
|
+
"type": "system",
|
|
166
|
+
"label": "Payment Provider",
|
|
167
|
+
"description": "External card-processing service.",
|
|
168
|
+
"external": true,
|
|
169
|
+
"x": 0,
|
|
170
|
+
"y": 1120,
|
|
171
|
+
"width": 360,
|
|
172
|
+
"height": 260,
|
|
173
|
+
"collapsed": false
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
"relations": [
|
|
177
|
+
{
|
|
178
|
+
"id": "customer--storefront",
|
|
179
|
+
"sourceId": "customer",
|
|
180
|
+
"targetId": "storefront",
|
|
181
|
+
"label": "Uses",
|
|
182
|
+
"technology": "HTTPS"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"id": "storefront--gateway",
|
|
186
|
+
"sourceId": "storefront",
|
|
187
|
+
"targetId": "gateway",
|
|
188
|
+
"label": "Calls API",
|
|
189
|
+
"technology": "HTTPS / JSON"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"id": "gateway--catalog",
|
|
193
|
+
"sourceId": "gateway",
|
|
194
|
+
"targetId": "catalog",
|
|
195
|
+
"label": "Routes catalogue requests",
|
|
196
|
+
"technology": "gRPC"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"id": "gateway--orders",
|
|
200
|
+
"sourceId": "gateway",
|
|
201
|
+
"targetId": "orders",
|
|
202
|
+
"label": "Routes order requests",
|
|
203
|
+
"technology": "HTTP"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"id": "catalog--catalog-db",
|
|
207
|
+
"sourceId": "catalog",
|
|
208
|
+
"targetId": "catalog-db",
|
|
209
|
+
"label": "Reads / writes",
|
|
210
|
+
"technology": "SQL"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"id": "orders--orders-db",
|
|
214
|
+
"sourceId": "orders",
|
|
215
|
+
"targetId": "orders-db",
|
|
216
|
+
"label": "Reads / writes",
|
|
217
|
+
"technology": "SQL"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"id": "payments--payments-db",
|
|
221
|
+
"sourceId": "payments",
|
|
222
|
+
"targetId": "payments-db",
|
|
223
|
+
"label": "Reads / writes",
|
|
224
|
+
"technology": "SQL"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"id": "orders--bus",
|
|
228
|
+
"sourceId": "orders",
|
|
229
|
+
"targetId": "bus",
|
|
230
|
+
"label": "Publishes OrderPlaced",
|
|
231
|
+
"technology": "Avro"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"id": "bus--payments",
|
|
235
|
+
"sourceId": "bus",
|
|
236
|
+
"targetId": "payments",
|
|
237
|
+
"label": "Delivers OrderPlaced",
|
|
238
|
+
"technology": "Consumer group"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"id": "payments--psp",
|
|
242
|
+
"sourceId": "payments",
|
|
243
|
+
"targetId": "psp",
|
|
244
|
+
"label": "Authorises and captures payment",
|
|
245
|
+
"technology": "HTTPS"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"id": "payments--bus",
|
|
249
|
+
"sourceId": "payments",
|
|
250
|
+
"targetId": "bus",
|
|
251
|
+
"label": "Publishes PaymentCaptured / PaymentFailed",
|
|
252
|
+
"technology": "Avro"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"id": "bus--orders",
|
|
256
|
+
"sourceId": "bus",
|
|
257
|
+
"targetId": "orders",
|
|
258
|
+
"label": "Delivers payment events",
|
|
259
|
+
"technology": "Consumer group"
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
}
|