workspace {
model {
user = person "App user"
github = softwareSystem "Github"
stripe = softwareSystem "Stripe"
myApp = softwareSystem "my sample application" {
frontend = container "Frontend" "Frontend for taskworld" "React" {
loginPage = component "User management"
productsPage = component "Shopping module for products"
}
productApi = container "product api" "Microservice managing products" "Nest.js"{
listingModule = component "listingModule"
emailModule = component "email module"
authModule = component "auth module"
orderModule = component "order module"
paymentModule = component "payment module"
}
database = container "Database" "Database" "Mongo"
redis = container "Redis" "Pub-sub" "Redis"
}
# product display
user -> productsPage "Displays product list"
productsPage -> listingModule "Fetches product list"
listingModule -> database "Gets products"
# auth
loginPage -> authModule "Logs in"
authModule -> github "Authenticates user with github"
authModule -> database "Authenticates user"
# order
productsPage -> orderModule "Creates order"
orderModule -> emailModule "Sends notification"
orderModule -> paymentModule "Triggers payment"
paymentModule -> stripe "Processes payment"
paymentModule -> redis "Publish event on successful purchase"
}
views {
systemContext myApp {
include *
autolayout
}
container myApp productApi {
include *
autolayout
}
component productApi listingModule {
include *
autolayout
}
theme default
}
}