@startuml Basic Sample
!include https://raw.githubusercontent.com/adrianvlupu/C4-PlantUML/latest/C4_Container.puml

title magpie UI diagram

LAYOUT_LEFT_RIGHT()

Person(user, "User")
System(Tableau, "Tableau")
System(Segmnet, "Segment")
System(Bifrost, "Bifrost")
System(CustomerIO, "CustomerIO")
System(LearningLocker, "LearningLocker")
Container(tropic_thunder, "Tropic Thunder", "React", "UI interface")
Container(msgo_magpy,"Magpy","GoLang","Interfaces between the stack and Bifrost")
Container(gf_aggregator, "GF-Aggregator", "GoLang", "Interfaces between the UI and the microservice stack")
Container(msgo_session,"Session","GoLang","Handles session management")
Container(msgo_configuration,"Configuration","GoLang","Interfaces between the UI and the organisations' configurations")
Container(msgo_screenshot,"Screenshot","GoLang","Generates and stores the asset screenshots")

System_Boundary(c2, "processors") {
    Container(msgo_timespent,"TimeSpent","GoLang","Stores data on a user's time usage profile")
    Container(msgo_chatscript,"ChatScript","GoLang","Stores data on a organisation's various chat scripts")
    Container(msgo_competency,"Competance","GoLang","Stores data on a user's profile goals")
    Container(msgo_engine,"Engine","GoLang","Holds the various clients' competency calculation matrixes")
    Container(msgo_reference,"References","GoLang","Stores data on inputs, competencies and asset types")
    Container(msgo_benchmark,"Benchmark","GoLang","Stores user quiz data")
    Container(msgo_be_conf,"BackEnd-Configuration","GoLang","Interfaces between the configuration datastores and the aggreagators")
    Container(msgo_learning_assets,"LearningAssets","GoLang","Stores asset related information")
    Container(msgo_playlist,"Playlist","GoLang","Stores playlist information")
    Container(msgo_user_information,"UserInformation","GoLang","Stores user interaction information")
    Container(msgo_progress,"Progress","GoLang","Stores user progress information")
    Container(msgo_group,"Group","GoLang","Stores organisation information")
    Container(msgo_intl,"Localisation","GoLang","Stores web labels values")
}
System_Boundary(c3, "authenticators") {
    Container(msgo_openid,"OpenID","GoLang","Interfaces between Keycloak and the magpie auth system through the oidc protocol")
    Container(msgo_saml,"Saml","GoLang","Interfaces between Keycloak and the magpie auth system through the saml2 protocol")
    Container(msgo_auth,"Auth","GoLang","Stores user authentication information")
    System(KeyCloak, "Keycloak")
}
System_Boundary(c4, "events") {
    Container(msgo_event,"Event","GoLang","Stores the magpie fat events and acts as a gateway to the different brokers")
    Container(msgo_segment,"Segment","GoLang","Formats the events to be then consumed by Segment.IO")
    Container(msgo_tableau_broker,"Tableau","GoLang","Stores events that will subsequently be pulled in by Tableau")
    Container(msgo_bifrost_broker,"BifrostBroker","GoLang","Stores events that will subsequently be pulled in by Bifrost")
    Container(msgo_learning_locker,"LearningLocker","GoLang","Formats, stores and forwards events to LearningLocker")
}


Rel(user, tropic_thunder, "Uses", "HTTPS")
Rel(tropic_thunder, msgo_session, "Uses", "HTTPS")
Rel(tropic_thunder, gf_aggregator, "Uses", "HTTPS")
Rel(tropic_thunder, msgo_screenshot, "Uses", "HTTPS")
Rel(tropic_thunder, msgo_configuration, "Uses", "HTTPS")
Rel(gf_aggregator, msgo_timespent, "Uses", "TCP")
Rel(gf_aggregator, msgo_chatscript, "Uses", "TCP")
Rel(gf_aggregator, msgo_competency, "Uses", "TCP")
Rel(gf_aggregator, msgo_engine, "Uses", "TCP")
Rel(gf_aggregator, msgo_reference, "Uses", "TCP")
Rel(gf_aggregator, msgo_benchmark, "Uses", "TCP")
Rel(gf_aggregator, msgo_event, "Uses", "TCP")
Rel(gf_aggregator, msgo_be_conf, "Uses", "TCP")
Rel(gf_aggregator, msgo_playlist, "Uses", "TCP")
Rel(gf_aggregator, msgo_learning_assets, "Uses", "TCP")
Rel(gf_aggregator, msgo_user_information, "Uses", "TCP")
Rel(gf_aggregator, msgo_progress, "Uses", "TCP")
Rel(gf_aggregator, msgo_group, "Uses", "TCP")
Rel_Neighbor(msgo_configuration, msgo_intl, "Uses", "TCP")
Rel(msgo_configuration, msgo_be_conf, "Uses", "TCP")
Rel_U(msgo_magpy, msgo_engine, "Uses", "TCP")
Rel_U(msgo_magpy, msgo_learning_assets, "Uses", "TCP")
Rel_U(msgo_magpy, msgo_reference, "Uses", "TCP")
Rel_U(msgo_magpy, msgo_event, "Uses", "TCP")
Rel_D(msgo_magpy, Bifrost, "Uses", "HTTPS")
Rel_U(msgo_magpy, msgo_event, "Uses", "TCP")
Rel_U(msgo_magpy, msgo_playlist, "Uses", "TCP")
Rel_U(msgo_magpy, msgo_bifrost_broker, "Uses", "TCP")
Rel(Bifrost, msgo_magpy, "Uses", "HTTPS")
Rel(msgo_engine, msgo_reference, "Uses", "TCP")
Rel(msgo_engine, msgo_benchmark, "Uses", "TCP")
Rel(msgo_engine, msgo_competency, "Uses", "TCP")
Rel(msgo_engine, msgo_learning_assets, "Uses", "TCP")
Rel(msgo_engine, msgo_playlist, "Uses", "TCP")
Rel(msgo_saml, KeyCloak, "Uses", "HTTPS")
Rel(msgo_saml, msgo_auth, "Uses", "TCP")
Rel(msgo_openid, KeyCloak, "Uses", "HTTPS")
Rel(msgo_openid, msgo_auth, "Uses", "TCP")
Rel(msgo_session, msgo_auth, "Uses", "TCP")
Rel(msgo_session, msgo_be_conf, "Uses", "TCP")
Rel(msgo_session, msgo_saml, "Uses", "TCP")
Rel(msgo_session, msgo_openid, "Uses", "TCP")
Rel(msgo_event, msgo_segment, "Uses", "TCP")
Rel(msgo_event, msgo_tableau_broker, "Uses", "TCP")
Rel(msgo_event, msgo_bifrost_broker, "Uses", "TCP")
Rel(msgo_event, msgo_learning_locker, "Uses", "TCP")
Rel(msgo_learning_locker, LearningLocker, "Uses", "HTTPS")
Rel(msgo_segment, Segmnet, "Uses", "HTTPS")
Rel_U(Tableau, msgo_tableau_broker, "Uses", "HTTPS")
Rel(Segmnet, CustomerIO, "Uses", "HTTPS")

@enduml