workspace "general context on psi" { !docs md !docs md/arch !identifiers hierarchical model { // --- Definition of people --- user = person "User" "A user is a broadcaster's recipient, using the data the broadcaster supplies" "user" moderator = person "Moderator" "Answers comments, moderates comments and adds new topics to PSI" "user, owned" // --- Definition of software-systems --- psi = softwareSystem "PSI System" "ZDF Google Cloud" "Service API, owned, Google Cloud Platform - Developer Portal" { frontend = container "PSI Frontend" { tags "Google Cloud Platform - Google Kubernetes Engine" description "This represents all frontend modules of this PSI-instance." } backend = container "PSI Backend" { tags "Google Cloud Platform - Google Kubernetes Engine" frontend -> this "Reads from and writes to" } database = container "Firebase Database" { tags "Database, Google Cloud Platform - Firebase" backend -> this "Reads data and writes data" } user_profile = container "User Profile" { description "Has user picture, information and login components" tags "userprofile" login = component "Login" { tags "gcp" } profile = component "Profile" { tags "gcp" } avatar = component "Avatar Management" { tags "gcp" } } } broadcaster_app = softwareSystem "Broadcaster System (e.g. heute.de)" "ZDF Google Cloud" "Service API, owned, Google Cloud Platform - Developer Portal" { frontend = container "Broadcaster App Frontend (e.g. heute.de)" { tags "Google Cloud Platform - Google Kubernetes Engine" description "The main frontend of Mediathek or heute.de" } backend = container "Broadcaster App API" { tags "Google Cloud Platform - Google Kubernetes Engine" description "The external api of the broadcasters system" frontend -> this "Deliver required data" } } login = softwareSystem "Login System (e.g. keycloak)" "ZDF Google Cloud" "Service API, owned, Google Cloud Platform - Google Kubernetes Engine" { app = container "Login App (e.g. Keycloak / ARD-ZDF-Login)" { tags "Google Cloud Platform - Google Kubernetes Engine" description "Has user information and handles SignUp and SignIn - required personal information for SignUp can be any email-address, no further personal data is being acquired." authentication = component "Authentication Component" { description "Checks if a users login request is eligible by password, passkey or OIDC" } logout = component "Logout Component" { description "Sets user token on a blacklist, deletes token from browser and forwards to logout page" } signup = component "SignUp Component" { description "Verifies the email address by sending a one-time-link" } } } // --- User Setup --- // User user -> psi.frontend "Interact with, write comments, etc." moderator -> user "Moderate and comment users entries" user -> psi.user_profile.login "Log in" user -> psi.user_profile.profile "Manage their profile" user -> psi.user_profile.avatar "Change their profile picture" // --- Login --- psi.frontend -> login.app "Authenticates as consumer against OpenIDC" login.app -> psi.backend "Sends user access_token to backend, after interactive login succeded" // --- Moderator --- moderator -> psi.frontend "Moderate and comment user entries in moderation dashboard" moderator -> psi.user_profile.login "Log in and requests authorization" // --- system requirements and dependencies --- broadcaster_app.frontend -> psi.frontend "Embeds PSI scripts" psi.user_profile.login -> login.app "Forwards users to login app" psi.user_profile.login -> login.app.authentication "Forwards user to login" } views { properties { "mermaid.url" "https://mermaid.ink" "mermaid.format" "png" } systemLandscape "systemLandscape_psi" { include * } systemContext psi "systemContext_psi" { include * // autolayout lr } container broadcaster_app "Containers_broadcaster_app" { include * // autolayout lr } container psi "Containers_psi" { include * // autolayout lr } container login "Containers_login" { include * // autolayout lr } component psi.user_profile "Components_psi_user_profile" { include * } component login.app "Components_psi_login" { include * } image login.app.authentication { mermaid modules/login/auth_flow.mmd title "Sequence diagram for LoginFlow" } image login.app.signup { mermaid modules/login/registration_flow.mmd title "Sequence diagram for SignUpFlow" } styles { element "Person" { shape Person } element "Service API" { shape hexagon } element "Database" { shape cylinder } element "ms" { background #0062FF } element "yellow" { background #FA7D19 } element "foreign" { background #A3A3A3 } element "user" { background #001AC5 color #ffffff } } themes https://static.structurizr.com/themes/microsoft-azure-2023.01.24/theme.json https://static.structurizr.com/themes/google-cloud-platform-v1.5/theme.json } }