|
1 |
| -workspace { |
| 1 | +workspace "Architecture Diagrams for DSP" "This is a collection of diagrams for the DSP architecture" { |
| 2 | + # https://github.com/structurizr/dsl/blob/master/docs/language-reference.md |
| 3 | + # for an example, see https://structurizr.com/dsl?example=big-bank-plc |
2 | 4 |
|
| 5 | + |
| 6 | + |
| 7 | + # static model |
3 | 8 | model {
|
4 |
| - user = person "User" |
5 |
| - softwareSystem = softwareSystem "Software System" |
| 9 | + !include users.dsl |
| 10 | + |
| 11 | + enterprise "DSP - DaSCH Service Platform" { |
| 12 | + # softwareSystem <name> [description] [tags] |
| 13 | + dspJsLib = softwaresystem "JS-LIB" "Layer between DSP-API and DSP-APP" |
| 14 | + dspApp = softwaresystem "DSP-APP" "admin.dasch.swiss" |
| 15 | + dspTools = softwaresystem "DSP-TOOLS" "CLI for DSP-API" |
| 16 | + fuseki = softwaresystem "Fuseki Triplestore" "RDF database" "Database" |
| 17 | + sipi = softwaresystem "SIPI" "IIIF image server" |
| 18 | + arkResolver = softwaresystem "ARK Resolver" "Forwards ARK URLs to DSP-APP URLs" |
| 19 | + dspApi = softwareSystem "DSP-API" "api.dasch.swiss" { |
| 20 | + # container <name> [description] [technology] [tags] |
| 21 | + |
| 22 | + eventStoreService = container "Event Store Service" |
| 23 | + eventListener = container "Event Listener" |
| 24 | + triplestoreService = container "Triplestore Service" |
| 25 | + arkService = container "ARK Service" |
| 26 | + elasticSearchService = container "Elastic Search Service" |
| 27 | + |
| 28 | + sharedProject = container "Shared Project" "The project that handles shared entities" { |
| 29 | + valueObjectsPackage = component "ValueObjects Package" "The package that provides value objects" |
| 30 | + errorPackage = component "Error Package" "The package that provides errors" |
| 31 | + } |
| 32 | + |
| 33 | + webapiProject = container "Webapi" "The project that wraps webapi V2" |
| 34 | + |
| 35 | + projectSlice = container "Project Slice" "The slice that handles projects" |
| 36 | + roleSlice = container "Role Slice" "The slice that handles roles" |
| 37 | + schemaSlice = container "Schema Slice" "The slice that handles schemas" |
| 38 | + resourceSlice = container "Resource Slice" "The slice that handles resources" |
| 39 | + listSlice = container "List Slice" "The slice that handles lists" |
| 40 | + routes = container "Routes" "The slice that provides all routes" |
| 41 | + |
| 42 | + userSlice = container "User Slice" "The slice that handles users" { |
| 43 | + userCore = component "User Core" |
| 44 | + userDomain = component "User Domain" |
| 45 | + userHandler = component "User Handler" |
| 46 | + |
| 47 | + userRepo = component "User Repo (API)" |
| 48 | + userRepoLive = component "User Repo Live (Implementation)" |
| 49 | + userRepoMock = component "User Repo Mock (Implementation for Tests)" |
| 50 | + |
| 51 | + userRoute = component "User Route" |
| 52 | + } |
| 53 | + |
| 54 | + } |
| 55 | + } |
| 56 | + |
| 57 | + # relationships between users and software systems |
| 58 | + user -> dspApp "Uses [Browser]" |
| 59 | + user -> arkResolver "Uses [Browser]" |
| 60 | + user -> dspTools "Uses [CLI]" |
| 61 | + |
| 62 | + # relationships to/from software systems |
| 63 | + dspApp -> dspJsLib |
| 64 | + dspJsLib -> dspApi |
| 65 | + dspTools -> dspApi |
| 66 | + dspApi -> fuseki |
| 67 | + dspApi -> sipi |
| 68 | + dspTools -> sipi |
| 69 | + |
| 70 | + # relationships to/from containers |
| 71 | + webapiProject -> sharedProject "depends on" |
| 72 | + projectSlice -> sharedProject "depends on" |
| 73 | + roleSlice -> sharedProject "depends on" |
| 74 | + schemaSlice -> sharedProject "depends on" |
| 75 | + resourceSlice -> sharedProject "depends on" |
| 76 | + listSlice -> sharedProject "depends on" |
| 77 | + routes -> sharedProject "depends on" |
| 78 | + userSlice -> sharedProject "depends on" |
| 79 | + |
| 80 | + # relationships to/from components |
| 81 | + userRepo -> userCore "depends on" |
| 82 | + userRepoLive -> userCore "depends on" |
| 83 | + userRepoMock -> userCore "depends on" |
| 84 | + userRoute -> userCore "depends on" |
| 85 | + |
| 86 | + userRepoLive -> userRepo "implements" |
| 87 | + userRepoMock -> userRepo "implements" |
| 88 | + |
| 89 | + userCore -> userDomain "contains" |
| 90 | + userCore -> userHandler "contains" |
6 | 91 |
|
7 |
| - user -> softwareSystem "Uses" |
8 | 92 | }
|
9 | 93 |
|
10 | 94 | views {
|
11 |
| - systemContext softwareSystem "Diagram1" { |
| 95 | + systemlandscape "SystemLandscape" "System Landscape of DSP-API" { |
| 96 | + include * |
| 97 | + autoLayout |
| 98 | + } |
| 99 | + |
| 100 | + # systemContext <software system identifier> [key] [description] |
| 101 | + systemContext dspApi "SystemContextDspApi" "DSP-API System Context" { |
| 102 | + include * |
| 103 | + autoLayout |
| 104 | + } |
| 105 | + |
| 106 | + # container <software system identifier> [key] [description] |
| 107 | + container dspApi "ContainerDspApi" "Containers of DSP-API" { |
| 108 | + include * |
| 109 | + autoLayout |
| 110 | + } |
| 111 | + |
| 112 | + # component <container identifier> [key] [description] |
| 113 | + component userSlice "ComponentsOfUserSlice" "Components of the User Slice" { |
| 114 | + include * |
| 115 | + |
| 116 | + } |
| 117 | + |
| 118 | + component SharedProject "ComponentsOfSharedProject" "Components of the Shared Project" { |
12 | 119 | include *
|
13 | 120 | autoLayout
|
14 | 121 | }
|
15 | 122 |
|
| 123 | + # dynamic <*|software system identifier|container identifier> [key] [description] |
| 124 | + dynamic userSlice "HttpRequestWithEventsCreateUser" "Example workflow for a HTTP request with events (create user)" { |
| 125 | + user -> userRoute "sends HTTP request to" |
| 126 | + userRoute -> userRoute "validates input and creates value objects" |
| 127 | + userRoute -> userHandler "createUser(vo)" |
| 128 | + userHandler -> userRepo "reserve username" |
| 129 | + userRepo -> eventStoreService "reserve username" |
| 130 | + eventStoreService -> eventStoreService "check if username exists" |
| 131 | + eventStoreService -> eventStoreService "reserve username" |
| 132 | + userHandler -> userDomain ".make(vo)" |
| 133 | + userDomain -> userDomain "create user domain entity + userCreatedEvent(who, what)" |
| 134 | + userDomain -> userHandler "return (userDomainEntity + userCreatedEvent)" |
| 135 | + userHandler -> userRepo "storeUser(userDomainEntity + userCreatedEvent)" |
| 136 | + userRepo -> eventStoreService "storeUser(userDomainEntity + userCreatedEvent)" |
| 137 | + eventStoreService -> eventStoreService "store event(s), userCreatedEvent(who, what, when(!))" |
| 138 | + eventStoreService -> eventListener "publishEvent(userCreatedEvent)" |
| 139 | + eventListener -> triplestoreService "writeToTsService(E)" |
| 140 | + triplestoreService -> triplestoreService "SPARQL Update" |
| 141 | + eventListener -> arkService "writeToArkService(E)" |
| 142 | + arkService -> arkService "create ARK(URL)" |
| 143 | + eventListener -> elasticSearchService "writeToEsService(E)" |
| 144 | + |
| 145 | + } |
| 146 | + |
| 147 | + dynamic userSlice "HttpRequestWithEventsUpdateUser" "Example workflow for a HTTP request with events (update username)" { |
| 148 | + user -> userRoute "sends HTTP request to" |
| 149 | + userRoute -> userRoute "validates input and creates value objects" |
| 150 | + userRoute -> userHandler "updateUsername(vo)" |
| 151 | + userHandler -> userRepo "getUser(userId)" |
| 152 | + userRepo -> eventStoreService "getUser(userId)" |
| 153 | + eventStoreService -> eventStoreService "get all events for this user" |
| 154 | + eventStoreService -> userDomain "createUserFromEvents(E,E,E,...)" |
| 155 | + userDomain -> userHandler "return User" |
| 156 | + userHandler -> userDomain "updateUsername(vo)" |
| 157 | + userDomain -> userDomain "updateUser(userDomainEntity + userUpdatedEvent(who, what))" |
| 158 | + userDomain -> userHandler "return userDomainEntity + userUpdatedEvent(who, what)" |
| 159 | + userHandler -> userRepo "storeUser(userDomainEntity + userUpdatedEvent(who, what, when(!))" |
| 160 | + |
| 161 | + userRepo -> eventStoreService "storeUser(userDomainEntity + userCreatedEvent)" |
| 162 | + eventStoreService -> eventStoreService "store event(s), userCreatedEvent(who, what, when(!))" |
| 163 | + eventStoreService -> eventListener "publishEvent(userCreatedEvent)" |
| 164 | + eventListener -> triplestoreService "writeToTsService(E)" |
| 165 | + triplestoreService -> triplestoreService "SPARQL Update" |
| 166 | + eventListener -> arkService "writeToArkService(E)" |
| 167 | + arkService -> arkService "create ARK(URL)" |
| 168 | + eventListener -> elasticSearchService "writeToEsService(E)" |
| 169 | + |
| 170 | + autoLayout |
| 171 | + } |
| 172 | + |
16 | 173 | theme default
|
17 | 174 | }
|
18 | 175 |
|
19 | 176 | !adrs decisions
|
20 |
| - !docs flows |
| 177 | + !docs docs |
21 | 178 | }
|
0 commit comments