@radicaltools/mcp 0.0.0-stage → 0.1.1
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 +140 -2
- package/dist/chunk-KI4NVSTU.js +1763 -0
- package/dist/elkLayout-WC6AXWOG.js +185 -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 +8382 -0
- package/package.json +48 -4
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hub": {
|
|
3
|
+
"id": "adr-llm-provider-strategy",
|
|
4
|
+
"category": "adr",
|
|
5
|
+
"name": "LLM Provider Strategy",
|
|
6
|
+
"description": "Records whether model calls go to a hosted frontier API, a self-hosted open-weight model, or both routed by task.",
|
|
7
|
+
"tags": [
|
|
8
|
+
"ai",
|
|
9
|
+
"llm",
|
|
10
|
+
"governance",
|
|
11
|
+
"cost",
|
|
12
|
+
"data-residency"
|
|
13
|
+
],
|
|
14
|
+
"requiredMetamodel": "c4-ddd-governance-builtin",
|
|
15
|
+
"hubRefs": [
|
|
16
|
+
"pattern-rag-pipeline",
|
|
17
|
+
"req-ai-groundedness",
|
|
18
|
+
"req-encryption",
|
|
19
|
+
"ff-cost-efficiency-guard"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"nodes": [
|
|
23
|
+
{
|
|
24
|
+
"id": "adr-llm-provider-strategy-1",
|
|
25
|
+
"type": "adr",
|
|
26
|
+
"label": "ADR: Hybrid LLM routing by task",
|
|
27
|
+
"width": 180,
|
|
28
|
+
"height": 52,
|
|
29
|
+
"collapsed": false,
|
|
30
|
+
"x": 0,
|
|
31
|
+
"y": 0,
|
|
32
|
+
"status": "proposed",
|
|
33
|
+
"date": "",
|
|
34
|
+
"context": "Every model call has to go somewhere: a hosted frontier API, a self-hosted open-weight model, or a mix. The right choice depends on task quality requirements, per-token cost at expected volume, latency, and whether the input data is allowed to leave the perimeter at all.",
|
|
35
|
+
"decision": "Default to a hosted frontier API for quality-critical, low-volume tasks (drafting, complex reasoning). Route high-volume, latency-sensitive or data-sensitive tasks (classification, extraction, redaction) to a self-hosted open-weight model behind the same internal completion interface, so callers don't know or care which one answered.",
|
|
36
|
+
"consequences": "• Quality-critical tasks keep pace with frontier model improvements without any migration; only the routing table changes as models are added.\n• High-volume tasks avoid per-token cost that would otherwise dominate the bill, at the cost of running and updating GPU infrastructure for the self-hosted model.\n• Data that cannot leave the perimeter has a compliant path (self-hosted) without blocking the product entirely on it.\n• The routing layer and its fallback behaviour — what happens when the preferred provider is down or rate-limited — becomes critical infrastructure in its own right, not an afterthought.",
|
|
37
|
+
"alternatives": "1. Always hosted API — simplest to build and keeps pace with frontier quality, but every request leaves the perimeter and cost scales linearly with volume regardless of task complexity.\n2. Always self-hosted — full control over data residency and cost at scale, but requires GPU operations expertise and typically lags frontier quality on complex reasoning tasks.\n3. Single hosted provider, no fallback — simplest integration, but a provider outage or pricing change has no mitigation.\n4. Hybrid routing by task (chosen) — matches each task to the provider it actually needs, at the cost of maintaining two integration paths and a routing policy."
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hub": {
|
|
3
|
+
"id": "adr-marketplace-payments-model",
|
|
4
|
+
"category": "adr",
|
|
5
|
+
"name": "Marketplace Payments Model",
|
|
6
|
+
"description": "Records how money moves between buyer and seller — who legally holds funds in transit, when the platform's commission is taken, and what licensing obligations that creates.",
|
|
7
|
+
"tags": [
|
|
8
|
+
"marketplace",
|
|
9
|
+
"payments",
|
|
10
|
+
"governance",
|
|
11
|
+
"compliance"
|
|
12
|
+
],
|
|
13
|
+
"requiredMetamodel": "c4-ddd-governance-builtin",
|
|
14
|
+
"hubRefs": [
|
|
15
|
+
"pattern-event-sourced-ledger",
|
|
16
|
+
"req-payout-latency",
|
|
17
|
+
"req-idempotency",
|
|
18
|
+
"adr-data-consistency-model"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"nodes": [
|
|
22
|
+
{
|
|
23
|
+
"id": "adr-marketplace-payments-model-1",
|
|
24
|
+
"type": "adr",
|
|
25
|
+
"label": "ADR: Facilitated split payments, platform never holds funds",
|
|
26
|
+
"width": 180,
|
|
27
|
+
"height": 52,
|
|
28
|
+
"collapsed": false,
|
|
29
|
+
"x": 0,
|
|
30
|
+
"y": 0,
|
|
31
|
+
"status": "proposed",
|
|
32
|
+
"date": "",
|
|
33
|
+
"context": "A two-sided marketplace moves money it doesn't ultimately own, from buyers to sellers, minus commission. How that money is held in transit determines whether the platform takes on money-transmitter obligations, who bears chargeback risk, and how hard it is to guarantee sellers actually get paid.",
|
|
34
|
+
"decision": "Use a managed payments-facilitator provider's split-payment product: the provider holds funds in transit and executes the split — seller share, platform commission — at payout time. The platform never custodies buyer funds directly; it only instructs the provider what split to apply and when to release it.",
|
|
35
|
+
"consequences": "• The platform operates as a facilitator under the provider's money-transmitter licence rather than needing its own, removing years of regulatory work from the critical path to launch.\n• Commission collection is guaranteed by construction — deducted before the seller is paid, not invoiced separately and hoped for.\n• The platform's control over payout timing is limited to what the provider's API exposes; a provider incident or policy change becomes a dependency the marketplace can't fully route around.\n• Refunds and chargebacks flow through the provider's split-payment reversal logic, which the order and dispute workflow must model explicitly rather than treating payment as one atomic step.",
|
|
36
|
+
"alternatives": "1. Platform as merchant of record, invoicing sellers for commission separately — the platform bears full chargeback and fraud liability on every transaction and likely crosses into money-transmitter territory on its own.\n2. Buyer pays seller directly, platform only invoices commission after the fact — simplest to build and clearly outside payments regulation, but the platform has no mechanism to guarantee it collects its commission or to protect buyers with a dispute process.\n3. Build a full in-house ledger and banking-rail integration — maximum control and no per-transaction provider fee, but a multi-year regulatory and engineering undertaking before the first transaction can move.\n4. Managed split-payment facilitator (chosen) — fastest path to a compliant, chargeback-protected marketplace, at the cost of depending on the provider's product and pricing."
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hub": {
|
|
3
|
+
"id": "adr-multi-region",
|
|
4
|
+
"category": "adr",
|
|
5
|
+
"name": "Multi-Region Topology",
|
|
6
|
+
"description": "Records how the system is distributed across regions to meet availability and disaster-recovery objectives.",
|
|
7
|
+
"tags": [
|
|
8
|
+
"availability",
|
|
9
|
+
"disaster-recovery",
|
|
10
|
+
"cloud",
|
|
11
|
+
"resilience"
|
|
12
|
+
],
|
|
13
|
+
"requiredMetamodel": "c4-ddd-governance-builtin",
|
|
14
|
+
"templateParams": [
|
|
15
|
+
{
|
|
16
|
+
"key": "TOPOLOGY",
|
|
17
|
+
"label": "Region topology",
|
|
18
|
+
"hint": "Active-passive with warm standby",
|
|
19
|
+
"defaultValue": "Active-passive with warm standby"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"key": "PRIMARY_REGION",
|
|
23
|
+
"label": "Primary region",
|
|
24
|
+
"hint": "eu-west-1",
|
|
25
|
+
"defaultValue": "eu-west-1"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"key": "SECONDARY_REGION",
|
|
29
|
+
"label": "Secondary region",
|
|
30
|
+
"hint": "eu-central-1",
|
|
31
|
+
"defaultValue": "eu-central-1"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"hubRefs": [
|
|
35
|
+
"req-disaster-recovery",
|
|
36
|
+
"req-availability",
|
|
37
|
+
"ff-data-residency",
|
|
38
|
+
"ff-dr-drill-success"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"nodes": [
|
|
42
|
+
{
|
|
43
|
+
"id": "adr-multi-region-1",
|
|
44
|
+
"type": "adr",
|
|
45
|
+
"label": "ADR: {{TOPOLOGY}} multi-region topology",
|
|
46
|
+
"x": 0,
|
|
47
|
+
"y": 0,
|
|
48
|
+
"width": 180,
|
|
49
|
+
"height": 52,
|
|
50
|
+
"collapsed": false,
|
|
51
|
+
"status": "proposed",
|
|
52
|
+
"date": "",
|
|
53
|
+
"context": "The availability target and the recovery objectives (RTO/RPO) cannot be met from a single region: a regional outage would exceed the allowed downtime. Forces: data residency constraints on where replicas may live, the consistency model the data store supports across regions, cost of duplicated capacity, and the operational complexity of failover and failback.",
|
|
54
|
+
"decision": "Run {{TOPOLOGY}}: {{PRIMARY_REGION}} serves all traffic; {{SECONDARY_REGION}} runs a scaled-down copy of the stateless tier and an asynchronously replicated database. Failover is triggered by health checks on the global load balancer and promotes the replica; failback is a planned operation. Failover is rehearsed on a fixed schedule.",
|
|
55
|
+
"consequences": "• RTO is bounded by replica promotion and DNS/traffic-manager propagation; RPO by replication lag, which is monitored and alerted.\n• Infrastructure cost rises by the standby footprint, well below the cost of full active-active.\n• All infrastructure must be defined as code and deployable to either region.\n• Application state outside the database (caches, queues, object storage) needs an explicit replication or rebuild plan.\n• Regular failover drills are non-negotiable; an untested failover is not a failover.",
|
|
56
|
+
"alternatives": "1. Single region, multiple availability zones — covers zone failures cheaply; does not survive a regional outage.\n2. Active-active across regions — near-zero RTO and better latency; requires conflict-free or globally consistent data and doubles cost.\n3. Backup-and-restore to a new region — lowest cost; RTO measured in hours and RPO in the backup interval.\n4. Pilot light (data replicated, compute provisioned on demand) — cheaper than warm standby; RTO depends on provisioning time."
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"relations": []
|
|
60
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hub": {
|
|
3
|
+
"id": "adr-multi-tenancy-strategy",
|
|
4
|
+
"category": "adr",
|
|
5
|
+
"name": "Multi-Tenancy Strategy",
|
|
6
|
+
"description": "Records how tenant data is isolated — shared schema with row-level security, or a dedicated database per tenant — and which tenants get which.",
|
|
7
|
+
"tags": [
|
|
8
|
+
"multi-tenancy",
|
|
9
|
+
"saas",
|
|
10
|
+
"data",
|
|
11
|
+
"isolation",
|
|
12
|
+
"governance"
|
|
13
|
+
],
|
|
14
|
+
"requiredMetamodel": "c4-ddd-governance-builtin",
|
|
15
|
+
"hubRefs": [
|
|
16
|
+
"req-least-privilege",
|
|
17
|
+
"req-data-integrity",
|
|
18
|
+
"adr-data-store",
|
|
19
|
+
"req-resource-isolation",
|
|
20
|
+
"ff-noisy-neighbor-guard"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"nodes": [
|
|
24
|
+
{
|
|
25
|
+
"id": "adr-multi-tenancy-strategy-1",
|
|
26
|
+
"type": "adr",
|
|
27
|
+
"label": "ADR: Pooled tenancy by default, siloed for enterprise",
|
|
28
|
+
"width": 180,
|
|
29
|
+
"height": 52,
|
|
30
|
+
"collapsed": false,
|
|
31
|
+
"x": 0,
|
|
32
|
+
"y": 0,
|
|
33
|
+
"status": "proposed",
|
|
34
|
+
"date": "",
|
|
35
|
+
"context": "The product serves many customers (tenants) of very different sizes. Every tenant needs its data isolated from every other tenant; not every tenant needs — or can afford to pay for — the operational cost of a fully dedicated stack.",
|
|
36
|
+
"decision": "Small and mid-size tenants share infrastructure in a pooled model: one database, every table carrying a tenant_id, with row-level security enforcing isolation at the query layer. Enterprise tenants that require it (contractually or for compliance) are provisioned a siloed, dedicated database instead, behind the same application tier.",
|
|
37
|
+
"consequences": "• Pooled tenants get lower cost and simpler operations (one schema to migrate, one fleet to patch), at the cost of relying on row-level security being correct everywhere — a single missing tenant_id filter is a cross-tenant data leak.\n• Siloed tenants get the strongest isolation story and simplest compliance narrative, at the cost of per-tenant operational overhead (migrations, backups, capacity planning multiply by tenant count).\n• The application tier must support both storage topologies behind one code path, which the tenant-resolution layer needs to route transparently.\n• Moving a tenant from pooled to siloed later requires a live data migration, so the trigger for that move (contract tier, compliance requirement) should be decided up front.",
|
|
38
|
+
"alternatives": "1. Always siloed — safest isolation story, but operational cost scales linearly with tenant count and makes a low-cost self-serve tier uneconomical.\n2. Always pooled — cheapest to run, weakest isolation story; unattractive to enterprise buyers with compliance requirements.\n3. Schema-per-tenant — a middle ground, but migration tooling has to run per schema, and most databases don't scale well past a few thousand schemas.\n4. Pooled by default, siloed for enterprise (chosen) — matches cost to what each tier actually needs."
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hub": {
|
|
3
|
+
"id": "adr-observability",
|
|
4
|
+
"category": "adr",
|
|
5
|
+
"name": "Observability Stack",
|
|
6
|
+
"description": "Records how logs, metrics and traces are produced, collected and stored, and which tools own each signal.",
|
|
7
|
+
"tags": [
|
|
8
|
+
"observability",
|
|
9
|
+
"monitoring",
|
|
10
|
+
"logging",
|
|
11
|
+
"tracing"
|
|
12
|
+
],
|
|
13
|
+
"requiredMetamodel": "c4-ddd-governance-builtin",
|
|
14
|
+
"templateParams": [
|
|
15
|
+
{
|
|
16
|
+
"key": "METRICS_BACKEND",
|
|
17
|
+
"label": "Metrics backend",
|
|
18
|
+
"hint": "Prometheus + Grafana",
|
|
19
|
+
"defaultValue": "Prometheus + Grafana"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"key": "LOGS_BACKEND",
|
|
23
|
+
"label": "Logs backend",
|
|
24
|
+
"hint": "Loki",
|
|
25
|
+
"defaultValue": "Loki"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"key": "TRACES_BACKEND",
|
|
29
|
+
"label": "Traces backend",
|
|
30
|
+
"hint": "Tempo",
|
|
31
|
+
"defaultValue": "Tempo"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"hubRefs": [
|
|
35
|
+
"req-centralised-logging",
|
|
36
|
+
"req-distributed-tracing",
|
|
37
|
+
"req-alerting"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"nodes": [
|
|
41
|
+
{
|
|
42
|
+
"id": "adr-observability-1",
|
|
43
|
+
"type": "adr",
|
|
44
|
+
"label": "ADR: OpenTelemetry-based observability",
|
|
45
|
+
"x": 0,
|
|
46
|
+
"y": 0,
|
|
47
|
+
"width": 180,
|
|
48
|
+
"height": 52,
|
|
49
|
+
"collapsed": false,
|
|
50
|
+
"status": "proposed",
|
|
51
|
+
"date": "",
|
|
52
|
+
"context": "Operating a distributed system requires correlating logs, metrics and traces across services during incidents and measuring SLOs continuously. Forces: avoiding per-vendor instrumentation lock-in, cost of high-cardinality telemetry at scale, data residency of logs that may contain personal data, and the team's ability to run stateful backends.",
|
|
53
|
+
"decision": "Instrument all services with OpenTelemetry SDKs and export through an OpenTelemetry Collector. Metrics are stored in {{METRICS_BACKEND}}, logs in {{LOGS_BACKEND}}, traces in {{TRACES_BACKEND}}. Services never depend on a vendor SDK directly; the Collector is the only place where backends are configured.",
|
|
54
|
+
"consequences": "• Backends can be swapped or added by changing Collector configuration, not application code.\n• Every log line and span carries trace id, service name and version, enabling pivoting between signals.\n• Sampling, redaction of personal data and retention are enforced centrally in the Collector pipeline.\n• The Collector is a critical shared component and needs capacity planning and its own monitoring.\n• Teams must agree on naming conventions for metrics and attributes to keep dashboards reusable.",
|
|
55
|
+
"alternatives": "1. Single commercial APM suite — fastest time to value; per-host or per-GB pricing grows steeply and instrumentation is vendor-specific.\n2. Hyperscaler-native tooling (CloudWatch, Azure Monitor, Cloud Operations) — no extra infrastructure; weaker cross-cloud and local-development story.\n3. ELK for everything — mature logging; metrics and traces are second-class and storage cost is high.\n4. No tracing, logs and metrics only — lower cost; root-causing latency across services becomes guesswork."
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"relations": []
|
|
59
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hub": {
|
|
3
|
+
"id": "adr-realtime-transport",
|
|
4
|
+
"category": "adr",
|
|
5
|
+
"name": "Real-Time Transport Choice",
|
|
6
|
+
"description": "Records how live edits and presence reach other connected clients — WebSocket, Server-Sent Events, or WebRTC — and the fallback when the primary transport is blocked.",
|
|
7
|
+
"tags": [
|
|
8
|
+
"real-time",
|
|
9
|
+
"networking",
|
|
10
|
+
"websocket",
|
|
11
|
+
"governance"
|
|
12
|
+
],
|
|
13
|
+
"requiredMetamodel": "c4-ddd-governance-builtin",
|
|
14
|
+
"hubRefs": [
|
|
15
|
+
"pattern-crdt-sync",
|
|
16
|
+
"req-presence-latency",
|
|
17
|
+
"req-availability"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"nodes": [
|
|
21
|
+
{
|
|
22
|
+
"id": "adr-realtime-transport-1",
|
|
23
|
+
"type": "adr",
|
|
24
|
+
"label": "ADR: WebSocket with long-polling fallback",
|
|
25
|
+
"width": 180,
|
|
26
|
+
"height": 52,
|
|
27
|
+
"collapsed": false,
|
|
28
|
+
"x": 0,
|
|
29
|
+
"y": 0,
|
|
30
|
+
"status": "proposed",
|
|
31
|
+
"date": "",
|
|
32
|
+
"context": "Collaborators need low-latency, bidirectional delivery of operations and presence — cursors, selections — to every other client viewing the same document, over networks that don't all allow the same protocols; some corporate proxies block WebSocket upgrades entirely.",
|
|
33
|
+
"decision": "Use WebSocket as the primary transport for both directions — client operations up, relayed operations and presence down — with an HTTP long-polling fallback that the client switches to automatically when the WebSocket upgrade fails or drops repeatedly.",
|
|
34
|
+
"consequences": "• A single persistent connection carries both operations and presence, keeping latency low and avoiding the overhead of a second channel.\n• The fallback path adds a second code path on both client and server that has to be kept behaviour-identical to the WebSocket path, and tested as its own thing, not assumed to \"just work\" the same way.\n• Presence data shares the same connection as document operations, so a presence flood from a very large room can't be independently throttled without also touching the operation path.\n• Any load balancer or proxy in front of the gateway fleet must support long-lived connections and sticky enough routing for a session's fallback requests to reach the same instance.",
|
|
35
|
+
"alternatives": "1. WebRTC data channels — lowest possible latency directly between peers, but the server never sees the operations in transit to persist or authorise them, and NAT traversal needs its own signalling and TURN relay infrastructure.\n2. Server-Sent Events for the down channel plus HTTP POST for writes — works through anything that allows plain HTTP, but two separate connections cost more round trips and the write path never gets push-level latency.\n3. Plain HTTP polling only — simplest possible infrastructure, but the polling interval directly trades off against both latency and server load.\n4. WebSocket with a long-polling fallback (chosen) — best latency for the common case, at the cost of maintaining a second path for the uncommon one."
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hub": {
|
|
3
|
+
"id": "adr-tech-stack",
|
|
4
|
+
"category": "adr",
|
|
5
|
+
"name": "Primary Technology Stack",
|
|
6
|
+
"description": "Records the choice of language, runtime and framework for new services, and the forces that drove it.",
|
|
7
|
+
"tags": [
|
|
8
|
+
"technology",
|
|
9
|
+
"platform",
|
|
10
|
+
"foundation"
|
|
11
|
+
],
|
|
12
|
+
"requiredMetamodel": "c4-ddd-governance-builtin",
|
|
13
|
+
"templateParams": [
|
|
14
|
+
{
|
|
15
|
+
"key": "STACK",
|
|
16
|
+
"label": "Chosen stack",
|
|
17
|
+
"hint": "TypeScript / Node.js",
|
|
18
|
+
"defaultValue": "TypeScript / Node.js"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"hubRefs": [
|
|
22
|
+
"adr-data-store",
|
|
23
|
+
"ff-dependency-rules"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"nodes": [
|
|
27
|
+
{
|
|
28
|
+
"id": "adr-tech-stack-1",
|
|
29
|
+
"type": "adr",
|
|
30
|
+
"label": "ADR: {{STACK}} as primary stack",
|
|
31
|
+
"x": 0,
|
|
32
|
+
"y": 0,
|
|
33
|
+
"width": 180,
|
|
34
|
+
"height": 52,
|
|
35
|
+
"collapsed": false,
|
|
36
|
+
"status": "proposed",
|
|
37
|
+
"date": "",
|
|
38
|
+
"context": "New services need a default technology stack. The decision is driven by the team's existing expertise, hiring market, ecosystem maturity for our problem domain, runtime performance characteristics, operational tooling (observability, packaging, security scanning) and how easily the choice can be revisited later.",
|
|
39
|
+
"decision": "Use {{STACK}} as the default stack for new services. Deviations require an ADR of their own that names the concrete capability the default cannot provide.",
|
|
40
|
+
"consequences": "• One shared toolchain for linting, testing, packaging and dependency scanning across services.\n• Onboarding, code review and on-call rotate more easily between teams.\n• Libraries, internal SDKs and platform integrations are built once for this stack.\n• Problems the stack handles poorly (e.g. CPU-bound workloads, specialised ML tooling) need an explicit exception path.\n• The decision should be reviewed when the team or the problem space changes materially.",
|
|
41
|
+
"alternatives": "1. Polyglot by team choice — maximises local fit but fragments tooling, security patching and on-call coverage.\n2. A JVM-based stack (Kotlin / Java) — mature ecosystem and strong performance; heavier runtime and slower startup for serverless-style workloads.\n3. Go — excellent operational profile for infrastructure-style services; smaller ecosystem for rich web/back-office applications.\n4. Python — strongest for data and ML work; weaker typing story and concurrency model for high-throughput services."
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"relations": []
|
|
45
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hub": {
|
|
3
|
+
"id": "adr-zero-trust-network",
|
|
4
|
+
"category": "adr",
|
|
5
|
+
"name": "Network Trust Model",
|
|
6
|
+
"description": "Records whether the system trusts requests based on network location (perimeter/VPN model) or verifies every request's identity and context regardless of where it originates (zero trust).",
|
|
7
|
+
"tags": [
|
|
8
|
+
"security",
|
|
9
|
+
"zero-trust",
|
|
10
|
+
"network",
|
|
11
|
+
"nist",
|
|
12
|
+
"governance"
|
|
13
|
+
],
|
|
14
|
+
"requiredMetamodel": "c4-ddd-governance-builtin",
|
|
15
|
+
"hubRefs": [
|
|
16
|
+
"pattern-sidecar",
|
|
17
|
+
"req-least-privilege",
|
|
18
|
+
"adr-auth-strategy",
|
|
19
|
+
"req-mfa"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"nodes": [
|
|
23
|
+
{
|
|
24
|
+
"id": "adr-zero-trust-network-1",
|
|
25
|
+
"type": "adr",
|
|
26
|
+
"label": "ADR: Zero trust — verify every request regardless of network location",
|
|
27
|
+
"x": 0,
|
|
28
|
+
"y": 0,
|
|
29
|
+
"width": 180,
|
|
30
|
+
"height": 52,
|
|
31
|
+
"collapsed": false,
|
|
32
|
+
"status": "proposed",
|
|
33
|
+
"date": "",
|
|
34
|
+
"context": "The traditional model trusts anything inside the corporate network or VPN and puts the real defence at the perimeter. That assumption breaks down with cloud services, remote work, third-party integrations and lateral movement after a single compromised credential or device.",
|
|
35
|
+
"decision": "Every request is authenticated and authorized at the point of access based on identity and context (device posture, request risk), regardless of network location — internal service-to-service calls get the same scrutiny as calls from the public internet. Network segmentation is defence in depth, not the primary control.",
|
|
36
|
+
"consequences": "• No implicit trust for being ‘inside’ the VPC/VPN — internal services need their own authn/authz (mTLS or signed service identity), not just network reachability.\n• A stolen credential or compromised device doesn't automatically grant broad lateral access.\n• More moving parts: identity-aware proxies, service identity, continuous authorization checks add latency and operational surface compared to a flat trusted network.\n• Legacy systems that assume network-level trust need a gateway/proxy in front of them until they can be updated.",
|
|
37
|
+
"alternatives": "1. Perimeter/VPN model — simpler, lower latency, but a single breach inside the perimeter has broad blast radius.\n2. Zero trust (chosen) — smaller blast radius per compromise, at the cost of more infrastructure (identity-aware proxies, mTLS, policy engines) and some added latency per request."
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|