@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.
Files changed (134) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +148 -2
  3. package/dist/chunk-OGN3UW2D.js +2594 -0
  4. package/dist/elkLayout-S62RLGTO.js +8 -0
  5. package/dist/hub-catalogue/adr/adr-api-versioning.radical +53 -0
  6. package/dist/hub-catalogue/adr/adr-auth-strategy.radical +53 -0
  7. package/dist/hub-catalogue/adr/adr-caching-strategy.radical +59 -0
  8. package/dist/hub-catalogue/adr/adr-data-consistency-model.radical +40 -0
  9. package/dist/hub-catalogue/adr/adr-data-store.radical +47 -0
  10. package/dist/hub-catalogue/adr/adr-deployment-strategy.radical +53 -0
  11. package/dist/hub-catalogue/adr/adr-event-schema-evolution.radical +53 -0
  12. package/dist/hub-catalogue/adr/adr-integration-style.radical +50 -0
  13. package/dist/hub-catalogue/adr/adr-ledger-reconciliation-strategy.radical +38 -0
  14. package/dist/hub-catalogue/adr/adr-llm-provider-strategy.radical +40 -0
  15. package/dist/hub-catalogue/adr/adr-marketplace-payments-model.radical +39 -0
  16. package/dist/hub-catalogue/adr/adr-multi-region.radical +60 -0
  17. package/dist/hub-catalogue/adr/adr-multi-tenancy-strategy.radical +41 -0
  18. package/dist/hub-catalogue/adr/adr-observability.radical +59 -0
  19. package/dist/hub-catalogue/adr/adr-realtime-transport.radical +38 -0
  20. package/dist/hub-catalogue/adr/adr-tech-stack.radical +45 -0
  21. package/dist/hub-catalogue/adr/adr-zero-trust-network.radical +40 -0
  22. package/dist/hub-catalogue/blueprint/bp-ai-assistant-platform.radical +1641 -0
  23. package/dist/hub-catalogue/blueprint/bp-analytical-data-platform.radical +1428 -0
  24. package/dist/hub-catalogue/blueprint/bp-ecommerce-platform.radical +1989 -0
  25. package/dist/hub-catalogue/blueprint/bp-fintech-ledger-platform.radical +1701 -0
  26. package/dist/hub-catalogue/blueprint/bp-marketplace-platform.radical +1792 -0
  27. package/dist/hub-catalogue/blueprint/bp-realtime-collaboration.radical +1421 -0
  28. package/dist/hub-catalogue/blueprint/bp-saas-b2b-platform.radical +1713 -0
  29. package/dist/hub-catalogue/fitness-function/ff-accessibility-scan.radical +34 -0
  30. package/dist/hub-catalogue/fitness-function/ff-ai-eval-gate.radical +52 -0
  31. package/dist/hub-catalogue/fitness-function/ff-api-contract.radical +36 -0
  32. package/dist/hub-catalogue/fitness-function/ff-capacity-load-test.radical +67 -0
  33. package/dist/hub-catalogue/fitness-function/ff-carbon-footprint-guard.radical +62 -0
  34. package/dist/hub-catalogue/fitness-function/ff-change-failure-rate.radical +45 -0
  35. package/dist/hub-catalogue/fitness-function/ff-chaos-resilience-test.radical +53 -0
  36. package/dist/hub-catalogue/fitness-function/ff-cost-efficiency-guard.radical +64 -0
  37. package/dist/hub-catalogue/fitness-function/ff-coupling-guard.radical +45 -0
  38. package/dist/hub-catalogue/fitness-function/ff-data-integrity-check.radical +51 -0
  39. package/dist/hub-catalogue/fitness-function/ff-data-residency.radical +43 -0
  40. package/dist/hub-catalogue/fitness-function/ff-dependency-rules.radical +37 -0
  41. package/dist/hub-catalogue/fitness-function/ff-deploy-frequency.radical +46 -0
  42. package/dist/hub-catalogue/fitness-function/ff-dr-drill-success.radical +52 -0
  43. package/dist/hub-catalogue/fitness-function/ff-duplication-guard.radical +53 -0
  44. package/dist/hub-catalogue/fitness-function/ff-error-budget.radical +59 -0
  45. package/dist/hub-catalogue/fitness-function/ff-fail-safe-verification.radical +34 -0
  46. package/dist/hub-catalogue/fitness-function/ff-infra-drift.radical +34 -0
  47. package/dist/hub-catalogue/fitness-function/ff-latency-slo.radical +59 -0
  48. package/dist/hub-catalogue/fitness-function/ff-lead-time.radical +44 -0
  49. package/dist/hub-catalogue/fitness-function/ff-ledger-balance-integrity.radical +45 -0
  50. package/dist/hub-catalogue/fitness-function/ff-license-compliance.radical +43 -0
  51. package/dist/hub-catalogue/fitness-function/ff-mttr.radical +45 -0
  52. package/dist/hub-catalogue/fitness-function/ff-noisy-neighbor-guard.radical +66 -0
  53. package/dist/hub-catalogue/fitness-function/ff-sast-scan.radical +35 -0
  54. package/dist/hub-catalogue/fitness-function/ff-scale-out-verification.radical +66 -0
  55. package/dist/hub-catalogue/fitness-function/ff-security-scan.radical +45 -0
  56. package/dist/hub-catalogue/fitness-function/ff-startup-shutdown-check.radical +66 -0
  57. package/dist/hub-catalogue/fitness-function/ff-sync-convergence-test.radical +45 -0
  58. package/dist/hub-catalogue/fitness-function/ff-test-coverage.radical +43 -0
  59. package/dist/hub-catalogue/fitness-function/ff-web-vitals.radical +57 -0
  60. package/dist/hub-catalogue/pattern/pattern-anti-corruption-layer.radical +88 -0
  61. package/dist/hub-catalogue/pattern/pattern-api-gateway.radical +168 -0
  62. package/dist/hub-catalogue/pattern/pattern-bff.radical +179 -0
  63. package/dist/hub-catalogue/pattern/pattern-bulkhead.radical +114 -0
  64. package/dist/hub-catalogue/pattern/pattern-circuit-breaker.radical +219 -0
  65. package/dist/hub-catalogue/pattern/pattern-cqrs.radical +195 -0
  66. package/dist/hub-catalogue/pattern/pattern-crdt-sync.radical +200 -0
  67. package/dist/hub-catalogue/pattern/pattern-event-driven.radical +210 -0
  68. package/dist/hub-catalogue/pattern/pattern-event-sourced-ledger.radical +211 -0
  69. package/dist/hub-catalogue/pattern/pattern-hexagonal.radical +196 -0
  70. package/dist/hub-catalogue/pattern/pattern-microservices.radical +262 -0
  71. package/dist/hub-catalogue/pattern/pattern-rag-pipeline.radical +213 -0
  72. package/dist/hub-catalogue/pattern/pattern-rate-limiter.radical +114 -0
  73. package/dist/hub-catalogue/pattern/pattern-saga.radical +208 -0
  74. package/dist/hub-catalogue/pattern/pattern-sidecar.radical +123 -0
  75. package/dist/hub-catalogue/pattern/pattern-strangler-fig.radical +227 -0
  76. package/dist/hub-catalogue/pattern/pattern-transactional-outbox.radical +209 -0
  77. package/dist/hub-catalogue/requirement/req-accessibility.radical +48 -0
  78. package/dist/hub-catalogue/requirement/req-ai-autonomous-resolution.radical +51 -0
  79. package/dist/hub-catalogue/requirement/req-ai-groundedness.radical +45 -0
  80. package/dist/hub-catalogue/requirement/req-ai-human-handoff.radical +46 -0
  81. package/dist/hub-catalogue/requirement/req-alerting.radical +52 -0
  82. package/dist/hub-catalogue/requirement/req-api-response-time.radical +51 -0
  83. package/dist/hub-catalogue/requirement/req-api-standard.radical +45 -0
  84. package/dist/hub-catalogue/requirement/req-audit-logging.radical +43 -0
  85. package/dist/hub-catalogue/requirement/req-auth-response-time.radical +45 -0
  86. package/dist/hub-catalogue/requirement/req-auth.radical +43 -0
  87. package/dist/hub-catalogue/requirement/req-autoscaling.radical +62 -0
  88. package/dist/hub-catalogue/requirement/req-availability.radical +50 -0
  89. package/dist/hub-catalogue/requirement/req-backward-compatibility.radical +46 -0
  90. package/dist/hub-catalogue/requirement/req-batch-job-completion.radical +50 -0
  91. package/dist/hub-catalogue/requirement/req-carbon-efficiency.radical +64 -0
  92. package/dist/hub-catalogue/requirement/req-centralised-logging.radical +45 -0
  93. package/dist/hub-catalogue/requirement/req-ci-pipeline-time.radical +43 -0
  94. package/dist/hub-catalogue/requirement/req-code-complexity.radical +43 -0
  95. package/dist/hub-catalogue/requirement/req-config-propagation.radical +45 -0
  96. package/dist/hub-catalogue/requirement/req-data-integrity.radical +35 -0
  97. package/dist/hub-catalogue/requirement/req-data-retention.radical +44 -0
  98. package/dist/hub-catalogue/requirement/req-db-query-response.radical +44 -0
  99. package/dist/hub-catalogue/requirement/req-disaster-recovery.radical +59 -0
  100. package/dist/hub-catalogue/requirement/req-distributed-tracing.radical +45 -0
  101. package/dist/hub-catalogue/requirement/req-encryption.radical +49 -0
  102. package/dist/hub-catalogue/requirement/req-error-rate.radical +45 -0
  103. package/dist/hub-catalogue/requirement/req-error-recovery.radical +34 -0
  104. package/dist/hub-catalogue/requirement/req-event-schema-compatibility.radical +37 -0
  105. package/dist/hub-catalogue/requirement/req-fail-safe-default.radical +55 -0
  106. package/dist/hub-catalogue/requirement/req-fast-startup-graceful-shutdown.radical +69 -0
  107. package/dist/hub-catalogue/requirement/req-gdpr-erasure.radical +44 -0
  108. package/dist/hub-catalogue/requirement/req-graceful-degradation.radical +39 -0
  109. package/dist/hub-catalogue/requirement/req-health-checks.radical +43 -0
  110. package/dist/hub-catalogue/requirement/req-iac.radical +36 -0
  111. package/dist/hub-catalogue/requirement/req-idempotency.radical +47 -0
  112. package/dist/hub-catalogue/requirement/req-input-validation.radical +37 -0
  113. package/dist/hub-catalogue/requirement/req-least-privilege.radical +47 -0
  114. package/dist/hub-catalogue/requirement/req-ledger-immutability.radical +38 -0
  115. package/dist/hub-catalogue/requirement/req-mfa.radical +36 -0
  116. package/dist/hub-catalogue/requirement/req-ml-extraction-accuracy.radical +42 -0
  117. package/dist/hub-catalogue/requirement/req-onboarding-time.radical +42 -0
  118. package/dist/hub-catalogue/requirement/req-page-load-time.radical +59 -0
  119. package/dist/hub-catalogue/requirement/req-payout-latency.radical +46 -0
  120. package/dist/hub-catalogue/requirement/req-presence-latency.radical +46 -0
  121. package/dist/hub-catalogue/requirement/req-rate-limiting.radical +45 -0
  122. package/dist/hub-catalogue/requirement/req-report-generation.radical +44 -0
  123. package/dist/hub-catalogue/requirement/req-resource-efficiency.radical +64 -0
  124. package/dist/hub-catalogue/requirement/req-resource-headroom.radical +53 -0
  125. package/dist/hub-catalogue/requirement/req-resource-isolation.radical +37 -0
  126. package/dist/hub-catalogue/requirement/req-search-response-time.radical +44 -0
  127. package/dist/hub-catalogue/requirement/req-secrets-management.radical +45 -0
  128. package/dist/hub-catalogue/requirement/req-task-success-rate.radical +42 -0
  129. package/dist/hub-catalogue/requirement/req-test-coverage.radical +42 -0
  130. package/dist/hub-catalogue/requirement/req-throughput.radical +55 -0
  131. package/dist/hub-catalogue/requirement/req-vulnerability-scanning.radical +52 -0
  132. package/dist/hub-catalogue/requirement/req-zero-downtime-deploy.radical +39 -0
  133. package/dist/index.js +19422 -0
  134. package/package.json +48 -4
@@ -0,0 +1,179 @@
1
+ {
2
+ "hub": {
3
+ "id": "pattern-bff",
4
+ "category": "pattern",
5
+ "name": "Backend for Frontend (BFF)",
6
+ "description": "Each client channel gets its own thin backend shaped around that channel's screens and interaction model, instead of every channel consuming one generic API. Aggregation, field-shaping and channel-specific session handling live in the BFF; domain logic stays in the services behind it.",
7
+ "tags": [
8
+ "bff",
9
+ "api-aggregation",
10
+ "mobile",
11
+ "frontend",
12
+ "api-gateway"
13
+ ],
14
+ "requiredMetamodel": "c4-ddd-governance-builtin",
15
+ "hubRefs": [
16
+ "pattern-api-gateway",
17
+ "req-page-load-time",
18
+ "adr-integration-style"
19
+ ]
20
+ },
21
+ "nodes": [
22
+ {
23
+ "id": "web-user",
24
+ "type": "person",
25
+ "label": "Web User",
26
+ "description": "Browses and buys on the desktop web app.",
27
+ "width": 150,
28
+ "height": 170,
29
+ "collapsed": false,
30
+ "x": 0,
31
+ "y": 0
32
+ },
33
+ {
34
+ "id": "mobile-user",
35
+ "type": "person",
36
+ "label": "Mobile User",
37
+ "description": "Uses the native mobile app, often on a slower connection.",
38
+ "width": 150,
39
+ "height": 170,
40
+ "collapsed": false,
41
+ "x": 210,
42
+ "y": 0
43
+ },
44
+ {
45
+ "id": "platform",
46
+ "type": "system",
47
+ "label": "Storefront Platform",
48
+ "description": "One set of domain services, fronted by a BFF per channel instead of one generic API.",
49
+ "width": 1040,
50
+ "height": 580,
51
+ "collapsed": false,
52
+ "x": 0,
53
+ "y": 290
54
+ },
55
+ {
56
+ "id": "web-bff",
57
+ "type": "container",
58
+ "label": "Web BFF",
59
+ "description": "Aggregates and shapes responses for the desktop web app; owns the web session.",
60
+ "technology": "Node.js / GraphQL",
61
+ "parentId": "platform",
62
+ "width": 300,
63
+ "height": 200,
64
+ "collapsed": false,
65
+ "x": 30,
66
+ "y": 110
67
+ },
68
+ {
69
+ "id": "mobile-bff",
70
+ "type": "container",
71
+ "label": "Mobile BFF",
72
+ "description": "Smaller payloads and field-level trimming tuned for mobile bandwidth and screens.",
73
+ "technology": "Node.js / GraphQL",
74
+ "parentId": "platform",
75
+ "width": 300,
76
+ "height": 200,
77
+ "collapsed": false,
78
+ "x": 370,
79
+ "y": 110
80
+ },
81
+ {
82
+ "id": "catalog-service",
83
+ "type": "container",
84
+ "label": "Catalog Service",
85
+ "description": "Owns product data. No channel-specific logic.",
86
+ "technology": "Java",
87
+ "parentId": "platform",
88
+ "width": 300,
89
+ "height": 200,
90
+ "collapsed": false,
91
+ "x": 30,
92
+ "y": 350
93
+ },
94
+ {
95
+ "id": "pricing-service",
96
+ "type": "container",
97
+ "label": "Pricing Service",
98
+ "description": "Computes prices and active promotions.",
99
+ "technology": "Java",
100
+ "parentId": "platform",
101
+ "width": 300,
102
+ "height": 200,
103
+ "collapsed": false,
104
+ "x": 370,
105
+ "y": 350
106
+ },
107
+ {
108
+ "id": "order-service",
109
+ "type": "container",
110
+ "label": "Order Service",
111
+ "description": "Owns order placement and status.",
112
+ "technology": "Java",
113
+ "parentId": "platform",
114
+ "width": 300,
115
+ "height": 200,
116
+ "collapsed": false,
117
+ "x": 710,
118
+ "y": 350
119
+ }
120
+ ],
121
+ "relations": [
122
+ {
123
+ "id": "web-user--web-bff",
124
+ "sourceId": "web-user",
125
+ "targetId": "web-bff",
126
+ "label": "Uses web app",
127
+ "technology": "HTTPS"
128
+ },
129
+ {
130
+ "id": "mobile-user--mobile-bff",
131
+ "sourceId": "mobile-user",
132
+ "targetId": "mobile-bff",
133
+ "label": "Uses mobile app",
134
+ "technology": "HTTPS / JSON"
135
+ },
136
+ {
137
+ "id": "web-bff--catalog-service",
138
+ "sourceId": "web-bff",
139
+ "targetId": "catalog-service",
140
+ "label": "Product detail, full fields",
141
+ "technology": "gRPC"
142
+ },
143
+ {
144
+ "id": "web-bff--pricing-service",
145
+ "sourceId": "web-bff",
146
+ "targetId": "pricing-service",
147
+ "label": "Price + promotions",
148
+ "technology": "gRPC"
149
+ },
150
+ {
151
+ "id": "web-bff--order-service",
152
+ "sourceId": "web-bff",
153
+ "targetId": "order-service",
154
+ "label": "Order history, full detail",
155
+ "technology": "gRPC"
156
+ },
157
+ {
158
+ "id": "mobile-bff--catalog-service",
159
+ "sourceId": "mobile-bff",
160
+ "targetId": "catalog-service",
161
+ "label": "Product summary, trimmed fields",
162
+ "technology": "gRPC"
163
+ },
164
+ {
165
+ "id": "mobile-bff--pricing-service",
166
+ "sourceId": "mobile-bff",
167
+ "targetId": "pricing-service",
168
+ "label": "Price only",
169
+ "technology": "gRPC"
170
+ },
171
+ {
172
+ "id": "mobile-bff--order-service",
173
+ "sourceId": "mobile-bff",
174
+ "targetId": "order-service",
175
+ "label": "Order status, push-friendly shape",
176
+ "technology": "gRPC"
177
+ }
178
+ ]
179
+ }
@@ -0,0 +1,114 @@
1
+ {
2
+ "hub": {
3
+ "id": "pattern-bulkhead",
4
+ "category": "pattern",
5
+ "name": "Bulkhead Isolation",
6
+ "description": "Resources used to call each downstream dependency — connection pools, thread pools, queues — are partitioned per dependency instead of shared. A slow or failing dependency exhausts only its own bulkhead, leaving capacity for calls to every other dependency.",
7
+ "tags": [
8
+ "bulkhead",
9
+ "resilience",
10
+ "isolation",
11
+ "resource-pools",
12
+ "fault-tolerance"
13
+ ],
14
+ "requiredMetamodel": "c4-ddd-governance-builtin",
15
+ "hubRefs": [
16
+ "pattern-circuit-breaker",
17
+ "req-graceful-degradation",
18
+ "ff-latency-slo",
19
+ "ff-chaos-resilience-test"
20
+ ]
21
+ },
22
+ "nodes": [
23
+ {
24
+ "id": "platform",
25
+ "type": "system",
26
+ "label": "Checkout Service",
27
+ "description": "One slow dependency must not exhaust the resources every other dependency also needs.",
28
+ "width": 560,
29
+ "height": 400,
30
+ "collapsed": false,
31
+ "x": 0,
32
+ "y": 0
33
+ },
34
+ {
35
+ "id": "api-service",
36
+ "type": "container",
37
+ "label": "Checkout API",
38
+ "description": "Calls two external providers through separate resource pools instead of one shared pool.",
39
+ "technology": "Java",
40
+ "parentId": "platform",
41
+ "width": 500,
42
+ "height": 260,
43
+ "collapsed": false,
44
+ "x": 30,
45
+ "y": 110
46
+ },
47
+ {
48
+ "id": "payment-pool",
49
+ "type": "component",
50
+ "label": "Payment Client Pool",
51
+ "description": "Its own bounded connection/thread pool. Exhausting it cannot starve any other downstream call.",
52
+ "technology": "10 connections, 200ms timeout",
53
+ "parentId": "api-service",
54
+ "width": 200,
55
+ "height": 120,
56
+ "collapsed": false,
57
+ "x": 30,
58
+ "y": 110
59
+ },
60
+ {
61
+ "id": "shipping-pool",
62
+ "type": "component",
63
+ "label": "Shipping Client Pool",
64
+ "description": "A separate bounded pool, sized independently of the payment pool.",
65
+ "technology": "10 connections, 500ms timeout",
66
+ "parentId": "api-service",
67
+ "width": 200,
68
+ "height": 120,
69
+ "collapsed": false,
70
+ "x": 270,
71
+ "y": 110
72
+ },
73
+ {
74
+ "id": "payment-provider",
75
+ "type": "system",
76
+ "label": "Payment Provider",
77
+ "description": "Third-party, occasionally slow under load.",
78
+ "external": true,
79
+ "width": 360,
80
+ "height": 260,
81
+ "collapsed": false,
82
+ "x": 0,
83
+ "y": 520
84
+ },
85
+ {
86
+ "id": "shipping-provider",
87
+ "type": "system",
88
+ "label": "Shipping Provider",
89
+ "description": "A different third party with an independent uptime record.",
90
+ "external": true,
91
+ "width": 360,
92
+ "height": 260,
93
+ "collapsed": false,
94
+ "x": 420,
95
+ "y": 520
96
+ }
97
+ ],
98
+ "relations": [
99
+ {
100
+ "id": "payment-pool--payment-provider",
101
+ "sourceId": "payment-pool",
102
+ "targetId": "payment-provider",
103
+ "label": "Authorises payment",
104
+ "technology": "HTTPS"
105
+ },
106
+ {
107
+ "id": "shipping-pool--shipping-provider",
108
+ "sourceId": "shipping-pool",
109
+ "targetId": "shipping-provider",
110
+ "label": "Requests shipping quote",
111
+ "technology": "HTTPS"
112
+ }
113
+ ]
114
+ }
@@ -0,0 +1,219 @@
1
+ {
2
+ "hub": {
3
+ "id": "pattern-circuit-breaker",
4
+ "category": "pattern",
5
+ "name": "Circuit Breaker with Fallback",
6
+ "description": "Calls to an unreliable dependency go through a breaker that stops calling it after repeated failures and serves a fallback instead, so one slow dependency cannot exhaust threads or fail the whole request.",
7
+ "tags": [
8
+ "resilience",
9
+ "fault-tolerance",
10
+ "stability",
11
+ "graceful-degradation"
12
+ ],
13
+ "requiredMetamodel": "c4-ddd-governance-builtin",
14
+ "hubRefs": [
15
+ "req-graceful-degradation",
16
+ "adr-integration-style",
17
+ "req-api-response-time",
18
+ "pattern-sidecar",
19
+ "pattern-bulkhead",
20
+ "ff-chaos-resilience-test"
21
+ ]
22
+ },
23
+ "nodes": [
24
+ {
25
+ "id": "customer",
26
+ "type": "person",
27
+ "label": "Customer",
28
+ "description": "Views product pages.",
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": "Storefront Platform",
39
+ "description": "Product page with recommendations from a third party.",
40
+ "x": 0,
41
+ "y": 270,
42
+ "width": 1050,
43
+ "height": 570,
44
+ "collapsed": false
45
+ },
46
+ {
47
+ "id": "storefront",
48
+ "type": "webapp",
49
+ "label": "Storefront",
50
+ "description": "Renders product pages.",
51
+ "technology": "Next.js",
52
+ "parentId": "platform",
53
+ "x": 30,
54
+ "y": 110,
55
+ "width": 210,
56
+ "height": 140,
57
+ "collapsed": false
58
+ },
59
+ {
60
+ "id": "product-api",
61
+ "type": "container",
62
+ "label": "Product API",
63
+ "description": "Assembles the product page. Recommendations are optional content.",
64
+ "technology": "Node.js",
65
+ "parentId": "platform",
66
+ "x": 280,
67
+ "y": 110,
68
+ "width": 740,
69
+ "height": 260,
70
+ "collapsed": false
71
+ },
72
+ {
73
+ "id": "handler",
74
+ "type": "component",
75
+ "label": "Product Handler",
76
+ "description": "Builds the response; treats recommendations as best-effort.",
77
+ "technology": "Express",
78
+ "parentId": "product-api",
79
+ "x": 30,
80
+ "y": 110,
81
+ "width": 200,
82
+ "height": 120,
83
+ "collapsed": false
84
+ },
85
+ {
86
+ "id": "breaker",
87
+ "type": "component",
88
+ "label": "Recommendations Client",
89
+ "description": "Timeout 300 ms; opens after 5 consecutive failures or 50% error rate in 10 s; half-open probe every 30 s.",
90
+ "technology": "opossum / resilience4j",
91
+ "parentId": "product-api",
92
+ "x": 270,
93
+ "y": 110,
94
+ "width": 200,
95
+ "height": 120,
96
+ "collapsed": false
97
+ },
98
+ {
99
+ "id": "fallback",
100
+ "type": "component",
101
+ "label": "Fallback",
102
+ "description": "Returns cached popular items when the circuit is open or the call fails.",
103
+ "technology": "In-process",
104
+ "parentId": "product-api",
105
+ "x": 510,
106
+ "y": 110,
107
+ "width": 200,
108
+ "height": 120,
109
+ "collapsed": false
110
+ },
111
+ {
112
+ "id": "cache",
113
+ "type": "database",
114
+ "label": "Cache",
115
+ "description": "Popular items refreshed hourly; last known recommendations per category.",
116
+ "technology": "Redis",
117
+ "parentId": "platform",
118
+ "x": 30,
119
+ "y": 410,
120
+ "width": 190,
121
+ "height": 130,
122
+ "collapsed": false
123
+ },
124
+ {
125
+ "id": "recs",
126
+ "type": "system",
127
+ "label": "Recommendation Provider",
128
+ "description": "Third-party recommendation engine with variable latency.",
129
+ "external": true,
130
+ "x": 0,
131
+ "y": 940,
132
+ "width": 360,
133
+ "height": 260,
134
+ "collapsed": false
135
+ }
136
+ ],
137
+ "relations": [
138
+ {
139
+ "id": "customer--storefront",
140
+ "sourceId": "customer",
141
+ "targetId": "storefront",
142
+ "label": "Opens product page",
143
+ "technology": "HTTPS"
144
+ },
145
+ {
146
+ "id": "storefront--product-api",
147
+ "sourceId": "storefront",
148
+ "targetId": "product-api",
149
+ "label": "GET /products/{id}",
150
+ "technology": "HTTPS / JSON"
151
+ },
152
+ {
153
+ "id": "handler--breaker",
154
+ "sourceId": "handler",
155
+ "targetId": "breaker",
156
+ "label": "Requests recommendations"
157
+ },
158
+ {
159
+ "id": "product-api--recs",
160
+ "sourceId": "product-api",
161
+ "targetId": "recs",
162
+ "label": "Fetches recommendations (through the breaker)",
163
+ "technology": "HTTPS, 300 ms timeout"
164
+ },
165
+ {
166
+ "id": "breaker--fallback",
167
+ "sourceId": "breaker",
168
+ "targetId": "fallback",
169
+ "label": "On open circuit / failure"
170
+ },
171
+ {
172
+ "id": "fallback--cache",
173
+ "sourceId": "fallback",
174
+ "targetId": "cache",
175
+ "label": "Reads popular items",
176
+ "technology": "Redis protocol"
177
+ }
178
+ ],
179
+ "sequences": [
180
+ {
181
+ "id": "pattern-circuit-breaker-seq",
182
+ "name": "Provider outage",
183
+ "relationIds": [
184
+ "customer--storefront",
185
+ "storefront--product-api",
186
+ "handler--breaker",
187
+ "breaker--fallback",
188
+ "fallback--cache"
189
+ ],
190
+ "stepDescriptions": [
191
+ "Customer opens a product page.",
192
+ "Page data is requested.",
193
+ "Handler asks for recommendations.",
194
+ "Circuit is open — the provider is not called at all.",
195
+ "Popular items are read from cache and returned; the page renders normally."
196
+ ]
197
+ }
198
+ ],
199
+ "views": [
200
+ {
201
+ "id": "pattern-circuit-breaker-flow",
202
+ "name": "Provider outage",
203
+ "kind": "dynamic",
204
+ "sequenceId": "pattern-circuit-breaker-seq",
205
+ "nodeIds": [
206
+ "customer",
207
+ "platform",
208
+ "storefront",
209
+ "product-api",
210
+ "handler",
211
+ "breaker",
212
+ "fallback",
213
+ "cache",
214
+ "recs"
215
+ ],
216
+ "positions": {}
217
+ }
218
+ ]
219
+ }