Skip to content

Commit

Permalink
docs: add structurizr diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
vincenzo.corso committed Nov 26, 2023
1 parent 041e0c6 commit 9aec009
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,9 @@ services:
- vehicle-service
volumes:
- ./scripts/nginx-gateway.conf:/etc/nginx/nginx.conf

structurizr:
image: structurizr/lite:3193
restart: unless-stopped
ports:
- "8080:8080"
112 changes: 112 additions & 0 deletions docs/structurizr-diagram.dsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
workspace {
!identifiers hierarchical

model {
// Actors
customer = person "Customer"

// System
system = softwareSystem "Car Sharing System" {
// Frontend
group "Frontend" {
mobileApp = container "Mobile App" "Flutter" "Mobile"
}

group "Backend" {
// Gateway
apiGateway = container "API Gateway"
mobileApp -> apiGateway "Redirect requests to" "JSON/HTTPS"

// Kafka
kafka = container "Kafka"

// Customer Service
customerService = container "Customer Service" {
technology "Quarkus"
}
customerServiceDb = container "Customer Service DB" {
technology "MongoDB"
}
apiGateway -> customerService "A" "JSON/HTTPS"
customerService -> customerServiceDb "Reads from and writes to"
kafka -> customerService "Publish event to"

// Rent Service
rentService = container "Rent Service" {
technology "Spring"
}
rentServiceDb = container "Rent Service DB" {
technology "Postgres"
}
apiGateway -> rentService "A" "JSON/HTTPS"
rentService -> rentServiceDb "Reads from and writes to" "SQL/TCP"
kafka -> rentService "Publish event to"

// Rent Orchestrator Service
rentOrchestratorService = container "Rent Orchestrator Service" {
technology "Quarkus"
}
rentOrchestratorServiceDb = container "Rent Orchestrator Service DB" {
technology "Postgres"
}
apiGateway -> rentOrchestratorService "A" "JSON/HTTPS"
rentOrchestratorService -> rentOrchestratorServiceDb "Reads from and writes to" "SQL/TCP"
kafka -> rentOrchestratorService "Publish event to"

// Vehicle Service
vehicleService = container "Vehicle Service" {
technology "Quarkus"
}
vehicleServiceDb = container "Vehicle Service DB" {
technology "MongoDB"
}
apiGateway -> vehicleService "A" "JSON/HTTPS"
vehicleService -> vehicleServiceDb "Reads from and writes to"
kafka -> vehicleService "Publish event to"

// Payment Service
paymentService = container "Payment Service" {
technology "Quarkus"
}
paymentServiceDb = container "Payment Service DB" {
technology "Postgres"
}
apiGateway -> paymentService "A" "JSON/HTTPS"
paymentService -> paymentServiceDb "Reads from and writes to" "SQL/TCP"
kafka -> paymentService "Publish event to"

// Notification Service
notificationService = container "Notification Service" {
technology "Quarkus"
}
notificationServiceDb = container "Notification Service DB" {
technology "Postgres"
}
notificationService -> notificationServiceDb "Reads from and writes to" "SQL/TCP"
kafka -> notificationService "Listen events from"
}
}

customer -> system.mobileApp "Uses"
}

views {
mainView = systemContext system "MainView" {
include *
autolayout lr
}

highLevelView = container system "HighLevelView" {
include *
autolayout lr
}

theme default

styles {
element "Mobile" {
shape MobileDevicePortrait
}
}
}
}

0 comments on commit 9aec009

Please sign in to comment.