workspace "SNIPES Hub" "Microservice Backend for the SNIPES App" { configuration { scope softwaresystem } model { user = person "User" "A human using the app or webshop" app = softwareSystem "SNIPES App" "ReactNative App" "DMDR System" { user -> this "Interacts with" "Touchscreen" } mobileWebFrontend = softwareSystem "Mobile Web Frontend" "Web frontend to SCAYLE" "Existing System" { user -> this "Interacts with" "Touchscreen" app -> this "display webviews" "https" } hub = softwareSystem "SNIPES Hub" { api = container "API Gateway" "Firewalls, Policies, Routing, ..." "Azure API Management" { app -> this "request data" "REST" } group "AppConfigService" { appConfigService = container "AppConfigService" "Endpoints for app configs" "Azure function app" { api -> this "config actions" getAppConfigHandler = component "get" "Provides app configuration data from CMS" "Azure function" { api -> this "get config" } } } group "AuthService" { authService = container "AuthService" "Endpoints for authentication." "Azure function app" { api -> this "auth actions" loginHandler = component "login" "Login users by username and password or guest when omitted" "Azure function" { api -> this "login" } logoutHandler = component "logout" "Logout user" "Azure function" { api -> this "logout" } validateHandler = component "validate" "Validates a token" "Azure function" { api -> this "validate token" } refreshHandler = component "refresh" "Refresh a token" "Azure function" { api -> this "get refresh tokens" } } authDB = container "Auth DB" "store token identifiers" "Azure CosmosDB" "Database"{ authService -> this "Persist auth data" loginHandler -> this "persist token identifiers" logoutHandler -> this "remove token identifiers" validateHandler -> this "check for tokenId" refreshHandler -> this "store new token identifiers" } } group "FeedService" { feedService = container "FeedService" "Endpoints for fetching feed data." "Azure function app" { api -> this "feed actions" getFeedHandler = component "get" "Get a feed config." "Azure function" { api -> this "get feed config" } getFeedModuleHandler = component "getModule" "Get feed module data." "Azure function" { api -> this "get module config" } } } group "TranslationService" { translationService = container "TranslationService" "Endpoints for fetching translation data." "Azure function app" "upcoming" { api -> this "translation actions" getTranslationHandler = component "get" "get translation" "Azure function" } } group "ProductService" { productService = container "ProductService" "Endpoints for fetching product data." "Azure function app" { api -> this "product actions" getHandler = component "get" "Get a product by id." "Azure function" { api -> this "get product" } getByIdsHandler = component "getByIds" "Get multiple products by id." "Azure function" { api -> this "get products" } } } group "BasketService" { basketService = container "BasketService" "Endpoints to manage shopping basket." "Azure function app" "upcoming" { api -> this "basket actions" postAddBasketItem = component "addItem" "Add item to baske." "Azure function" { } } } group "CheckoutService" { checkoutService = container "CheckoutService" "" "Azure function app" "upcoming" { api -> this "checkout actions" } } group "LoyaltyService" { loyaltyService = container "LoyaltyService" "" "Azure function app" { api -> this "loyalty actions" getLoyaltyInfoHandler = component "getInfo" "Get Loyalty Info" "Azure function" { api -> this "get loyalty info" "registered" "registered" } getLoyaltyTransactionHandler = component "getTransaction" "Get Loyalty Transaction" "Azure function" { api -> this "get transaction" "registered" "registered" } } } group "ProfileService" { profileService = container "ProfileService" "Endpoints for managing profiles" "Azure function app" { api -> this "profile actions" createProfileHandler = component "create" "Create a profile" "Azure function" getProfileHandler = component "get" "Get a profile" "Azure function" } profileDB = container "Profile DB" "store user profiles" "Azure CosmosDB" "Database"{ profileService -> this "Persist profile data" createProfileHandler -> this "store user profiles" # this -> getProfileHandler "read user profile" } } group "CustomerService" { customerService = container "CustomerService" "Enpoints for managing customers" "Azure function app" { api -> this "customer actions" registerHandler = component "register" "Create a customer" "Azure function" getCustomerHandler = component "get" "Get customer data" "Azure function" } } group "SoundboothService" { soundboothService = container "SoundboothService" "Enpoints for managing soundbooth" "Azure function app" { api -> this "soundbooth actions" soundboothAuthFunction = component "auth" "Authenticate user for session" "Azure function"{ api -> this "authenticate" } soundboothGetFunction = component "get" "Get Soundbooth sessions" "Azure function"{ api -> this "get sessions" } soundboothLocationsFunction = component "locations" "Get Soundbooth locations" "Azure function"{ api -> this "get locations" } soundboothLocationsByIdFunction = component "locations by id" "Get Soundbooth locations by id" "Azure function"{ api -> this "get location" } soundboothPlayCountFunction = component "play-count" "Increase playcount for a session" "Azure function"{ api -> this "increase" } soundboothReactionFunction = component "reaction" "Add reaction a session" "Azure function"{ api -> this "add" } } } } cms = softwareSystem "CMS" "Content Management" { getAppConfigHandler -> this "request configuration" getFeedHandler -> this "get feed config" getFeedModuleHandler -> this "get feed module config" getTranslationHandler -> this "get translations" } group "E-com system" { ocapi = softwareSystem "OCAPI" "Deprecated API to salesforce" "Existing System" { hub -> this "request data" loginHandler -> this "request login" getHandler -> this "request product data" getByIdsHandler -> this "request product data" refreshHandler -> this "refresh token" registerHandler -> this "register customer" getCustomerHandler -> this "request customer data" postAddBasketItem -> this "add basket item" } charybdis = softwareSystem "Charybdis" "Middleware to SCAYLE" "Existing System" { mobileWebFrontend -> this "request data" "REST" hub -> this "request data" loginHandler -> this "request login" getHandler -> this "request product data" getByIdsHandler -> this "request product data" refreshHandler -> this "refresh token" registerHandler -> this "register customer" getCustomerHandler -> this "request customer data" postAddBasketItem -> this "add basket item" } } ditLoyalty = softwareSystem "DITLoyalty" "Loyalty Engine" "Existing System" { getLoyaltyInfoHandler -> this "request info" getLoyaltyTransactionHandler -> this "request transaction" } group "External systems" { firebase = softwareSystem "Firebase" "Analytics, notifications..." "External System" { app -> this "track analytics data" "react-native-firebase sdk" hub -> this "send notifications" this -> app "send notifications" } liveReach = softwareSystem "LiveReach" "Social content" "External System" { hub -> this "request content" } shopTheLook = softwareSystem "ShopTheLook" "Social content" "External System" { hub -> this "request content" } } ugcHub = softwareSystem "UGC Hub" "deprecated!" "External System" { soundboothGetFunction -> this "proxy" "REST" soundboothAuthFunction -> this "proxy" "REST" soundboothLocationsFunction -> this "proxy" "REST" soundboothLocationsByIdFunction -> this "proxy" "REST" soundboothPlayCountFunction -> this "proxy" "REST" soundboothReactionFunction -> this "proxy" "REST" } } views { systemLandscape { include * # autolayout } systemContext hub "SNIPES-Hub-Context" { include * # autolayout } container hub "SNIPES-Hub-Container" { include * # autolayout } component appConfigService "AppConfigService-Components"{ include * autolayout } component authService "AuthService-Components"{ include * # autolayout lr } component productService "ProductService-Components"{ include * autolayout lr } component profileService "ProfileService-Components"{ include * autolayout lr } component feedService "FeedService-Components"{ include * autolayout lr } component loyaltyService "LoyaltyService-Components"{ include * autolayout lr } component soundboothService "SoundboothService-Components"{ include * autolayout tb } theme default styles { element "DMDR System" { shape MobileDevicePortrait background #999999 color #ffffff # stroke #000000 # strokeWidth 4 } element "Existing System" { background #999999 color #ffffff } element "upcoming" { background #C4B904 color #ffffff } relationship "registered" { color #ff0000 } element "External System" { background #666666 color #ffffff } element "tbd" { background #FF3355 color #ffffff } element "Database" { shape Cylinder } } } }