@diagrammo/dgmo 0.8.2 → 0.8.4
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/.claude/commands/dgmo-diagram-this.md +60 -0
- package/.claude/commands/dgmo-document-project.md +128 -0
- package/.claude/commands/dgmo.md +185 -50
- package/.cursorrules +32 -37
- package/.github/copilot-instructions.md +35 -44
- package/.windsurfrules +32 -37
- package/README.md +4 -4
- package/dist/cli.cjs +189 -194
- package/dist/editor.cjs +336 -0
- package/dist/editor.cjs.map +1 -0
- package/dist/editor.d.cts +27 -0
- package/dist/editor.d.ts +27 -0
- package/dist/editor.js +305 -0
- package/dist/editor.js.map +1 -0
- package/dist/index.cjs +3699 -1564
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +3699 -1564
- package/dist/index.js.map +1 -1
- package/docs/language-reference.md +822 -1060
- package/gallery/fixtures/arc.dgmo +18 -0
- package/gallery/fixtures/area.dgmo +19 -0
- package/gallery/fixtures/bar-stacked.dgmo +10 -0
- package/gallery/fixtures/bar.dgmo +10 -0
- package/gallery/fixtures/c4-full.dgmo +52 -0
- package/gallery/fixtures/c4.dgmo +17 -0
- package/gallery/fixtures/chord.dgmo +12 -0
- package/gallery/fixtures/class-basic.dgmo +14 -0
- package/gallery/fixtures/class-full.dgmo +43 -0
- package/gallery/fixtures/doughnut.dgmo +8 -0
- package/gallery/fixtures/flowchart-basic.dgmo +3 -0
- package/gallery/fixtures/flowchart-colors.dgmo +5 -0
- package/gallery/fixtures/flowchart-complex.dgmo +17 -0
- package/gallery/fixtures/flowchart-decision.dgmo +5 -0
- package/gallery/fixtures/flowchart-full.dgmo +13 -0
- package/gallery/fixtures/flowchart-groups.dgmo +10 -0
- package/gallery/fixtures/flowchart-loop.dgmo +7 -0
- package/gallery/fixtures/flowchart-nested.dgmo +7 -0
- package/gallery/fixtures/flowchart-shapes.dgmo +5 -0
- package/gallery/fixtures/function.dgmo +8 -0
- package/gallery/fixtures/funnel.dgmo +7 -0
- package/gallery/fixtures/gantt-full.dgmo +49 -0
- package/gallery/fixtures/gantt.dgmo +42 -0
- package/gallery/fixtures/heatmap.dgmo +8 -0
- package/gallery/fixtures/infra-full.dgmo +78 -0
- package/gallery/fixtures/infra-overload.dgmo +25 -0
- package/gallery/fixtures/infra.dgmo +47 -0
- package/gallery/fixtures/initiative-status-full.dgmo +46 -0
- package/gallery/fixtures/initiative-status-phases.dgmo +29 -0
- package/gallery/fixtures/initiative-status.dgmo +9 -0
- package/gallery/fixtures/line.dgmo +19 -0
- package/gallery/fixtures/multi-line.dgmo +11 -0
- package/gallery/fixtures/org-basic.dgmo +16 -0
- package/gallery/fixtures/org-full.dgmo +69 -0
- package/gallery/fixtures/org-teams.dgmo +25 -0
- package/gallery/fixtures/pie.dgmo +9 -0
- package/gallery/fixtures/polar-area.dgmo +8 -0
- package/gallery/fixtures/quadrant.dgmo +18 -0
- package/gallery/fixtures/radar.dgmo +8 -0
- package/gallery/fixtures/sankey.dgmo +31 -0
- package/gallery/fixtures/scatter.dgmo +21 -0
- package/gallery/fixtures/sequence-tags-protocols.dgmo +45 -0
- package/gallery/fixtures/sequence-tags.dgmo +41 -0
- package/gallery/fixtures/sequence.dgmo +35 -0
- package/gallery/fixtures/sitemap-basic.dgmo +12 -0
- package/gallery/fixtures/sitemap-full.dgmo +156 -0
- package/gallery/fixtures/slope.dgmo +8 -0
- package/gallery/fixtures/spr-eras.dgmo +62 -0
- package/gallery/fixtures/state.dgmo +30 -0
- package/gallery/fixtures/timeline-intraday.dgmo +14 -0
- package/gallery/fixtures/timeline.dgmo +32 -0
- package/gallery/fixtures/venn.dgmo +10 -0
- package/gallery/fixtures/wordcloud.dgmo +24 -0
- package/package.json +51 -2
- package/src/c4/layout.ts +372 -90
- package/src/c4/parser.ts +113 -62
- package/src/chart.ts +149 -64
- package/src/class/parser.ts +84 -28
- package/src/class/renderer.ts +2 -2
- package/src/cli.ts +179 -77
- package/src/completion.ts +381 -182
- package/src/d3.ts +1026 -428
- package/src/dgmo-mermaid.ts +16 -13
- package/src/dgmo-router.ts +70 -24
- package/src/echarts.ts +682 -169
- package/src/editor/dgmo.grammar +69 -0
- package/src/editor/dgmo.grammar.d.ts +2 -0
- package/src/editor/dgmo.grammar.js +18 -0
- package/src/editor/dgmo.grammar.terms.d.ts +5 -0
- package/src/editor/dgmo.grammar.terms.js +35 -0
- package/src/editor/highlight.ts +36 -0
- package/src/editor/index.ts +28 -0
- package/src/editor/keywords.ts +220 -0
- package/src/editor/tokens.ts +30 -0
- package/src/er/parser.ts +55 -29
- package/src/er/renderer.ts +112 -53
- package/src/gantt/calculator.ts +91 -29
- package/src/gantt/parser.ts +291 -97
- package/src/gantt/renderer.ts +1120 -350
- package/src/graph/flowchart-parser.ts +48 -75
- package/src/graph/state-parser.ts +54 -27
- package/src/infra/parser.ts +161 -177
- package/src/infra/renderer.ts +723 -271
- package/src/infra/types.ts +0 -1
- package/src/initiative-status/parser.ts +144 -56
- package/src/kanban/parser.ts +27 -19
- package/src/org/layout.ts +111 -44
- package/src/org/parser.ts +71 -27
- package/src/org/resolver.ts +3 -3
- package/src/palettes/index.ts +3 -2
- package/src/render.ts +1 -2
- package/src/sequence/parser.ts +209 -100
- package/src/sitemap/parser.ts +73 -44
- package/src/utils/arrows.ts +2 -22
- package/src/utils/duration.ts +39 -21
- package/src/utils/legend-constants.ts +0 -2
- package/src/utils/parsing.ts +82 -72
- package/src/utils/tag-groups.ts +4 -41
- package/src/infra/serialize.ts +0 -67
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
arc Microservice Dependencies
|
|
2
|
+
order group
|
|
3
|
+
|
|
4
|
+
[Frontend]
|
|
5
|
+
WebApp -> API Gateway 5
|
|
6
|
+
MobileApp -> API Gateway 3
|
|
7
|
+
|
|
8
|
+
[Core Services]
|
|
9
|
+
API Gateway -> AuthService 4
|
|
10
|
+
API Gateway -> UserService 5
|
|
11
|
+
API Gateway -> OrderService 3
|
|
12
|
+
UserService -> Database 4
|
|
13
|
+
OrderService -> Database 3
|
|
14
|
+
OrderService -> PaymentService 2
|
|
15
|
+
|
|
16
|
+
[External]
|
|
17
|
+
PaymentService -> Stripe 2
|
|
18
|
+
AuthService -> OAuth 3
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
area Memory Usage Over Time
|
|
2
|
+
x-label Hour
|
|
3
|
+
y-label GB
|
|
4
|
+
|
|
5
|
+
era 12am -> 9am Night (blue)
|
|
6
|
+
era 9am -> 6pm Day (green)
|
|
7
|
+
era 6pm -> 11pm Evening (purple)
|
|
8
|
+
|
|
9
|
+
12am 2.1
|
|
10
|
+
3am 1.8
|
|
11
|
+
6am 2.4
|
|
12
|
+
9am 5.7
|
|
13
|
+
10am 6.3
|
|
14
|
+
12pm 7.1
|
|
15
|
+
2pm 6.8
|
|
16
|
+
4pm 5.9
|
|
17
|
+
6pm 4.2
|
|
18
|
+
9pm 3.1
|
|
19
|
+
11pm 2.5
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
bar-stacked Support Tickets by Priority
|
|
2
|
+
x-label Month
|
|
3
|
+
y-label Tickets
|
|
4
|
+
|
|
5
|
+
series Critical (red), High (orange), Medium (yellow), Low (green), Info (blue)
|
|
6
|
+
January 8, 24, 45, 62, 31
|
|
7
|
+
February 12, 19, 51, 58, 28
|
|
8
|
+
March 6, 22, 38, 71, 35
|
|
9
|
+
April 10, 28, 42, 65, 40
|
|
10
|
+
May 5, 15, 48, 70, 33
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
c4 Online Bookstore — C4 Architecture
|
|
2
|
+
|
|
3
|
+
tag Technology alias tech
|
|
4
|
+
React(blue)
|
|
5
|
+
Node(green)
|
|
6
|
+
Python(orange)
|
|
7
|
+
PostgreSQL(purple)
|
|
8
|
+
|
|
9
|
+
tag Team alias t
|
|
10
|
+
Frontend(blue)
|
|
11
|
+
Backend(green)
|
|
12
|
+
Platform(teal)
|
|
13
|
+
Data(purple)
|
|
14
|
+
|
|
15
|
+
Customer is a person | t: Frontend
|
|
16
|
+
description: Browses and purchases books online
|
|
17
|
+
|
|
18
|
+
Admin is a person | t: Backend
|
|
19
|
+
description: Manages inventory and orders
|
|
20
|
+
|
|
21
|
+
Bookstore is a system | t: Backend
|
|
22
|
+
description: Core e-commerce platform for book sales
|
|
23
|
+
containers
|
|
24
|
+
WebApp is a container | tech: React, t: Frontend
|
|
25
|
+
description: Single-page storefront application
|
|
26
|
+
components
|
|
27
|
+
Catalog is a component
|
|
28
|
+
Cart is a component
|
|
29
|
+
Checkout is a component
|
|
30
|
+
API is a container | tech: Node, t: Backend
|
|
31
|
+
description: REST API gateway for all client requests
|
|
32
|
+
OrderSvc is a container | tech: Node, t: Backend
|
|
33
|
+
description: Order processing and fulfillment
|
|
34
|
+
SearchSvc is a container | tech: Python, t: Backend
|
|
35
|
+
description: Full-text search over book catalog
|
|
36
|
+
BookDB is a container is a database | tech: PostgreSQL, t: Data
|
|
37
|
+
description: Relational store — books, orders, users
|
|
38
|
+
CacheLayer is a container is a cache | tech: Redis, t: Platform
|
|
39
|
+
description: Session and query result cache
|
|
40
|
+
EventBus is a container | tech: Kafka, t: Platform
|
|
41
|
+
description: Async event backbone for order lifecycle
|
|
42
|
+
|
|
43
|
+
PaymentGW is a system | t: Platform
|
|
44
|
+
description: Stripe — external payment processing
|
|
45
|
+
|
|
46
|
+
EmailSvc is a system | t: Platform
|
|
47
|
+
description: SendGrid — transactional email delivery
|
|
48
|
+
|
|
49
|
+
Customer -Browses catalog-> Bookstore
|
|
50
|
+
Admin -Manages inventory-> Bookstore
|
|
51
|
+
Bookstore -Processes payments via-> PaymentGW | tech: REST
|
|
52
|
+
Bookstore ~Sends order confirmations~> EmailSvc | tech: SMTP
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
c4 Internet Banking System
|
|
2
|
+
|
|
3
|
+
Customer is a person
|
|
4
|
+
description: A customer of the bank
|
|
5
|
+
|
|
6
|
+
Banking is a system
|
|
7
|
+
description: Core internet banking system
|
|
8
|
+
containers
|
|
9
|
+
WebApp is a container | tech: React
|
|
10
|
+
API is a container | tech: Node.js
|
|
11
|
+
DB is a container is a database | tech: PostgreSQL
|
|
12
|
+
|
|
13
|
+
Email is a system
|
|
14
|
+
description: External email delivery service
|
|
15
|
+
|
|
16
|
+
Customer -Uses-> Banking
|
|
17
|
+
Banking -Sends emails via-> Email
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
chord Inter-Department Collaboration
|
|
2
|
+
|
|
3
|
+
Engineering -> Design 85
|
|
4
|
+
Engineering -> Product 72
|
|
5
|
+
Engineering -> QA 95
|
|
6
|
+
Design -> Product 68
|
|
7
|
+
Design -> Marketing 45
|
|
8
|
+
Product -> Marketing 58
|
|
9
|
+
Product -> Sales 42
|
|
10
|
+
Marketing -> Sales 65
|
|
11
|
+
QA -> Engineering 88
|
|
12
|
+
Sales -> Product 30
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
class Design Patterns
|
|
2
|
+
|
|
3
|
+
Drawable [interface]
|
|
4
|
+
+ draw(): void
|
|
5
|
+
+ resize(w: number, h: number): void
|
|
6
|
+
|
|
7
|
+
Shape implements Drawable [abstract] (purple)
|
|
8
|
+
# x: number
|
|
9
|
+
# y: number
|
|
10
|
+
+ area(): number
|
|
11
|
+
+ move(dx: number, dy: number): void
|
|
12
|
+
- validate(): boolean
|
|
13
|
+
|
|
14
|
+
Circle extends Shape
|
|
15
|
+
- radius: number
|
|
16
|
+
+ getRadius(): number
|
|
17
|
+
|
|
18
|
+
Rectangle extends Shape
|
|
19
|
+
- width: number
|
|
20
|
+
- height: number
|
|
21
|
+
+ getDiagonal(): number
|
|
22
|
+
|
|
23
|
+
Color [enum] (yellow)
|
|
24
|
+
Red
|
|
25
|
+
Green
|
|
26
|
+
Blue
|
|
27
|
+
|
|
28
|
+
Canvas
|
|
29
|
+
- shapes: Shape[]
|
|
30
|
+
+ render(): void
|
|
31
|
+
+ addShape(s: Shape): void
|
|
32
|
+
+ clear(): void
|
|
33
|
+
count: number {static}
|
|
34
|
+
*-- Shape : contains
|
|
35
|
+
..> Logger : uses
|
|
36
|
+
|
|
37
|
+
Logger
|
|
38
|
+
- instance: Logger {static}
|
|
39
|
+
+ log(msg: string): void
|
|
40
|
+
+ getInstance(): Logger {static}
|
|
41
|
+
|
|
42
|
+
Circle
|
|
43
|
+
-> Color : has fill
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
flowchart CI/CD Pipeline
|
|
2
|
+
|
|
3
|
+
(Push to Repo) -> [[Run Linter]] -> <Lint Pass?>
|
|
4
|
+
-yes-> [[Run Tests]]
|
|
5
|
+
-no-> [Lint Report~] -> /Notify Dev/ -> (Fix & Retry)
|
|
6
|
+
|
|
7
|
+
[[Run Tests]] -> <Tests Pass?>
|
|
8
|
+
-yes-> [Build Artifact]
|
|
9
|
+
-no-> [Test Report~] -> /Notify Dev/ -> (Fix & Retry)
|
|
10
|
+
|
|
11
|
+
[Build Artifact] -> <Environment?>
|
|
12
|
+
-staging-> [[Deploy to Staging]] -> /Run Smoke Tests/ -> <Smoke OK?>
|
|
13
|
+
-yes-> /Await Approval/
|
|
14
|
+
-no-> /Notify Team/ -> (Rollback)
|
|
15
|
+
-production-> [[Deploy to Prod]] -> /Health Check/ -> <Healthy?>
|
|
16
|
+
-yes-> (Done)
|
|
17
|
+
-no-> (Rollback)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
flowchart Order Processing Pipeline
|
|
2
|
+
|
|
3
|
+
(Receive Order) -> [Validate Input] -> <Valid?>
|
|
4
|
+
-yes-> [Check Inventory] -> <In Stock?>
|
|
5
|
+
-yes-> [[Process Payment]] -> <Payment OK?>
|
|
6
|
+
-yes-> [Ship Order] -> /Send Confirmation/ -> (Complete)
|
|
7
|
+
-no-> [Retry Payment] -> <Retries Left?>
|
|
8
|
+
-yes-> [[Process Payment]]
|
|
9
|
+
-no-> [Cancel Order] -> /Notify Customer/ -> (Failed)
|
|
10
|
+
-no-> /Notify Backorder/ -> <Accept Wait?>
|
|
11
|
+
-yes-> [Queue Order] -> [Check Inventory]
|
|
12
|
+
-no-> [Refund] -> (Cancelled)
|
|
13
|
+
-no-> [Log Validation Error~] -> /Show Error/ -> (Rejected)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
gantt Product Launch Plan — Full
|
|
2
|
+
start 2024-01-15
|
|
3
|
+
today-marker 2024-03-01
|
|
4
|
+
critical-path
|
|
5
|
+
dependencies
|
|
6
|
+
|
|
7
|
+
tag Team alias t
|
|
8
|
+
Engineering(blue)
|
|
9
|
+
Design(purple)
|
|
10
|
+
QA(orange)
|
|
11
|
+
Marketing(green)
|
|
12
|
+
|
|
13
|
+
tag Phase alias p
|
|
14
|
+
Foundation(green)
|
|
15
|
+
Growth(orange)
|
|
16
|
+
Launch(red)
|
|
17
|
+
|
|
18
|
+
era 2024-01-15 -> 2024-02-15 Investor Review
|
|
19
|
+
era 2024-03-10 -> 2024-03-14 GDC 2024 (purple)
|
|
20
|
+
marker 2024-02-26 Board Meeting
|
|
21
|
+
marker 2024-04-08 Trade Show Demo (orange)
|
|
22
|
+
|
|
23
|
+
// Independent task with offset — starts 8bd after project start
|
|
24
|
+
10bd Brand Guidelines | t: Design, p: Foundation, offset: 8bd
|
|
25
|
+
|
|
26
|
+
parallel
|
|
27
|
+
[Backend] | t: Engineering
|
|
28
|
+
30bd Database Layer | p: Foundation, 80%
|
|
29
|
+
10bd? Auth Module | p: Foundation, 100%
|
|
30
|
+
-blocks-> Frontend.API Integration | offset: -5bd
|
|
31
|
+
parallel
|
|
32
|
+
5bd Load Testing | t: QA, p: Growth
|
|
33
|
+
5bd Security Audit | t: QA, p: Growth
|
|
34
|
+
|
|
35
|
+
[Frontend] | t: Design
|
|
36
|
+
15bd Component Library | p: Foundation
|
|
37
|
+
10bd API Integration | t: Engineering, p: Growth
|
|
38
|
+
5bd Polish | p: Growth, 30%
|
|
39
|
+
|
|
40
|
+
[Marketing] | t: Marketing
|
|
41
|
+
10bd Landing Page | p: Growth
|
|
42
|
+
5bd Press Kit | p: Launch
|
|
43
|
+
-needs-> Landing Page
|
|
44
|
+
|
|
45
|
+
[Integration] | t: QA
|
|
46
|
+
10bd E2E Testing | p: Launch
|
|
47
|
+
-depends on-> Backend.Auth Module
|
|
48
|
+
// Final validation before release
|
|
49
|
+
0d Release Candidate | p: Launch
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
gantt Product Launch Plan
|
|
2
|
+
start 2024-01-15
|
|
3
|
+
today-marker 2024-03-01
|
|
4
|
+
critical-path
|
|
5
|
+
dependencies
|
|
6
|
+
|
|
7
|
+
tag Team alias t
|
|
8
|
+
Engineering(blue)
|
|
9
|
+
Design(purple)
|
|
10
|
+
QA(orange)
|
|
11
|
+
|
|
12
|
+
tag Phase alias p
|
|
13
|
+
Foundation(green)
|
|
14
|
+
Growth(orange)
|
|
15
|
+
|
|
16
|
+
era 2024-01-15 -> 2024-02-15 Investor Review
|
|
17
|
+
era 2024-03-10 -> 2024-03-14 GDC 2024 (purple)
|
|
18
|
+
marker 2024-02-26 Board Meeting
|
|
19
|
+
marker 2024-04-08 Trade Show Demo (orange)
|
|
20
|
+
|
|
21
|
+
// Independent task with offset — starts 8bd after project start
|
|
22
|
+
10bd Brand Guidelines | t: Design, p: Foundation, offset: 8bd
|
|
23
|
+
|
|
24
|
+
parallel
|
|
25
|
+
[Backend] | t: Engineering
|
|
26
|
+
30bd Database Layer | p: Foundation, 80%
|
|
27
|
+
10bd? Auth Module | p: Foundation, 100%
|
|
28
|
+
// Start frontend integration 5bd before Auth finishes (overlap)
|
|
29
|
+
-> Frontend.API Integration | offset: -5bd
|
|
30
|
+
parallel
|
|
31
|
+
5bd Load Testing | t: QA, p: Growth
|
|
32
|
+
5bd Security Audit | t: QA, p: Growth
|
|
33
|
+
|
|
34
|
+
[Frontend] | t: Design
|
|
35
|
+
15bd Component Library | p: Foundation
|
|
36
|
+
10bd API Integration | t: Engineering, p: Growth
|
|
37
|
+
5bd Polish | p: Growth, 30%
|
|
38
|
+
|
|
39
|
+
[Integration] | t: QA
|
|
40
|
+
10bd E2E Testing
|
|
41
|
+
// Final validation before release
|
|
42
|
+
0d Release Candidate
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
infra E-Commerce Platform — Full Infrastructure
|
|
2
|
+
|
|
3
|
+
tag Team alias t
|
|
4
|
+
Backend(blue)
|
|
5
|
+
Platform(teal)
|
|
6
|
+
Data(purple)
|
|
7
|
+
|
|
8
|
+
tag Tier alias r
|
|
9
|
+
Edge(green)
|
|
10
|
+
Core(blue)
|
|
11
|
+
Storage(orange)
|
|
12
|
+
|
|
13
|
+
edge
|
|
14
|
+
rps: 15000
|
|
15
|
+
-> CloudFront
|
|
16
|
+
|
|
17
|
+
CloudFront is a network | t: Platform, r: Edge
|
|
18
|
+
description: CDN — edge cache with 200+ PoPs
|
|
19
|
+
cache-hit: 85%
|
|
20
|
+
-> WAF
|
|
21
|
+
|
|
22
|
+
WAF is a gateway | t: Platform, r: Edge
|
|
23
|
+
description: Web Application Firewall — bot protection and rate limiting
|
|
24
|
+
firewall-block: 8%
|
|
25
|
+
-> ALB
|
|
26
|
+
|
|
27
|
+
ALB is a gateway | t: Platform, r: Core
|
|
28
|
+
-/api-> [API Tier] | split: 50%
|
|
29
|
+
-/shop-> [Commerce Tier] | split: 35%
|
|
30
|
+
-/static-> StaticBucket | split: 15%
|
|
31
|
+
|
|
32
|
+
[API Tier] | t: Backend, r: Core
|
|
33
|
+
APIServer is a service
|
|
34
|
+
description: Core REST API — auth, catalog, user profiles
|
|
35
|
+
instances: 4
|
|
36
|
+
max-rps: 800
|
|
37
|
+
latency-ms: 35
|
|
38
|
+
cb-error-threshold: 50%
|
|
39
|
+
-> Redis | fanout: 2
|
|
40
|
+
-> PostgreSQL
|
|
41
|
+
~order.placed~> EventBus
|
|
42
|
+
|
|
43
|
+
[Commerce Tier] | t: Backend, r: Core
|
|
44
|
+
CheckoutSvc is a service
|
|
45
|
+
description: Checkout and payment orchestration
|
|
46
|
+
instances: 2-10
|
|
47
|
+
max-rps: 400
|
|
48
|
+
latency-ms: 100
|
|
49
|
+
-> PaymentGW
|
|
50
|
+
-> PostgreSQL
|
|
51
|
+
~payment.confirmed~> EventBus
|
|
52
|
+
PaymentGW is a gateway
|
|
53
|
+
description: Stripe/Adyen payment gateway proxy
|
|
54
|
+
latency-ms: 250
|
|
55
|
+
|
|
56
|
+
Redis is a cache | t: Data, r: Storage
|
|
57
|
+
description: Session store and query cache
|
|
58
|
+
latency-ms: 2
|
|
59
|
+
|
|
60
|
+
PostgreSQL is a database | t: Data, r: Storage
|
|
61
|
+
description: Primary relational store — orders, users, catalog
|
|
62
|
+
latency-ms: 8
|
|
63
|
+
|
|
64
|
+
EventBus is a queue | t: Platform, r: Core
|
|
65
|
+
description: Async event backbone (Kafka)
|
|
66
|
+
~analytics~> ClickHouse
|
|
67
|
+
~notifications~> NotifySvc
|
|
68
|
+
|
|
69
|
+
ClickHouse is a database | t: Data, r: Storage
|
|
70
|
+
description: Analytics OLAP — real-time dashboards
|
|
71
|
+
|
|
72
|
+
NotifySvc is a service | t: Backend, r: Core
|
|
73
|
+
description: Email/SMS/push notification dispatcher
|
|
74
|
+
instances: 2
|
|
75
|
+
|
|
76
|
+
StaticBucket is a storage | t: Platform, r: Edge
|
|
77
|
+
description: S3 bucket — JS, CSS, images
|
|
78
|
+
latency-ms: 5
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
infra Microservice Overload Demo
|
|
2
|
+
direction-tb
|
|
3
|
+
|
|
4
|
+
edge
|
|
5
|
+
rps: 8000
|
|
6
|
+
-> Gateway
|
|
7
|
+
|
|
8
|
+
Gateway
|
|
9
|
+
ratelimit-rps: 5000
|
|
10
|
+
-> AuthProxy
|
|
11
|
+
|
|
12
|
+
AuthProxy
|
|
13
|
+
cache-hit: 60%
|
|
14
|
+
-> [Services]
|
|
15
|
+
|
|
16
|
+
[Services]
|
|
17
|
+
OrderAPI
|
|
18
|
+
instances: 2
|
|
19
|
+
max-rps: 400
|
|
20
|
+
latency-ms: 80
|
|
21
|
+
cb-error-threshold: 60%
|
|
22
|
+
PaymentAPI
|
|
23
|
+
instances: 1
|
|
24
|
+
max-rps: 200
|
|
25
|
+
latency-ms: 150
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
infra Production Traffic Flow
|
|
2
|
+
|
|
3
|
+
tag Team alias t
|
|
4
|
+
Backend(blue)
|
|
5
|
+
Platform(teal)
|
|
6
|
+
|
|
7
|
+
edge
|
|
8
|
+
rps: 10000
|
|
9
|
+
-> CloudFront
|
|
10
|
+
|
|
11
|
+
CloudFront is a network | t: Platform
|
|
12
|
+
description: CDN — edge cache for assets and API responses
|
|
13
|
+
cache-hit: 80%
|
|
14
|
+
-> CloudArmor
|
|
15
|
+
|
|
16
|
+
CloudArmor is a gateway | t: Platform
|
|
17
|
+
description: WAF — blocks bots and malicious traffic
|
|
18
|
+
firewall-block: 5%
|
|
19
|
+
-> ALB
|
|
20
|
+
|
|
21
|
+
ALB is a gateway | t: Platform
|
|
22
|
+
-/api-> [API Pods] | split: 60%
|
|
23
|
+
-/purchase-> [Commerce Pods] | split: 30%
|
|
24
|
+
-/static-> StaticServer | split: 10%
|
|
25
|
+
|
|
26
|
+
[API Pods]
|
|
27
|
+
APIServer is a service | t: Backend
|
|
28
|
+
description: Core REST API — auth, orders, user profiles
|
|
29
|
+
instances: 3
|
|
30
|
+
max-rps: 500
|
|
31
|
+
latency-ms: 45
|
|
32
|
+
cb-error-threshold: 50%
|
|
33
|
+
~events~> MessageQueue
|
|
34
|
+
|
|
35
|
+
[Commerce Pods]
|
|
36
|
+
PurchaseMS is a service
|
|
37
|
+
description: Checkout and payment processing
|
|
38
|
+
instances: 1-8
|
|
39
|
+
max-rps: 300
|
|
40
|
+
latency-ms: 120
|
|
41
|
+
|
|
42
|
+
MessageQueue is a queue | t: Platform
|
|
43
|
+
description: Async event bus for order notifications
|
|
44
|
+
|
|
45
|
+
StaticServer is a storage | t: Platform
|
|
46
|
+
description: Serves static assets (JS, CSS, images)
|
|
47
|
+
latency-ms: 5
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
initiative-status Platform Modernization — Full Status
|
|
2
|
+
|
|
3
|
+
tag Phase alias p
|
|
4
|
+
Discovery(green) default
|
|
5
|
+
Build(blue)
|
|
6
|
+
Launch(orange)
|
|
7
|
+
Maintenance(purple)
|
|
8
|
+
|
|
9
|
+
tag Team alias t
|
|
10
|
+
Frontend(blue)
|
|
11
|
+
Backend(green)
|
|
12
|
+
Platform(teal)
|
|
13
|
+
Data(purple)
|
|
14
|
+
|
|
15
|
+
[Identity] | t: Backend
|
|
16
|
+
Auth Service | done, p: Build
|
|
17
|
+
SSO Integration | doing, p: Build
|
|
18
|
+
-> Auth Service | done
|
|
19
|
+
MFA Rollout | blocked, p: Launch
|
|
20
|
+
-> SSO Integration | doing
|
|
21
|
+
|
|
22
|
+
[Payments] | t: Platform
|
|
23
|
+
Payment Gateway | doing, p: Build
|
|
24
|
+
Billing UI | todo, p: Build, t: Frontend
|
|
25
|
+
-> Payment Gateway | doing
|
|
26
|
+
Invoice API | todo, p: Launch
|
|
27
|
+
-> Payment Gateway | doing
|
|
28
|
+
-> Billing UI | todo
|
|
29
|
+
|
|
30
|
+
[Search] | t: Backend
|
|
31
|
+
Search API | done, p: Build
|
|
32
|
+
Search UI | doing, p: Build, t: Frontend
|
|
33
|
+
-> Search API | done
|
|
34
|
+
Search Analytics | na, p: Maintenance, t: Data
|
|
35
|
+
|
|
36
|
+
[Observability] | t: Platform
|
|
37
|
+
Metrics Pipeline | done, p: Discovery
|
|
38
|
+
Alert Rules | done, p: Build
|
|
39
|
+
-> Metrics Pipeline | done
|
|
40
|
+
Dashboard | doing, p: Build, t: Frontend
|
|
41
|
+
-> Metrics Pipeline | done
|
|
42
|
+
-> Alert Rules | done
|
|
43
|
+
|
|
44
|
+
Auth Service -> Payment Gateway: validates | done
|
|
45
|
+
SSO Integration -> Search API: provides identity | done
|
|
46
|
+
Metrics Pipeline -> Search API: monitors | done
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
initiative-status Platform Migration
|
|
2
|
+
|
|
3
|
+
tag Phase alias p
|
|
4
|
+
Discovery default
|
|
5
|
+
Build
|
|
6
|
+
Launch
|
|
7
|
+
|
|
8
|
+
tag Team alias t
|
|
9
|
+
Frontend
|
|
10
|
+
Backend
|
|
11
|
+
Platform
|
|
12
|
+
|
|
13
|
+
[Identity]
|
|
14
|
+
Auth Service | done, p: Discovery, t: Backend
|
|
15
|
+
SSO Integration | doing, p: Build, t: Backend
|
|
16
|
+
-> Auth Service | done
|
|
17
|
+
|
|
18
|
+
[Payments]
|
|
19
|
+
Payment Gateway | doing, p: Build, t: Platform
|
|
20
|
+
Billing UI | todo, p: Build, t: Frontend
|
|
21
|
+
-> Payment Gateway | doing
|
|
22
|
+
|
|
23
|
+
[Search]
|
|
24
|
+
Search API | todo, p: Launch, t: Backend
|
|
25
|
+
Search UI | todo, p: Launch, t: Frontend
|
|
26
|
+
-> Search API
|
|
27
|
+
|
|
28
|
+
Auth Service -> Payment Gateway: validates | done
|
|
29
|
+
SSO Integration -> Search API: provides identity | todo
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
line Daily Active Users (Q1 2025)
|
|
2
|
+
x-label Week
|
|
3
|
+
y-label Users (thousands)
|
|
4
|
+
|
|
5
|
+
era Week 1 -> Week 6 Phase 1 (blue)
|
|
6
|
+
era Week 6 -> Week 12 Phase 2 (green)
|
|
7
|
+
|
|
8
|
+
Week 1 12.4
|
|
9
|
+
Week 2 13.1
|
|
10
|
+
Week 3 14.8
|
|
11
|
+
Week 4 13.9
|
|
12
|
+
Week 5 16.2
|
|
13
|
+
Week 6 17.5
|
|
14
|
+
Week 7 18.1
|
|
15
|
+
Week 8 19.3
|
|
16
|
+
Week 9 21.0
|
|
17
|
+
Week 10 22.4
|
|
18
|
+
Week 11 24.1
|
|
19
|
+
Week 12 23.8
|