Skip to content

Commit fc89ac6

Browse files
committed
Add D2 architecture diagram
1 parent 03ed1d8 commit fc89ac6

File tree

1 file changed

+122
-0
lines changed

1 file changed

+122
-0
lines changed

docs/architecture.d2

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
direction: up
2+
3+
legend: "Legend" {
4+
user: "User" {
5+
shape: "person"
6+
}
7+
8+
compute: "Compute" {
9+
shape: "queue"
10+
}
11+
12+
storage: "Storage" {
13+
shape: "cylinder"
14+
}
15+
16+
service: "Service" {
17+
shape: "cloud"
18+
}
19+
20+
repository: "Source\nRepository" {
21+
shape: "package"
22+
}
23+
}
24+
25+
visitor: "Visitor" {
26+
shape: "person"
27+
}
28+
29+
api-user: "API User" {
30+
shape: "person"
31+
}
32+
33+
submitter: "Contributor" {
34+
shape: "person"
35+
}
36+
37+
cf: Cloudflare {
38+
cdn: "CDN" {
39+
shape: "cloud"
40+
}
41+
42+
db: "SQLite DB" {
43+
shape: "cylinder"
44+
}
45+
46+
client-worker: "Client\nWorker" {
47+
shape: "queue"
48+
}
49+
50+
files-worker: "Files\nWorker" {
51+
shape: "queue"
52+
}
53+
54+
api-worker: "API\nWorker" {
55+
shape: "queue"
56+
}
57+
58+
submission-worker: "Artifact\nSubmission\nWorker" {
59+
shape: "queue"
60+
}
61+
62+
db-backup-worker: "DB\nBackup\nWorker" {
63+
shape: "queue"
64+
}
65+
66+
db-backup-bucket: "DB\nBackup\nBucket" {
67+
shape: "cylinder"
68+
}
69+
70+
files-bucket: "Files\nBucket" {
71+
shape: "cylinder"
72+
}
73+
}
74+
75+
gh: GitHub {
76+
site-repo: "Static\nSite\nRepo" {
77+
shape: "package"
78+
}
79+
80+
submission-repo: "Artifact\nSubmission\nRepo" {
81+
shape: "package"
82+
}
83+
84+
hugo-repo: "Hugo\nArtifact\nRepo" {
85+
shape: "package"
86+
}
87+
88+
submit-action: "Artifact\nSubmission\nAction" {
89+
shape: "queue"
90+
}
91+
92+
hugo-action: "Hugo\nArtifact\nAction" {
93+
shape: "queue"
94+
}
95+
}
96+
97+
visitor -> cf.client-worker: "Visit https://acearchive.lgbt"
98+
visitor -> cf.files-worker: "Download a file"
99+
100+
cf.client-worker -> cf.cdn: "Request static assets"
101+
102+
cf.files-worker -> cf.db: "Query file metadata"
103+
cf.files-worker -> cf.files-bucket: "Fetch file"
104+
105+
api-user -> cf.api-worker: "Call API"
106+
cf.api-worker -> cf.db: "Query artifact metadata"
107+
108+
cf.db-backup-worker -> cf.db: "Dump database"
109+
cf.db-backup-worker -> cf.db-backup-bucket: "Store backup"
110+
cf.db-backup-worker -> cf.db-backup-worker: "Cron trigger"
111+
112+
gh.submit-action -> cf.submission-worker: "Upload artifact metadata"
113+
cf.submission-worker -> cf.db: "Store artifact metadata"
114+
gh.submit-action -> cf.files-bucket: "Upload artifact files"
115+
116+
submitter -> gh.submission-repo: "Submit artifact"
117+
gh.submission-repo -> gh.submit-action: "Trigger artifact submission"
118+
gh.submission-repo -> gh.hugo-action: "Trigger site rebuild"
119+
gh.hugo-action -> gh.hugo-repo: "Generate static assets"
120+
gh.hugo-action -> cf.api-worker: "Fetch artifact metadata"
121+
gh.site-repo -> gh.hugo-repo: "Load generated assets"
122+
gh.site-repo -> cf.cdn: "Deploy static site"

0 commit comments

Comments
 (0)