Skip to content

Commit

Permalink
#165 Add first cut of architecture diagram
Browse files Browse the repository at this point in the history
This is not proper C4 just yet as is using the abstractions incorrectly, but is a reasonable first cut.
  • Loading branch information
chadlwilson committed Jun 28, 2022
1 parent 30f0757 commit 627c8b3
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ Thumbs.db
# Batect
.batect/
gh-md-toc

# Structurizr
docs/workspace.json
docs/.structurizr
14 changes: 14 additions & 0 deletions batect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ containers:
- local: <{batect.project_directory}/examples
container: /examples
options: cached
recce-docs:
image: structurizr/lite
ports:
- local: 8081
container: 8080
volumes:
- local: <{batect.project_directory}/docs
container: /usr/local/structurizr
options: cached
tasks:
clean:
description: Cleans the Gradle build
Expand Down Expand Up @@ -128,3 +137,8 @@ tasks:
- migrate-* # Run any migrate tasks included for the configured scenario against any included source/target DBs
run:
container: recce-dependencies
docs:
description: Render architecture documentation
group: recce
run:
container: recce-docs
73 changes: 73 additions & 0 deletions docs/workspace.dsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
workspace {

model {
dev = person "Developer" "Dev wanting to reconcile datasources"

sourceDb = softwareSystem "Source SQL DB" "Source SQL DB" "ExtDatabase"
targetDb = softwareSystem "Target SQL DB" "Target SQL DB" "ExtDatabase"

recceConfig = softwareSystem "Dataset Configurations" "YAML & SQL Dataset Configurations" "Files"
recceDb = softwareSystem "Recce DB" "Recce PostgreSQL DB" "Database"
recceServer = softwareSystem "Recce Server" "Recce Server" {

server = container "Server" {
api = component "API"
recRunner = component "Rec Run Service"

api -> recRunner "Trigger"
}

-> recceConfig "Load pre-configured dataset query configuration"
-> recceDb "Persist dataset row hashes"
-> recceDb "Compute reconciliation result summary"
-> sourceDb "Load dataset(s) from source"
-> targetDb "Load dataset(s) from target"

}

dev -> recceConfig "Configures source & target DB dataset queries"
dev -> recceServer "Triggers reconciliations adhoc via API"
recceServer -> dev "Reconciliation result summary"
recceServer -> recceServer "Triggers scheduled reconciliations"
}

views {
systemContext recceServer "SystemContext" {
include *
autoLayout
}

container recceServer "ContainerView" {
include *
autoLayout
}

component server "ComponentView" {
include *
autoLayout
}

styles {
element "Software System" {
background #1168bd
color #ffffff
}
element "Person" {
shape person
background #08427b
color #ffffff
}
element "Database" {
shape Cylinder
}
element "ExtDatabase" {
shape Cylinder
background #5dbb63
}
element "Files" {
shape Folder
}
}
}

}

0 comments on commit 627c8b3

Please sign in to comment.