@stacksjs/defaults 0.75.360 → 0.75.362
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/ai/skills/stacks-ai/SKILL.md +22 -0
- package/ai/skills/stacks-native/CATALOG.md +4 -4
- package/ai/skills/stacks-payments/SKILL.md +28 -0
- package/ai/skills/stacks-technical-diagrams/LICENSE +202 -22
- package/ai/skills/stacks-technical-diagrams/LICENSE-MIT +22 -0
- package/ai/skills/stacks-technical-diagrams/NOTICE +26 -0
- package/ai/skills/stacks-technical-diagrams/SKILL.md +106 -266
- package/ai/skills/stacks-technical-diagrams/THIRD_PARTY_NOTICES.md +11 -2
- package/ai/skills/stacks-technical-diagrams/UPSTREAM.json +12 -0
- package/ai/skills/stacks-technical-diagrams/agents/openai.yaml +2 -2
- package/ai/skills/stacks-technical-diagrams/assets/template.html +3655 -3798
- package/ai/skills/stacks-technical-diagrams/bin/archify.mjs +7290 -0
- package/ai/skills/stacks-technical-diagrams/bin/delivery-update.mjs +7 -0
- package/ai/skills/stacks-technical-diagrams/bin/diagrams +1 -0
- package/ai/skills/stacks-technical-diagrams/bin/finalize.mjs +1056 -0
- package/ai/skills/stacks-technical-diagrams/bin/open-artifact.mjs +72 -12
- package/ai/skills/stacks-technical-diagrams/bin/preview.mjs +348 -31
- package/ai/skills/stacks-technical-diagrams/bin/recover-output.mjs +41 -0
- package/ai/skills/stacks-technical-diagrams/bin/technical-diagrams.mjs +3 -2097
- package/ai/skills/stacks-technical-diagrams/bin/visual-check.mjs +2142 -157
- package/ai/skills/stacks-technical-diagrams/brand-marks/README.md +3 -3
- package/ai/skills/stacks-technical-diagrams/delta/architecture-delta.mjs +130 -33
- package/ai/skills/stacks-technical-diagrams/examples/agent-run.lifecycle.json +25 -30
- package/ai/skills/stacks-technical-diagrams/examples/agent-tool-call.workflow.json +0 -20
- package/ai/skills/stacks-technical-diagrams/examples/archify-dev-activity.timeline.json +176 -0
- package/ai/skills/stacks-technical-diagrams/examples/archify-repository.tree.json +197 -0
- package/ai/skills/stacks-technical-diagrams/examples/async-job-roundtrip.sequence.json +1 -6
- package/ai/skills/stacks-technical-diagrams/examples/brand-aware-delivery.architecture.json +3 -16
- package/ai/skills/stacks-technical-diagrams/examples/cache-miss-request.sequence.json +2 -7
- package/ai/skills/stacks-technical-diagrams/examples/checkout-platform.base.architecture.json +2 -1
- package/ai/skills/stacks-technical-diagrams/examples/checkout-platform.head.architecture.json +2 -1
- package/ai/skills/stacks-technical-diagrams/examples/checkout-request.waterfall.json +20 -0
- package/ai/skills/stacks-technical-diagrams/examples/class-payment-processors-rendered.html +14987 -0
- package/ai/skills/stacks-technical-diagrams/examples/class-payments-rendered.html +14787 -0
- package/ai/skills/stacks-technical-diagrams/examples/dataflow-product-analytics.html +14880 -0
- package/ai/skills/stacks-technical-diagrams/examples/delivery.explainer.json +155 -0
- package/ai/skills/stacks-technical-diagrams/examples/deployment-release.lifecycle.json +57 -34
- package/ai/skills/stacks-technical-diagrams/examples/erd-orders-rendered.html +15112 -0
- package/ai/skills/stacks-technical-diagrams/examples/event-stream.dataflow.json +1 -6
- package/ai/skills/stacks-technical-diagrams/examples/example-rebuild.waterfall.json +212 -0
- package/ai/skills/stacks-technical-diagrams/examples/holiday-planning.workflow.json +143 -0
- package/ai/skills/stacks-technical-diagrams/examples/incident-response.workflow.json +1 -6
- package/ai/skills/stacks-technical-diagrams/examples/lifecycle-agent-run.html +14892 -0
- package/ai/skills/stacks-technical-diagrams/examples/locales/de.json +463 -0
- package/ai/skills/stacks-technical-diagrams/examples/locales/fr.json +463 -0
- package/ai/skills/stacks-technical-diagrams/examples/locales/fr.partial.json +22 -0
- package/ai/skills/stacks-technical-diagrams/examples/locales/it.json +463 -0
- package/ai/skills/stacks-technical-diagrams/examples/locales/ja.json +463 -0
- package/ai/skills/stacks-technical-diagrams/examples/locales/pt.json +463 -0
- package/ai/skills/stacks-technical-diagrams/examples/locales/ru.json +463 -0
- package/ai/skills/stacks-technical-diagrams/examples/orders.erd.json +337 -0
- package/ai/skills/stacks-technical-diagrams/examples/payment-incident.timeline.json +24 -0
- package/ai/skills/stacks-technical-diagrams/examples/payment-platform.tree.json +22 -0
- package/ai/skills/stacks-technical-diagrams/examples/payment-processors.class.json +177 -0
- package/ai/skills/stacks-technical-diagrams/examples/payments.class.json +85 -0
- package/ai/skills/stacks-technical-diagrams/examples/product-analytics.dataflow.json +1 -6
- package/ai/skills/stacks-technical-diagrams/examples/production-deployment.architecture.json +3 -23
- package/ai/skills/stacks-technical-diagrams/examples/release-delivery.workflow.json +1 -6
- package/ai/skills/stacks-technical-diagrams/examples/sequence-cache-miss-request.html +14895 -0
- package/ai/skills/stacks-technical-diagrams/examples/subscription-billing-rendered.html +15369 -0
- package/ai/skills/stacks-technical-diagrams/examples/subscription-billing.erd.json +548 -0
- package/ai/skills/stacks-technical-diagrams/examples/timeline-archify-dev-activity-rendered.html +15002 -0
- package/ai/skills/stacks-technical-diagrams/examples/timeline-payment-incident-rendered.html +14772 -0
- package/ai/skills/stacks-technical-diagrams/examples/tree-archify-repository-rendered.html +15071 -0
- package/ai/skills/stacks-technical-diagrams/examples/tree-payment-platform-rendered.html +14810 -0
- package/ai/skills/stacks-technical-diagrams/examples/waterfall-checkout-request-rendered.html +14754 -0
- package/ai/skills/stacks-technical-diagrams/examples/waterfall-example-rebuild-rendered.html +14940 -0
- package/ai/skills/stacks-technical-diagrams/examples/web-app-rendered.html +14889 -0
- package/ai/skills/stacks-technical-diagrams/examples/web-app.architecture.json +1 -6
- package/ai/skills/stacks-technical-diagrams/examples/workflow-agent-tool-call-rendered.html +14907 -0
- package/ai/skills/stacks-technical-diagrams/explainer/browser-check.mjs +208 -0
- package/ai/skills/stacks-technical-diagrams/explainer/charts.mjs +70 -0
- package/ai/skills/stacks-technical-diagrams/explainer/check.mjs +168 -0
- package/ai/skills/stacks-technical-diagrams/explainer/diagrams.mjs +518 -0
- package/ai/skills/stacks-technical-diagrams/explainer/diff.mjs +124 -0
- package/ai/skills/stacks-technical-diagrams/explainer/inline.mjs +155 -0
- package/ai/skills/stacks-technical-diagrams/explainer/layout.mjs +35 -0
- package/ai/skills/stacks-technical-diagrams/explainer/page-bundle.mjs +16 -0
- package/ai/skills/stacks-technical-diagrams/explainer/parse.mjs +300 -0
- package/ai/skills/stacks-technical-diagrams/explainer/patch.mjs +117 -0
- package/ai/skills/stacks-technical-diagrams/explainer/prepare.mjs +131 -0
- package/ai/skills/stacks-technical-diagrams/explainer/reader.css +472 -0
- package/ai/skills/stacks-technical-diagrams/explainer/reader.js +667 -0
- package/ai/skills/stacks-technical-diagrams/explainer/render.mjs +224 -0
- package/ai/skills/stacks-technical-diagrams/explainer/revision.mjs +20 -0
- package/ai/skills/stacks-technical-diagrams/explainer/sources.mjs +318 -0
- package/ai/skills/stacks-technical-diagrams/explainer/validate.mjs +138 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/LICENSE +40 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/README.md +5 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/3DKXF73K.js +4 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/42UTT654.js +3 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/DKTLEL5E.js +1 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/EEIX5ZYH.js +2 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/EJ5KOXYD.js +25 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/GUJTEFZK.js +1 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/IZOKQ2GT.js +4 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/L4LY553T.js +3 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/MSKIJHB2.js +2 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/RVARI57O.js +1 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/UKSIWDDN.js +2 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/UPTXNAXN.js +2 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/XTDUIGUI.js +9 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/chunks/YAYTP6L5.js +9 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/core.js +1 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/diagrams/pie.js +1 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/diagrams/quadrantChart.js +1 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/diagrams/radar.js +1 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/diagrams/sankey.js +1 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/diagrams/venn.js +1 -0
- package/ai/skills/stacks-technical-diagrams/explainer/vendor/pele/diagrams/xychart.js +1 -0
- package/ai/skills/stacks-technical-diagrams/explainer/writing.mjs +139 -0
- package/ai/skills/stacks-technical-diagrams/locales/README.md +40 -0
- package/ai/skills/stacks-technical-diagrams/locales/ar.json +488 -0
- package/ai/skills/stacks-technical-diagrams/locales/en.json +488 -0
- package/ai/skills/stacks-technical-diagrams/locales/es.json +488 -0
- package/ai/skills/stacks-technical-diagrams/locales/ko.json +488 -0
- package/ai/skills/stacks-technical-diagrams/locales/manifest.json +10 -0
- package/ai/skills/stacks-technical-diagrams/locales/zh-CN.json +488 -0
- package/ai/skills/stacks-technical-diagrams/locales/zh-TW.json +488 -0
- package/ai/skills/stacks-technical-diagrams/migrations/workflow-v2.mjs +1 -0
- package/ai/skills/stacks-technical-diagrams/recipes/scenarios.mjs +115 -51
- package/ai/skills/stacks-technical-diagrams/references/architecture-layout-repair.md +18 -0
- package/ai/skills/stacks-technical-diagrams/references/authoring-contract.md +453 -51
- package/ai/skills/stacks-technical-diagrams/references/authoring-defaults.md +57 -0
- package/ai/skills/stacks-technical-diagrams/references/brand-marks.md +57 -3
- package/ai/skills/stacks-technical-diagrams/references/delivery-contract.md +603 -58
- package/ai/skills/stacks-technical-diagrams/references/explainer-authoring.md +274 -0
- package/ai/skills/stacks-technical-diagrams/references/repository-authoring.md +126 -0
- package/ai/skills/stacks-technical-diagrams/references/update-awareness.md +13 -0
- package/ai/skills/stacks-technical-diagrams/references/viewer-runtime.md +18 -11
- package/ai/skills/stacks-technical-diagrams/renderers/architecture/grid.mjs +1 -1
- package/ai/skills/stacks-technical-diagrams/renderers/architecture/labels.mjs +2 -0
- package/ai/skills/stacks-technical-diagrams/renderers/architecture/render-architecture.mjs +550 -424
- package/ai/skills/stacks-technical-diagrams/renderers/architecture/routing.mjs +1469 -0
- package/ai/skills/stacks-technical-diagrams/renderers/class/README.md +129 -0
- package/ai/skills/stacks-technical-diagrams/renderers/class/render-class.mjs +1095 -0
- package/ai/skills/stacks-technical-diagrams/renderers/dataflow/README.md +89 -17
- package/ai/skills/stacks-technical-diagrams/renderers/dataflow/dataflow-compiler.mjs +1605 -0
- package/ai/skills/stacks-technical-diagrams/renderers/dataflow/joint-label-routing.mjs +165 -0
- package/ai/skills/stacks-technical-diagrams/renderers/dataflow/label-capacity.mjs +81 -0
- package/ai/skills/stacks-technical-diagrams/renderers/dataflow/render-dataflow.mjs +14 -474
- package/ai/skills/stacks-technical-diagrams/renderers/erd/README.md +246 -0
- package/ai/skills/stacks-technical-diagrams/renderers/erd/grid.mjs +150 -0
- package/ai/skills/stacks-technical-diagrams/renderers/erd/render-erd.mjs +1588 -0
- package/ai/skills/stacks-technical-diagrams/renderers/explainer/render-explainer.mjs +42 -0
- package/ai/skills/stacks-technical-diagrams/renderers/lifecycle/README.md +83 -94
- package/ai/skills/stacks-technical-diagrams/renderers/lifecycle/render-lifecycle.mjs +990 -417
- package/ai/skills/stacks-technical-diagrams/renderers/sequence/README.md +49 -17
- package/ai/skills/stacks-technical-diagrams/renderers/sequence/render-sequence.mjs +735 -94
- package/ai/skills/stacks-technical-diagrams/renderers/shared/atomic-output.mjs +1982 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/automatic-labels.mjs +290 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/brand-marks.mjs +169 -26
- package/ai/skills/stacks-technical-diagrams/renderers/shared/cli.mjs +266 -54
- package/ai/skills/stacks-technical-diagrams/renderers/shared/desktop-readability.mjs +106 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/diagnostics.mjs +0 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/generated-validators.mjs +268 -2
- package/ai/skills/stacks-technical-diagrams/renderers/shared/geometry.mjs +774 -124
- package/ai/skills/stacks-technical-diagrams/renderers/shared/i18n.mjs +289 -556
- package/ai/skills/stacks-technical-diagrams/renderers/shared/layout-report.mjs +18 -1
- package/ai/skills/stacks-technical-diagrams/renderers/shared/legend.mjs +16 -6
- package/ai/skills/stacks-technical-diagrams/renderers/shared/node-card-style.mjs +32 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/output-path.mjs +329 -229
- package/ai/skills/stacks-technical-diagrams/renderers/shared/owned-temp-directory.mjs +82 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/path-semantics.mjs +1017 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/portable-path.mjs +408 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/repository-evidence.mjs +235 -79
- package/ai/skills/stacks-technical-diagrams/renderers/shared/repository-location.mjs +17 -4
- package/ai/skills/stacks-technical-diagrams/renderers/shared/route-quality.mjs +670 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/sidecar-path.mjs +38 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/software-notices.mjs +6 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/spatial-grid.mjs +66 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/svg-path-analysis.mjs +135 -0
- package/ai/skills/stacks-technical-diagrams/renderers/shared/text-fit.mjs +59 -3
- package/ai/skills/stacks-technical-diagrams/renderers/shared/utils.mjs +63 -35
- package/ai/skills/stacks-technical-diagrams/renderers/shared/validator.mjs +2 -5
- package/ai/skills/stacks-technical-diagrams/renderers/timeline/README.md +76 -0
- package/ai/skills/stacks-technical-diagrams/renderers/timeline/render-timeline.mjs +576 -0
- package/ai/skills/stacks-technical-diagrams/renderers/tree/README.md +96 -0
- package/ai/skills/stacks-technical-diagrams/renderers/tree/render-tree.mjs +573 -0
- package/ai/skills/stacks-technical-diagrams/renderers/waterfall/README.md +73 -0
- package/ai/skills/stacks-technical-diagrams/renderers/waterfall/render-waterfall.mjs +413 -0
- package/ai/skills/stacks-technical-diagrams/renderers/workflow/README.md +137 -23
- package/ai/skills/stacks-technical-diagrams/renderers/workflow/render-workflow.mjs +18 -6
- package/ai/skills/stacks-technical-diagrams/renderers/workflow/workflow-compiler.mjs +2230 -710
- package/ai/skills/stacks-technical-diagrams/renderers/workflow/workflow-migration-geometry.mjs +17 -0
- package/ai/skills/stacks-technical-diagrams/renderers/workflow/workflow-placement-repair.mjs +94 -0
- package/ai/skills/stacks-technical-diagrams/schemas/README.md +87 -40
- package/ai/skills/stacks-technical-diagrams/schemas/architecture.schema.json +7 -33
- package/ai/skills/stacks-technical-diagrams/schemas/class.schema.json +345 -0
- package/ai/skills/stacks-technical-diagrams/schemas/common.schema.json +68 -2
- package/ai/skills/stacks-technical-diagrams/schemas/dataflow.schema.json +14 -3
- package/ai/skills/stacks-technical-diagrams/schemas/erd.schema.json +381 -0
- package/ai/skills/stacks-technical-diagrams/schemas/explainer.schema.json +927 -0
- package/ai/skills/stacks-technical-diagrams/schemas/lifecycle.schema.json +23 -110
- package/ai/skills/stacks-technical-diagrams/schemas/sequence.schema.json +15 -4
- package/ai/skills/stacks-technical-diagrams/schemas/timeline.schema.json +160 -0
- package/ai/skills/stacks-technical-diagrams/schemas/tree.schema.json +141 -0
- package/ai/skills/stacks-technical-diagrams/schemas/waterfall.schema.json +147 -0
- package/ai/skills/stacks-technical-diagrams/schemas/workflow.schema.json +14 -3
- package/ai/skills/stacks-technical-diagrams/scripts/check-render-output.mjs +876 -243
- package/ai/skills/stacks-technical-diagrams/scripts/check-update.mjs +1717 -0
- package/ai/skills/stacks-technical-diagrams/scripts/delivery-update-child.mjs +26 -0
- package/ai/skills/stacks-technical-diagrams/scripts/generate-brand-marks.mjs +141 -0
- package/ai/skills/stacks-technical-diagrams/scripts/generate-validators.mjs +105 -0
- package/ai/skills/stacks-technical-diagrams/scripts/render-examples.mjs +11 -1
- package/ai/skills/stacks-technical-diagrams/scripts/update-contract.mjs +187 -0
- package/ai/skills/stacks-technical-diagrams/skill-release.json +10 -0
- package/ide/vscode/package.json +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"diagram_type": "erd",
|
|
4
|
+
"meta": {
|
|
5
|
+
"title": "Order management schema",
|
|
6
|
+
"locale": "en",
|
|
7
|
+
"output": "examples/erd-orders-rendered.html",
|
|
8
|
+
"quality_profile": "showcase",
|
|
9
|
+
"views": [
|
|
10
|
+
{
|
|
11
|
+
"id": "identity",
|
|
12
|
+
"label": "Reference rows",
|
|
13
|
+
"focus": [
|
|
14
|
+
"customer",
|
|
15
|
+
"product"
|
|
16
|
+
],
|
|
17
|
+
"note": "The rows everything else points at, with their unique keys."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "checkout",
|
|
21
|
+
"label": "Checkout core",
|
|
22
|
+
"focus": [
|
|
23
|
+
"order",
|
|
24
|
+
"order_item",
|
|
25
|
+
"customer"
|
|
26
|
+
],
|
|
27
|
+
"note": "order is the hub: order_item and payment both point back at it."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "followups",
|
|
31
|
+
"label": "Payment and stock",
|
|
32
|
+
"focus": [
|
|
33
|
+
"payment",
|
|
34
|
+
"order",
|
|
35
|
+
"inventory",
|
|
36
|
+
"product"
|
|
37
|
+
],
|
|
38
|
+
"note": "One optional dashed link and one mandatory stock link."
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"layout": {
|
|
43
|
+
"mode": "grid",
|
|
44
|
+
"gapY": 38,
|
|
45
|
+
"gapX": 72
|
|
46
|
+
},
|
|
47
|
+
"entities": [
|
|
48
|
+
{
|
|
49
|
+
"id": "customer",
|
|
50
|
+
"label": "customer",
|
|
51
|
+
"tag": "accounts",
|
|
52
|
+
"row": 0,
|
|
53
|
+
"col": 0,
|
|
54
|
+
"attributes": [
|
|
55
|
+
{
|
|
56
|
+
"name": "id",
|
|
57
|
+
"type": "bigint",
|
|
58
|
+
"key": "pk"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "email",
|
|
62
|
+
"type": "varchar(255)",
|
|
63
|
+
"key": "uk"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "display_name",
|
|
67
|
+
"type": "varchar(120)"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "created_at",
|
|
71
|
+
"type": "timestamptz"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"id": "order",
|
|
77
|
+
"label": "order",
|
|
78
|
+
"tag": "checkout",
|
|
79
|
+
"row": 0,
|
|
80
|
+
"col": 1,
|
|
81
|
+
"width": 260,
|
|
82
|
+
"attributes": [
|
|
83
|
+
{
|
|
84
|
+
"name": "id",
|
|
85
|
+
"type": "bigint",
|
|
86
|
+
"key": "pk"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "customer_id",
|
|
90
|
+
"type": "bigint",
|
|
91
|
+
"key": "fk",
|
|
92
|
+
"references": "customer.id"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "status",
|
|
96
|
+
"type": "varchar(32)"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "total_amount",
|
|
100
|
+
"type": "numeric(12,2)"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "currency",
|
|
104
|
+
"type": "char(3)"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "placed_at",
|
|
108
|
+
"type": "timestamptz"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "updated_at",
|
|
112
|
+
"type": "timestamptz"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"id": "order_item",
|
|
118
|
+
"label": "order_item",
|
|
119
|
+
"tag": "line items",
|
|
120
|
+
"row": 1,
|
|
121
|
+
"col": 2,
|
|
122
|
+
"width": 254,
|
|
123
|
+
"attributes": [
|
|
124
|
+
{
|
|
125
|
+
"name": "id",
|
|
126
|
+
"type": "bigint",
|
|
127
|
+
"key": "pk"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "order_id",
|
|
131
|
+
"type": "bigint",
|
|
132
|
+
"key": "fk",
|
|
133
|
+
"references": "order.id"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "product_id",
|
|
137
|
+
"type": "bigint",
|
|
138
|
+
"key": "fk",
|
|
139
|
+
"references": "product.id"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "quantity",
|
|
143
|
+
"type": "int"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "unit_price",
|
|
147
|
+
"type": "numeric(12,2)"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "discount_amount",
|
|
151
|
+
"type": "numeric(12,2)"
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"id": "product",
|
|
157
|
+
"label": "product",
|
|
158
|
+
"tag": "catalog",
|
|
159
|
+
"row": 1,
|
|
160
|
+
"col": 1,
|
|
161
|
+
"attributes": [
|
|
162
|
+
{
|
|
163
|
+
"name": "id",
|
|
164
|
+
"type": "bigint",
|
|
165
|
+
"key": "pk"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "sku",
|
|
169
|
+
"type": "varchar(64)",
|
|
170
|
+
"key": "uk"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "name",
|
|
174
|
+
"type": "varchar(160)"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "price",
|
|
178
|
+
"type": "numeric(12,2)"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"name": "cost_amount",
|
|
182
|
+
"type": "numeric(12,2)"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"name": "active",
|
|
186
|
+
"type": "boolean"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "created_at",
|
|
190
|
+
"type": "timestamptz"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"id": "inventory",
|
|
196
|
+
"label": "inventory",
|
|
197
|
+
"tag": "catalog",
|
|
198
|
+
"row": 1,
|
|
199
|
+
"col": 0,
|
|
200
|
+
"attributes": [
|
|
201
|
+
{
|
|
202
|
+
"name": "id",
|
|
203
|
+
"type": "bigint",
|
|
204
|
+
"key": "pk"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "product_id",
|
|
208
|
+
"type": "bigint",
|
|
209
|
+
"key": "fk",
|
|
210
|
+
"references": "product.id"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"name": "warehouse_code",
|
|
214
|
+
"type": "varchar(16)"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"name": "quantity",
|
|
218
|
+
"type": "int"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"name": "reserved_quantity",
|
|
222
|
+
"type": "int"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"name": "updated_at",
|
|
226
|
+
"type": "timestamptz"
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
"width": 236
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"id": "payment",
|
|
233
|
+
"label": "payment",
|
|
234
|
+
"tag": "checkout",
|
|
235
|
+
"row": 0,
|
|
236
|
+
"col": 2,
|
|
237
|
+
"attributes": [
|
|
238
|
+
{
|
|
239
|
+
"name": "id",
|
|
240
|
+
"type": "bigint",
|
|
241
|
+
"key": "pk"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"name": "order_id",
|
|
245
|
+
"type": "bigint",
|
|
246
|
+
"key": "fk",
|
|
247
|
+
"references": "order.id"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"name": "method",
|
|
251
|
+
"type": "varchar(32)"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "amount",
|
|
255
|
+
"type": "numeric(12,2)"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"name": "paid_at",
|
|
259
|
+
"type": "timestamptz"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"name": "external_ref",
|
|
263
|
+
"type": "varchar(64)"
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
"relationships": [
|
|
269
|
+
{
|
|
270
|
+
"id": "order_customer",
|
|
271
|
+
"from": "order",
|
|
272
|
+
"to": "customer",
|
|
273
|
+
"label": "placed by",
|
|
274
|
+
"fromCardinality": "many",
|
|
275
|
+
"toCardinality": "one"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"id": "payment_order",
|
|
279
|
+
"from": "payment",
|
|
280
|
+
"to": "order",
|
|
281
|
+
"fromCardinality": "many",
|
|
282
|
+
"fromOptional": true,
|
|
283
|
+
"toCardinality": "one",
|
|
284
|
+
"identifying": false
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"id": "order_item_order",
|
|
288
|
+
"from": "order_item",
|
|
289
|
+
"to": "order",
|
|
290
|
+
"fromCardinality": "many",
|
|
291
|
+
"toCardinality": "one"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"id": "order_item_product",
|
|
295
|
+
"from": "order_item",
|
|
296
|
+
"to": "product",
|
|
297
|
+
"fromCardinality": "many",
|
|
298
|
+
"toCardinality": "one"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"id": "inventory_product",
|
|
302
|
+
"from": "inventory",
|
|
303
|
+
"to": "product",
|
|
304
|
+
"fromCardinality": "many",
|
|
305
|
+
"toCardinality": "one"
|
|
306
|
+
}
|
|
307
|
+
],
|
|
308
|
+
"cards": [
|
|
309
|
+
{
|
|
310
|
+
"dot": "cyan",
|
|
311
|
+
"title": "Keys",
|
|
312
|
+
"items": [
|
|
313
|
+
"Every child carries the parent id as a bigint foreign key.",
|
|
314
|
+
"order is the hub: order_item and payment each hold an order_id.",
|
|
315
|
+
"email and sku are unique, so they carry a secondary key marker."
|
|
316
|
+
]
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"dot": "amber",
|
|
320
|
+
"title": "Optionality",
|
|
321
|
+
"items": [
|
|
322
|
+
"An order may exist before any payment attempt, so the payment side is zero or many.",
|
|
323
|
+
"The payment relationship is non-identifying: it is drawn dashed.",
|
|
324
|
+
"customer, product, and order_item links are all mandatory."
|
|
325
|
+
]
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"dot": "emerald",
|
|
329
|
+
"title": "How the bands read",
|
|
330
|
+
"items": [
|
|
331
|
+
"The checkout band is the order and the payment that settles it.",
|
|
332
|
+
"The catalog band is what orders point at: one product, one stock record.",
|
|
333
|
+
"accounts and line items stand alone; a single-table domain keeps its tag in the table header."
|
|
334
|
+
]
|
|
335
|
+
}
|
|
336
|
+
]
|
|
337
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"diagram_type": "timeline",
|
|
4
|
+
"meta": {
|
|
5
|
+
"title": "Payment failure incident",
|
|
6
|
+
"subtitle": "Illustrative incident: release, monitoring, and response events on one clock.",
|
|
7
|
+
"output": "payment-incident-timeline.html",
|
|
8
|
+
"evidence": "illustrative",
|
|
9
|
+
"timezone": "Asia/Shanghai",
|
|
10
|
+
"quality_profile": "showcase"
|
|
11
|
+
},
|
|
12
|
+
"lanes": [
|
|
13
|
+
{ "id": "release", "label": "Release" },
|
|
14
|
+
{ "id": "monitoring", "label": "Monitoring" },
|
|
15
|
+
{ "id": "response", "label": "Response" }
|
|
16
|
+
],
|
|
17
|
+
"events": [
|
|
18
|
+
{ "id": "deploy", "at": "2026-10-01T10:00:00+08:00", "title": "Deploy v2.4", "detail": "New version starts serving payment requests.", "lane": "release", "kind": "change" },
|
|
19
|
+
{ "id": "alert", "at": "2026-10-01T10:05:00+08:00", "title": "Payment failure alert", "detail": "Error rate on /pay rises above the paging threshold.", "lane": "monitoring", "kind": "alert" },
|
|
20
|
+
{ "id": "rollback", "at": "2026-10-01T10:10:00+08:00", "title": "Start rollback", "detail": "On-call decides to return to v2.3.", "lane": "response", "kind": "action" },
|
|
21
|
+
{ "id": "recovered", "at": "2026-10-01T10:15:00+08:00", "title": "Metrics recovered", "detail": "Payment success rate back to baseline.", "lane": "monitoring", "kind": "recovery" },
|
|
22
|
+
{ "id": "closed", "at": "2026-10-01T10:20:00+08:00", "title": "Incident closed", "detail": "Stability confirmed; response ends.", "lane": "response", "kind": "action" }
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"diagram_type": "tree",
|
|
4
|
+
"meta": {
|
|
5
|
+
"title": "Payment platform capabilities",
|
|
6
|
+
"subtitle": "Illustrative decomposition: each capability belongs to exactly one parent. Links show containment, not calls.",
|
|
7
|
+
"output": "payment-platform-tree.html",
|
|
8
|
+
"quality_profile": "showcase"
|
|
9
|
+
},
|
|
10
|
+
"nodes": [
|
|
11
|
+
{ "id": "platform", "label": "Payment platform", "sublabel": "Decomposed by capability" },
|
|
12
|
+
{ "id": "orders", "label": "Orders", "parent": "platform", "sublabel": "Order lifecycle" },
|
|
13
|
+
{ "id": "payments", "label": "Payments", "parent": "platform", "sublabel": "Money movement" },
|
|
14
|
+
{ "id": "operations", "label": "Operations", "parent": "platform", "sublabel": "Back-office work" },
|
|
15
|
+
{ "id": "create_order", "label": "Create order", "parent": "orders" },
|
|
16
|
+
{ "id": "cancel_order", "label": "Cancel order", "parent": "orders" },
|
|
17
|
+
{ "id": "card_payment", "label": "Card payment", "parent": "payments" },
|
|
18
|
+
{ "id": "wallet_payment", "label": "Wallet payment", "parent": "payments" },
|
|
19
|
+
{ "id": "refunds", "label": "Refund handling", "parent": "operations" },
|
|
20
|
+
{ "id": "reconciliation", "label": "Transaction reconciliation", "parent": "operations" }
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"diagram_type": "class",
|
|
4
|
+
"meta": {
|
|
5
|
+
"title": "Payment processor hierarchy",
|
|
6
|
+
"subtitle": "Illustrative module: one processor contract, a retrying base class, and five provider implementations.",
|
|
7
|
+
"output": "payment-processors-class.html",
|
|
8
|
+
"quality_profile": "showcase"
|
|
9
|
+
},
|
|
10
|
+
"layout": {
|
|
11
|
+
"mode": "grid"
|
|
12
|
+
},
|
|
13
|
+
"types": [
|
|
14
|
+
{
|
|
15
|
+
"id": "checkout_orchestrator",
|
|
16
|
+
"label": "CheckoutOrchestrator",
|
|
17
|
+
"kind": "class",
|
|
18
|
+
"sublabel": "Runs one checkout from order to receipt",
|
|
19
|
+
"row": 0,
|
|
20
|
+
"col": 0,
|
|
21
|
+
"attributes": [
|
|
22
|
+
{ "name": "registry", "type": "ProcessorRegistry", "visibility": "private" },
|
|
23
|
+
{ "name": "clock", "type": "Clock", "visibility": "private" }
|
|
24
|
+
],
|
|
25
|
+
"methods": [
|
|
26
|
+
{ "name": "checkout", "parameters": "order: Order, key: IdempotencyKey", "returns": "CheckoutResult", "visibility": "public" },
|
|
27
|
+
{ "name": "cancelPendingAuthorization", "parameters": "orderId: OrderId", "returns": "void", "visibility": "public" }
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "processor_registry",
|
|
32
|
+
"label": "ProcessorRegistry",
|
|
33
|
+
"kind": "class",
|
|
34
|
+
"sublabel": "Selects a processor for a payment method",
|
|
35
|
+
"row": 0,
|
|
36
|
+
"col": 1,
|
|
37
|
+
"attributes": [
|
|
38
|
+
{ "name": "processors", "type": "Map<MethodType, PaymentProcessor>", "visibility": "private" }
|
|
39
|
+
],
|
|
40
|
+
"methods": [
|
|
41
|
+
{ "name": "processorFor", "parameters": "method: PaymentMethod", "returns": "PaymentProcessor", "visibility": "public" }
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "payment_processor",
|
|
46
|
+
"label": "PaymentProcessor",
|
|
47
|
+
"kind": "interface",
|
|
48
|
+
"sublabel": "Authorize, capture, and refund contract",
|
|
49
|
+
"row": 0,
|
|
50
|
+
"col": 2.5,
|
|
51
|
+
"methods": [
|
|
52
|
+
{ "name": "authorize", "parameters": "request: AuthorizationRequest", "returns": "AuthorizationResult", "visibility": "public", "abstract": true },
|
|
53
|
+
{ "name": "capture", "parameters": "authorization: AuthorizationId, amount: Money", "returns": "CaptureResult", "visibility": "public", "abstract": true },
|
|
54
|
+
{ "name": "refund", "parameters": "capture: CaptureId, amount: Money", "returns": "RefundResult", "visibility": "public", "abstract": true }
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "order",
|
|
59
|
+
"label": "Order",
|
|
60
|
+
"kind": "class",
|
|
61
|
+
"sublabel": "Aggregate root for one purchase",
|
|
62
|
+
"row": 1,
|
|
63
|
+
"col": 0,
|
|
64
|
+
"attributes": [
|
|
65
|
+
{ "name": "id", "type": "OrderId", "visibility": "public" },
|
|
66
|
+
{ "name": "total", "type": "Money", "visibility": "public" },
|
|
67
|
+
{ "name": "status", "type": "PaymentStatus", "visibility": "public" }
|
|
68
|
+
],
|
|
69
|
+
"methods": [
|
|
70
|
+
{ "name": "addLine", "parameters": "sku: Sku, quantity: int", "returns": "LineItem", "visibility": "public" },
|
|
71
|
+
{ "name": "markAuthorized", "parameters": "authorization: AuthorizationId", "returns": "void", "visibility": "public" }
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "payment_status",
|
|
76
|
+
"label": "PaymentStatus",
|
|
77
|
+
"kind": "enum",
|
|
78
|
+
"sublabel": "Lifecycle of the order's payment",
|
|
79
|
+
"row": 1,
|
|
80
|
+
"col": 1,
|
|
81
|
+
"attributes": [
|
|
82
|
+
{ "name": "PENDING" },
|
|
83
|
+
{ "name": "AUTHORIZED" },
|
|
84
|
+
{ "name": "CAPTURED" },
|
|
85
|
+
{ "name": "REFUNDED" },
|
|
86
|
+
{ "name": "FAILED" }
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "retrying_processor",
|
|
91
|
+
"label": "RetryingProcessorBase",
|
|
92
|
+
"kind": "abstract",
|
|
93
|
+
"sublabel": "Shared retry, timeout, and idempotency handling",
|
|
94
|
+
"row": 1,
|
|
95
|
+
"col": 2,
|
|
96
|
+
"attributes": [
|
|
97
|
+
{ "name": "DEFAULT_TIMEOUT", "type": "Duration", "visibility": "public", "static": true },
|
|
98
|
+
{ "name": "retryPolicy", "type": "RetryPolicy", "visibility": "protected" }
|
|
99
|
+
],
|
|
100
|
+
"methods": [
|
|
101
|
+
{ "name": "authorize", "parameters": "request: AuthorizationRequest", "returns": "AuthorizationResult", "visibility": "public" },
|
|
102
|
+
{ "name": "sendToProvider", "parameters": "request: ProviderRequest", "returns": "ProviderResponse", "visibility": "protected", "abstract": true }
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"id": "bank_transfer",
|
|
107
|
+
"label": "BankTransferProcessor",
|
|
108
|
+
"kind": "class",
|
|
109
|
+
"sublabel": "Asynchronous transfer without provider retries",
|
|
110
|
+
"row": 1,
|
|
111
|
+
"col": 3,
|
|
112
|
+
"methods": [
|
|
113
|
+
{ "name": "authorize", "parameters": "request: AuthorizationRequest", "returns": "AuthorizationResult", "visibility": "public" },
|
|
114
|
+
{ "name": "awaitSettlement", "parameters": "transfer: TransferId", "returns": "SettlementResult", "visibility": "private" }
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"id": "line_item",
|
|
119
|
+
"label": "LineItem",
|
|
120
|
+
"kind": "record",
|
|
121
|
+
"sublabel": "Immutable priced order line",
|
|
122
|
+
"row": 2,
|
|
123
|
+
"col": 0,
|
|
124
|
+
"attributes": [
|
|
125
|
+
{ "name": "sku", "type": "Sku", "visibility": "public" },
|
|
126
|
+
{ "name": "quantity", "type": "int", "visibility": "public" },
|
|
127
|
+
{ "name": "unitPrice", "type": "Money", "visibility": "public" }
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"id": "stripe_card",
|
|
132
|
+
"label": "StripeCardProcessor",
|
|
133
|
+
"kind": "class",
|
|
134
|
+
"sublabel": "Card payments through Stripe",
|
|
135
|
+
"row": 2,
|
|
136
|
+
"col": 1,
|
|
137
|
+
"methods": [
|
|
138
|
+
{ "name": "sendToProvider", "parameters": "request: ProviderRequest", "returns": "ProviderResponse", "visibility": "protected" }
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "adyen_card",
|
|
143
|
+
"label": "AdyenCardProcessor",
|
|
144
|
+
"kind": "class",
|
|
145
|
+
"sublabel": "Card payments through Adyen",
|
|
146
|
+
"row": 2,
|
|
147
|
+
"col": 2,
|
|
148
|
+
"methods": [
|
|
149
|
+
{ "name": "sendToProvider", "parameters": "request: ProviderRequest", "returns": "ProviderResponse", "visibility": "protected" }
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"id": "paypal_wallet",
|
|
154
|
+
"label": "PayPalWalletProcessor",
|
|
155
|
+
"kind": "class",
|
|
156
|
+
"sublabel": "Wallet payments through PayPal",
|
|
157
|
+
"row": 2,
|
|
158
|
+
"col": 3,
|
|
159
|
+
"methods": [
|
|
160
|
+
{ "name": "sendToProvider", "parameters": "request: ProviderRequest", "returns": "ProviderResponse", "visibility": "protected" },
|
|
161
|
+
{ "name": "exchangeBillingAgreementToken", "parameters": "token: String", "returns": "AgreementId", "visibility": "private" }
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"relationships": [
|
|
166
|
+
{ "id": "orchestrator_registry", "from": "checkout_orchestrator", "to": "processor_registry", "kind": "association", "label": "selects via" },
|
|
167
|
+
{ "id": "registry_processors", "from": "processor_registry", "to": "payment_processor", "kind": "aggregation", "label": "holds" },
|
|
168
|
+
{ "id": "orchestrator_order", "from": "checkout_orchestrator", "to": "order", "kind": "dependency", "label": "updates" },
|
|
169
|
+
{ "id": "order_lines", "from": "order", "to": "line_item", "kind": "composition", "label": "owns lines" },
|
|
170
|
+
{ "id": "order_status", "from": "order", "to": "payment_status", "kind": "association" },
|
|
171
|
+
{ "id": "retrying_implements", "from": "retrying_processor", "to": "payment_processor", "kind": "realization" },
|
|
172
|
+
{ "id": "bank_implements", "from": "bank_transfer", "to": "payment_processor", "kind": "realization" },
|
|
173
|
+
{ "id": "stripe_extends", "from": "stripe_card", "to": "retrying_processor", "kind": "inheritance" },
|
|
174
|
+
{ "id": "adyen_extends", "from": "adyen_card", "to": "retrying_processor", "kind": "inheritance" },
|
|
175
|
+
{ "id": "paypal_extends", "from": "paypal_wallet", "to": "retrying_processor", "kind": "inheritance" }
|
|
176
|
+
]
|
|
177
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"diagram_type": "class",
|
|
4
|
+
"meta": {
|
|
5
|
+
"title": "Payment module types",
|
|
6
|
+
"subtitle": "OrderService depends on the PaymentGateway contract; card and wallet gateways implement it.",
|
|
7
|
+
"output": "payments-class.html",
|
|
8
|
+
"quality_profile": "showcase"
|
|
9
|
+
},
|
|
10
|
+
"layout": {
|
|
11
|
+
"mode": "grid"
|
|
12
|
+
},
|
|
13
|
+
"types": [
|
|
14
|
+
{
|
|
15
|
+
"id": "order_service",
|
|
16
|
+
"label": "OrderService",
|
|
17
|
+
"kind": "class",
|
|
18
|
+
"sublabel": "Creates orders and starts payment",
|
|
19
|
+
"row": 0,
|
|
20
|
+
"col": 0,
|
|
21
|
+
"attributes": [
|
|
22
|
+
{ "name": "gateway", "type": "PaymentGateway", "visibility": "private" }
|
|
23
|
+
],
|
|
24
|
+
"methods": [
|
|
25
|
+
{ "name": "createOrder", "parameters": "cart: Cart", "returns": "Order", "visibility": "public" },
|
|
26
|
+
{ "name": "checkout", "parameters": "order: Order", "returns": "Receipt", "visibility": "public" }
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "payment_gateway",
|
|
31
|
+
"label": "PaymentGateway",
|
|
32
|
+
"kind": "interface",
|
|
33
|
+
"sublabel": "Payment contract every channel fulfils",
|
|
34
|
+
"row": 0,
|
|
35
|
+
"col": 1.5,
|
|
36
|
+
"methods": [
|
|
37
|
+
{ "name": "pay", "parameters": "amount: Money", "returns": "Result", "visibility": "public", "abstract": true }
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "order",
|
|
42
|
+
"label": "Order",
|
|
43
|
+
"kind": "class",
|
|
44
|
+
"sublabel": "Order identity, amount, and status",
|
|
45
|
+
"row": 1,
|
|
46
|
+
"col": 0,
|
|
47
|
+
"attributes": [
|
|
48
|
+
{ "name": "id", "type": "OrderId", "visibility": "public" },
|
|
49
|
+
{ "name": "amount", "type": "Money", "visibility": "public" },
|
|
50
|
+
{ "name": "status", "type": "OrderStatus", "visibility": "public" }
|
|
51
|
+
],
|
|
52
|
+
"methods": [
|
|
53
|
+
{ "name": "markPaid", "returns": "void", "visibility": "public" }
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "card_gateway",
|
|
58
|
+
"label": "CardGateway",
|
|
59
|
+
"kind": "class",
|
|
60
|
+
"sublabel": "Charges a bank card",
|
|
61
|
+
"row": 1,
|
|
62
|
+
"col": 1,
|
|
63
|
+
"methods": [
|
|
64
|
+
{ "name": "pay", "parameters": "amount: Money", "returns": "Result", "visibility": "public" }
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": "wallet_gateway",
|
|
69
|
+
"label": "WalletGateway",
|
|
70
|
+
"kind": "class",
|
|
71
|
+
"sublabel": "Debits a stored wallet balance",
|
|
72
|
+
"row": 1,
|
|
73
|
+
"col": 2,
|
|
74
|
+
"methods": [
|
|
75
|
+
{ "name": "pay", "parameters": "amount: Money", "returns": "Result", "visibility": "public" }
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"relationships": [
|
|
80
|
+
{ "id": "uses_gateway", "from": "order_service", "to": "payment_gateway", "kind": "dependency", "label": "pays through" },
|
|
81
|
+
{ "id": "creates_order", "from": "order_service", "to": "order", "kind": "dependency", "label": "creates" },
|
|
82
|
+
{ "id": "card_implements", "from": "card_gateway", "to": "payment_gateway", "kind": "realization" },
|
|
83
|
+
{ "id": "wallet_implements", "from": "wallet_gateway", "to": "payment_gateway", "kind": "realization" }
|
|
84
|
+
]
|
|
85
|
+
}
|
|
@@ -6,12 +6,7 @@
|
|
|
6
6
|
"output": "examples/dataflow-product-analytics.html",
|
|
7
7
|
"viewBox": [1080, 520],
|
|
8
8
|
"animation": "trace",
|
|
9
|
-
"quality_profile": "showcase"
|
|
10
|
-
"views": [
|
|
11
|
-
{ "id": "collection-path", "label": "Collection path", "focus": ["web", "mobile", "edge", "stream"], "note": "Follow product events from clients into the ordered event stream." },
|
|
12
|
-
{ "id": "consent-boundary", "label": "Consent and PII", "focus": ["edge", "consent", "pii"], "note": "Isolate the policy gate and restricted identity store." },
|
|
13
|
-
{ "id": "analytics-consumers", "label": "Curated consumers", "focus": ["stream", "warehouse", "dashboard", "features", "model"], "note": "See curated facts, dashboards, and the derived feature path." }
|
|
14
|
-
]
|
|
9
|
+
"quality_profile": "showcase"
|
|
15
10
|
},
|
|
16
11
|
"stages": [
|
|
17
12
|
{ "label": "Sources" },
|