-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathworkspace.dsl
More file actions
296 lines (232 loc) · 13.9 KB
/
workspace.dsl
File metadata and controls
296 lines (232 loc) · 13.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
workspace "Applications service" {
!docs architecture
model {
# Required for nested groups - https://docs.structurizr.com/dsl/cookbook/groups/
properties {
"structurizr.groupSeparator" "/"
}
userPublicIndividual = person "Private individual" "Member of public interested in nationally significant infrastructure projects"
userMemberOfOrg = person "Member of organisation" "Member of an organisation interested in nationally significant infrastructure projects"
userAgent = person "Agent" "Represent a private individual family or organisation"
group "Planning Inspectorate"{
userCaseWorker = person "Case worker" "Member of PINS staff who administers project information"
systemAppsFo = softwareSystem "Applications Front-Office" "External facing service providing ability to participate in the application process for Nationally Significant Infrastructure Projects (NSIPs) within England and Wales" "Node.js, Azure Web App, Azure Function App" {
containerFoWeb = container "FO Web" "Front-end website" "Node.js, Azure Web App"{
tags "Microsoft Azure - App Services"
}
containerFoApi = container "Web FO API" "Front Office API handles all interactions with other services" "Node.js, Azure Web App" {
tags "Microsoft Azure - App Services"
}
containerRedis = container "Redis" "Session storage" {
tags "Microsoft Azure - Cache Redis"
}
containerAzureSql = container "Database" "Local projection of data from Back-Office" "Azure SQL" {
tags "Database" "Microsoft Azure - Azure SQL"
}
group "Function Apps" {
containerFunctionAppAdvice = container "Advice" "Consumes Advice messages from Service Bus" "Function App, JavaScript"{
tags "Microsoft Azure - Function Apps", "FunctionApp"
}
containerFunctionAppAdviceUnpublish = container "Advice Unpublish" "Consumes Advice unpublish messages from Service Bus" "Function App, JavaScript"{
tags "Microsoft Azure - Function Apps", "FunctionApp"
}
containerFunctionAppDocumentMetadata = container "Document Metadata" "Consumes Document Metadata messages from Service Bus" "Function App, JavaScript"{
tags "Microsoft Azure - Function Apps", "FunctionApp"
}
containerFunctionAppDocumentMetadataUnpublish = container "Document Metadata Unpublish" "Consumes Document Metadata Unpublish messages from Service Bus" "Function App, JavaScript"{
tags "Microsoft Azure - Function Apps", "FunctionApp"
}
containerFunctionAppExamTimeTable = container "Exam Time Table" "Consumes ExamTimeTable messages from Service Bus" "Function App, JavaScript"{
tags "Microsoft Azure - Function Apps", "FunctionApp"
}
containerFunctionAppExamTimeTableUnpublish = container "Exam Time Table Unpublish" "Consumes ExamTimeTable Unpublish messages from Service Bus" "Function App, JavaScript"{
tags "Microsoft Azure - Function Apps", "FunctionApp"
}
containerFunctionAppProjects = container "Projects" "Consumes Project messages from Service Bus" "Function App, JavaScript"{
tags "Microsoft Azure - Function Apps", "FunctionApp"
}
containerFunctionAppProjectsUnpublish = container "Projects Unpublish" "Consumes Project Unpublish messages from Service Bus" "Function App, JavaScript"{
tags "Microsoft Azure - Function Apps", "FunctionApp"
}
containerFunctionAppProjectUpdates = container "Project Updates" "Consumes Project Update messages from Service Bus" "Function App, JavaScript"{
tags "Microsoft Azure - Function Apps", "FunctionApp"
}
containerFunctionAppRepresentations = container "Representations" "Consumes Representation messages from Service Bus" "Function App, JavaScript"{
tags "Microsoft Azure - Function Apps", "FunctionApp"
}
containerFunctionAppRepresentationUpdate = container "Representation Update" "Consumes Representation Update messages from Service Bus" "Function App, JavaScript"{
tags "Microsoft Azure - Function Apps", "FunctionApp"
}
containerFunctionAppRepresentationsUnpublish = container "Representations Unpublish" "Consumes Representation Unpublish messages from Service Bus" "Function App, JavaScript"{
tags "Microsoft Azure - Function Apps", "FunctionApp"
}
containerFunctionAppServiceUsers = container "Service Users" "Consumes Service User (Represented or Representative) messages from Service Bus" "Function App, JavaScript"{
tags "Microsoft Azure - Function Apps", "FunctionApp"
}
containerFunctionAppServiceUsersUnpublish = container "Service Users Unpublish" "Consumes Service User Unpublish messages from Service Bus" "Function App, JavaScript"{
tags "Microsoft Azure - Function Apps", "FunctionApp"
}
}
containerFoKeyVault = container "Key Vault" "Hold secrets and sensitive data" "Azure Key Vault"{
tags "Microsoft Azure - Key Vaults"
}
}
systemAppsBo = softwareSystem "Applications Back-Office" "Internally facing service allowing for management of cases relating to Nationally Significant Infrastructure Projects (NSIPs) within England and Wales" {
tags "InternalCollaboratorSystem"
containerBoFileStorage = container "File storage" {
tags "Microsoft Azure - Blob Storage"
}
containerBoWeb = container "BO Web" "Back-office website used to manage cases" "Node.js, Azure Web App"{
tags "Microsoft Azure - App Services"
}
containerBoApi = container "Web BO API" "" "Node.js, Azure Web App" {
tags "Microsoft Azure - App Services"
}
containerBoAzureSql = container "Database" "Source of truth for cases" "Azure SQL" {
tags "Database" "Microsoft Azure - Azure SQL"
}
}
systemOdw = softwareSystem "Operational Data Warehouse (ODW)" "Holds all Planning Inspectorate data so that it can be used for internal purposes" {
tags "Microsoft Azure - Azure Synapse Analytics" "InternalCollaboratorSystem"
}
group "Legacy"{
systemHorizon = softwareSystem "Horizon" "Legacy back office system for managing planning applications and appeals"{
tags "LegacySystem"
}
systemNiDatabase = softwareSystem "NI Database" "Persistant storage for legacy NI website content" "MySQL" {
tags "LegacySystem" "Database"
}
}
}
systemGovUk = softwareSystem "GOV.UK"{
tags "ExternalSystem"
containerGovNotify = container "GOV Notify" "UK government messaging platform for sending emails, text and letters to users"
}
##################################################################################
# Releationships
userPublicIndividual -> containerFoWeb "Finds projects, registers for interest, and makes submissions", "HTTPS, HTML"
userMemberOfOrg -> containerFoWeb "Finds projects, registers for interest, and makes submissions", "HTTPS, HTML"
userAgent -> containerFoWeb "Finds projects, registers for interest, and makes submissions", "HTTPS, HTML"
userCaseWorker -> systemAppsBo "Manages cases through" "HTTPS, HTML, Active Directory Auth"
# Back-office
systemAppsBo -> systemOdw "Broadcasts message when entities change" "Azure Service Bus via topic subscriptions" "ServiceBus"
containerBoWeb -> containerBoApi "Renders page, gets and posts data using" "HTTPS, JSON"
containerBoApi -> containerBoAzureSql "Reads and writes case data to"
systemAppsBo -> systemAppsFo "Broadcasts message when entities change" "Azure Service Bus via topic subscriptions" "ServiceBus"
containerBoApi -> containerFunctionAppAdvice "Broadcasts message on Advice changes" "Azure Service via topic s51-advice" "ServiceBus"
containerBoApi -> containerFunctionAppAdviceUnpublish "Broadcasts message on Advice Unpublish changes" "Azure Service via topic s51-advice" "ServiceBus"
containerBoApi -> containerFunctionAppDocumentMetadata "Broadcasts message on Document Metadata changes" "Azure Service via topic nsip-document" "ServiceBus"
containerBoApi -> containerFunctionAppDocumentMetadataUnpublish "Broadcasts message on Document Metadata Unpublish changes" "Azure Service via topic nsip-document" "ServiceBus"
containerBoApi -> containerFunctionAppExamTimeTable "Broadcasts message on Exam Time Table changes" "Azure Service via topic nsip-exam-timetable" "ServiceBus"
containerBoApi -> containerFunctionAppExamTimeTableUnpublish "Broadcasts message on Exam Time Table Unpublish changes" "Azure Service via topic nsip-exam-timetable" "ServiceBus"
containerBoApi -> containerFunctionAppProjects "Broadcasts message on Project changes" "Azure Service via topic nsip-project" "ServiceBus"
containerBoApi -> containerFunctionAppProjectsUnpublish "Broadcasts message on Project Unpublish changes" "Azure Service via topic nsip-project" "ServiceBus"
containerBoApi -> containerFunctionAppProjectUpdates "Broadcasts message on Project Update changes" "Azure Service via topic nsip-project-update" "ServiceBus"
containerBoApi -> containerFunctionAppRepresentations "Broadcasts message on Representation changes" "Azure Service via topic nsip-representation" "ServiceBus"
containerBoApi -> containerFunctionAppRepresentationUpdate "Broadcasts message on Representation Update changes" "Azure Service via topic nsip-representation" "ServiceBus"
containerBoApi -> containerFunctionAppRepresentationsUnpublish "Broadcasts message on Representation Unpublish changes" "Azure Service via topic nsip-representation" "ServiceBus"
containerBoApi -> containerFunctionAppServiceUsers "Broadcasts message on Service User changes" "Azure Service via topic nsip-service-user" "ServiceBus"
containerBoApi -> containerFunctionAppServiceUsersUnpublish "Broadcasts message on Service User Unpublish changes" "Azure Service via topic nsip-service-user" "ServiceBus"
# Front-office
containerFunctionAppAdvice -> containerAzureSql "Consumes message body to Advice table"
containerFunctionAppAdviceUnpublish -> containerAzureSql "Deletes from Advice table"
containerFunctionAppDocumentMetadata -> containerAzureSql "Consumes message body to Document Metadata table"
containerFunctionAppDocumentMetadataUnpublish -> containerAzureSql "Deletes from Document Metadata table"
containerFunctionAppExamTimeTable -> containerAzureSql "Consumes message body to Exam Time Table table"
containerFunctionAppExamTimeTableUnpublish -> containerAzureSql "Deletes from Exam Time Table table"
containerFunctionAppProjects -> containerAzureSql "Consumes message body to Project table"
containerFunctionAppProjectsUnpublish -> containerAzureSql "Deletes from Project table"
containerFunctionAppProjectUpdates -> containerAzureSql "Consumes message body to Project Update table"
containerFunctionAppRepresentations -> containerAzureSql "Consumes message body to Representation table"
containerFunctionAppRepresentationUpdate -> containerAzureSql "Consumes message body to Representation Update table"
containerFunctionAppRepresentationsUnpublish -> containerAzureSql "Deletes from Representation table"
containerFunctionAppServiceUsers -> containerAzureSql "Consumes message body to Service User table"
containerFunctionAppServiceUsersUnpublish -> containerAzureSql "Deletes from Service User table"
containerFoWeb -> containerRedis "Maintains session state and caches data from"
containerFoWeb -> containerFoKeyVault "Retrieves secrets from"
containerFoWeb -> containerFoApi "renders pages, gets and posts data using" "HTTPS, JSON"
containerFoApi -> containerAzureSql "Read only access to"
containerFoApi -> containerGovNotify "Sends notification emails through" "HTTPS, JSON"
containerFoApi -> systemNiDatabase "Reads and writes legacy case data from", "TCP, SQL"
containerFoApi -> containerFoKeyVault "Retrieves secrets from"
containerFoApi -> containerBoFileStorage "Sends file for submission" "HTTPS"
containerBoFileStorage -> containerFoApi "Reads published documents files"
# Misc
systemNiDatabase -> systemHorizon "Extracts project data including documents and interested party comments (representations)"
##################################################################################
# Deployment environments
# https://docs.structurizr.com/dsl/cookbook/deployment-groups/
}
views {
properties {
"structurizr.sort" "created"
}
# System Landscape
systemLandscape "SystemLandscape" {
include *
autoLayout lr
title "System Landscape"
}
# Front Office
systemContext systemAppsFo "ApplicationsFOContext" {
include *
autoLayout lr
title "Applications Front-Office Context"
}
container systemAppsFo "ApplicationsFOContainer" {
include *
exclude element.tag==FunctionApp
autoLayout lr
title "Applications Front-Office Container"
description "Shows the containers within the Applications Front-Office system. Go to the next view to see the rest."
}
container systemAppsFo "ApplicationsFOFunctionApps" {
include element.tag==FunctionApp
include containerAzureSql
include containerBoApi
autoLayout tb
title "Applications Front-Office Function Apps"
description "Shows the function apps within the Applications Front-Office system - these are responsible for consuming messages from the Service Bus and updating the Azure SQL database."
}
# Back Office
systemContext systemAppsBo "ApplicationsBOContext" {
include *
autoLayout lr
title "Applications Back-Office Context"
}
container systemAppsBo "ApplicationsBOContainer" {
include *
autoLayout lr
title "Applications Back-Office Container"
}
# Operational Data Warehouse
systemContext systemOdw "OperationalDataWarehouseContext" {
include *
autoLayout lr
title "Operational Data Warehouse Context"
}
# Azure icons only
theme default
theme https://static.structurizr.com/themes/microsoft-azure-2023.01.24/icons.json
styles {
element Database {
shape Cylinder
}
element "Person" {
shape Person
}
element ExternalSystem {
background #AAAAAA
}
element LegacySystem {
background #CCCCCC
}
element InternalCollaboratorSystem {
background #888888
}
relationship ServiceBus {
style dotted
}
}
}
}