!const COMPANY_NAME "Černý Rytíř" !const COMPANY_ABBR "CR" workspace { name "${COMPANY_NAME} B2B" description "Business-to-business eshop interface for ${COMPANY_NAME}." !identifiers hierarchical model { userAdmin = person "Administrator" "A store emplyee managing with management access." userCustomer = person "Customer" "An online " userCompany = person "Business" "A customer representing an approved business parter." userAutomation = person "Automation" { description "Internal periodic jobs and automation." tags "Automation" } # Completely external systems cardmarket = softwareSystem "cardmarket.com" { description "Europe's largest online marketplace for buying and selling TCGs." tags "Existing System" } # Internal systems out-of-scope legacy = softwareSystem "${COMPANY_NAME} Legacy Eshop" { description "Legacy eshop system. Creates new user accounts and orders." tags "Existing System" db = container "Legacy Eshop Database" { description "A core persistent structured data storage for all current operations." tags "Database" tags "logo-mysql" technology "MySQL" } eshop = container "Legacy Eshop Website" { description "A currently used but outdated eshop solution. Handles new registrations, customer orders and mailing." tags "Web Browser" technology "PHP" this -> db "Reads from, Writes to" "TCP" } } mqtt = softwareSystem "${COMPANY_NAME} MQTT" { description "Allows sending messages between multiple systems interested in live changes to the store and its data." tags "logo-mqtt" broker = container "MQTT Broker" { description "" tags "logo-mqtt" technology "Mosquitto" } } manager = softwareSystem "${COMPANY_NAME} Manager" { description "Acts as a middle-man interface between all systems. Synchronises products, orders, warehouse etc." tags "Existing System" db = container "Manager Database" { description "Provides persistent structured data storage for the new and improved data schema of the eshop system." tags "Database" tags "logo-postgresql" technology "PostgreSQL" } api = container "Manager API" { description "Solution-wide authority for legacy database modifications and integrations of other systems." technology "Java" this -> db "Uses" "TCP, postgresql" this -> legacy.db "Synchronizes to/from" "TCP" this -> cardmarket "Synchronizes to" "HTTPS" this -> mqtt.broker "Sends and receives messages regarding to external system changes" "MQTT" } web = container "Manager Frontend" { description "Administration web interface for full store management (products, stocks, orders, users, etc.)" tags "Web Browser" technology "Vue.js" this -> api "Uses" "HTTPS" userAdmin -> this "Configures product stocks, fulfills orders, manages users" } this -> legacy "Synchronizes " } auth = softwareSystem "${COMPANY_NAME} Auth" { description "Centralized authentication solution using Keycloak IdP via OAuth2." tags "Existing System" tags "logo-keycloak" api = container "Auth API" { description "" } } new = softwareSystem "${COMPANY_NAME} Eshop" { description "New eshop system. Will be used as a replacement for the legacy eshop." tags "Existing System" eshop = container "${COMPANY_NAME} Eshop Web" { description "" tags "Web Browser" this -> manager.api "Reads and modifies data" "HTTPS" } } # Target system b2b = softwareSystem "${COMPANY_NAME} B2B Eshop" { description "Eshop dedicated to B2B customers and orders. Allows management of company details, creation of new orders and invoices." db = container "B2B Eshop Database" { description "Stores B2B-specific data, such as company invoice details, watchlists, unfinished cart states." tags "Database" tags "logo-postgresql" technology "PostgreSQL" } core = container "B2B Eshop Core" { description "Manages data persistence, communicates with external systems and handles external change notifications." technology ".NET" this -> db "Reads and writes" "TCP/postgresql" this -> manager.api "Reads users, products, orders and warehouse stats, creates new orders" "HTTPS" this -> auth.api "Authenticates users" "HTTPS, OAuth2" } api = container "B2B Eshop API" { description "Allows interaction with external systems, mainly for immediate status updates." technology "ASP.NET" this -> core "Uses" this -> mqtt.broker "Receives product stock and other system updates" "MQTT" # manager -> this "Sends product stock and other system updates" "HTTPS" } eshop = container "B2B Eshop Web" { description "User-facing system web interface. Allows browsing current stock, creating new orders or setting up product watchers." tags "Web Browser" technology ".NET Blazor" this -> core "Uses" userCompany -> this "Browses stock, creates watchers, submits new orders" "HTTPS" } } } views { systemContext b2b "SYSTEM-B2B" { description "Overview of the B2B eshop system within the context of other currently used systems and their components." include * autolayout lr } container b2b "CONTAINER-B2B" { description "Overview of the internal B2B eshop sub-systems along with their interactions with the external systems." include * # autolayout lr } container manager "CONTAINER-Manager" { description "Overview of the staff-used system manager sub-systems and their both internal and external dependencies." include * # autolayout lr } container legacy "CONTAINER-Legacy" { description "Current system interactions with the legacy solution." include * autolayout lr } theme default styles { element "Database" { shape Cylinder } element "File System" { shape Folder } element "Automation" { shape Robot } element "Web Browser" { shape WebBrowser } element "Existing System" { background #999999 color #ffffff } element "Component" { background #85bbf0 color #000000 } element "Failover" { opacity 25 } element "logo-mysql" { icon "https://upload.wikimedia.org/wikipedia/labs/8/8e/Mysql_logo.png" } element "logo-postgresql" { icon "https://upload.wikimedia.org/wikipedia/commons/a/ad/Logo_PostgreSQL.png" } element "logo-mqtt" { icon "https://mqtt.org/assets/downloads/mqtt-hor-neg.png" } } } configuration { #scope softwaresystem } }