@startuml !include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml !include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml !define DEVICONS https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/master/devicons !define FONTAWESOME https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/master/font-awesome-5 !include FONTAWESOME/cloud.puml !include DEVICONS/java.puml !include DEVICONS/postgresql.puml !include DEVICONS/redis.puml !include FONTAWESOME/mobile.puml Person(user, "System customer", "uses a smart system") System_Boundary(smartSystem, "Smart House System") { ' frontend super app Container(mobileApp, "Mobile", "Flutter", $descr = "Super app with aggregate another services", $sprite="mobile") ' microservice - Auth Container_Boundary(authSystem, "Authorization Service") { Component(signIn, "Sign In Controller", "Component: Spring MVC Rest Controller", $descr="Allows the user to log in to the account") Component(registr, "Registration Controller", "Component: Spring MVC Rest Controller", $descr="Allows the user to register an account in the system") Component(tokens, "Tokens Controller", "Component: Spring MVC Rest Controller", $descr="Allows you to manage the user's session tokens") Component(sessionService, "Session Token Service", "Component: Spring Service", $descr="Performs the function of processing session tokens") Component(authService, "Auth Service", "Сomponent: Spring Service", $descr="Performs all authorization and registration in the system") Component(redisLayer, "Session Tokens Storage", "Component: Spring Bean", $descr="A layer for interacting with the Redis session token storage") Component(postgreLayer, "Personal Data Storage", "Component: Spring Bean", $descr="A layer for interacting with the PostgreSQL database of user credentials") Rel(mobileApp, signIn, "Makes API calls to", "json|https") Rel(mobileApp, registr, "Makes API calls to", "json|https") Rel(mobileApp, tokens, "Makes API calls to", "json|https") Rel(signIn, authService, "use") Rel(registr, authService, "use") Rel(tokens, sessionService, "use") Rel(authService, sessionService, "use") Rel(authService, redisLayer, "use") Rel(sessionService, postgreLayer, "use") } ' microservice - Heating Container_Boundary(heatingSystem, "Heating Service") { Component(sensorDetectionHeating, "Sensor Detection Controller", "Component: Spring MVC Rest Controller", $descr="Allows the user to connect/disconnect the sensor") Component(sensorControlHeating, "Sensor Control Controller", "Component: Spring MVC Rest Controller", $descr="Allows the user to control the sensor") Component(sensorTelemetryHeating, "Sensor Telemetry Controller", "Component: Spring MVC Rest Controller", $descr="Allows the user to receive sensor telemetry") Component(sensorServiceHeating, "Sensor Service", "Component: Spring Service", $descr="Performs all processing of sensor functions") Component(sensorLayerHeating, "Sensors Data Storage", "Component: Spring Bean", $descr="The layer allows you to interact with the database") Component(commandAdapterHeating, "Adapter Command Service", "Component: Spring Bean", $descr="The service encodes/decodes all commands between the application and the sensor API") Component(sensorValidatorHeating, "Sensors Validator Service", "Component: Spring Bean", $descr="The layer validates the possibility of connecting specific sensors") Component(sensorStatisticHeating, "Sensors Statistic Service", "Component: Spring Bean", $descr="The layer collects sensor statistics and outputs telemetry") Rel(mobileApp, sensorDetectionHeating, "Makes API calls to", "json|https") Rel(mobileApp, sensorControlHeating, "Makes API calls to", "json|https") Rel(mobileApp, sensorTelemetryHeating, "Makes API calls to", "json|https") Rel(sensorDetectionHeating, sensorServiceHeating, "use") Rel(sensorControlHeating, sensorServiceHeating, "use") Rel(sensorTelemetryHeating, sensorStatisticHeating, "use") Rel(sensorServiceHeating, sensorLayerHeating, "use") Rel(sensorStatisticHeating, sensorLayerHeating, "use") Rel(sensorServiceHeating, sensorValidatorHeating, "use") Rel(sensorServiceHeating, commandAdapterHeating, "use") Rel(sensorStatisticHeating, commandAdapterHeating, "use") } ' microservice - Light Container_Boundary(lightSystem, "Light Service") { Component(sensorDetectionLight, "Sensor Detection Controller", "Component: Spring MVC Rest Controller", $descr="Allows the user to connect/disconnect the sensor") Component(sensorControlLight, "Sensor Control Controller", "Component: Spring MVC Rest Controller", $descr="Allows the user to control the sensor") Component(sensorTelemetryLight, "Sensor Telemetry Controller", "Component: Spring MVC Rest Controller", $descr="Allows the user to receive sensor telemetry") Component(sensorServiceLight, "Sensor Service", "Component: Spring Service", $descr="Performs all processing of sensor functions") Component(sensorLayerLight, "Sensors Data Storage", "Component: Spring Bean", $descr="The layer allows you to interact with the database") Component(commandAdapterLight, "Adapter Command Service", "Component: Spring Bean", $descr="The service encodes/decodes all commands between the application and the sensor API") Component(sensorValidatorLight, "Sensors Validator Service", "Component: Spring Bean", $descr="The layer validates the possibility of connecting specific sensors") Component(sensorStatisticLight, "Sensors Statistic Service", "Component: Spring Bean", $descr="The layer collects sensor statistics and outputs telemetry") Rel(mobileApp, sensorDetectionLight, "Makes API calls to", "json|https") Rel(mobileApp, sensorControlLight, "Makes API calls to", "json|https") Rel(mobileApp, sensorTelemetryLight, "Makes API calls to", "json|https") Rel(sensorDetectionLight, sensorServiceLight, "use") Rel(sensorControlLight, sensorServiceLight, "use") Rel(sensorTelemetryLight, sensorStatisticLight, "use") Rel(sensorServiceLight, sensorLayerLight, "use") Rel(sensorStatisticLight, sensorLayerLight, "use") Rel(sensorServiceLight, sensorValidatorLight, "use") Rel(sensorServiceLight, commandAdapterLight, "use") Rel(sensorStatisticLight, commandAdapterLight, "use") } ' microservice - Gates Container_Boundary(gatesSystem, "Gates Service") { Component(sensorDetectionGates, "Sensor Detection Controller", "Component: Spring MVC Rest Controller", $descr="Allows the user to connect/disconnect the sensor") Component(sensorControlGates, "Sensor Control Controller", "Component: Spring MVC Rest Controller", $descr="Allows the user to control the sensor") Component(sensorTelemetryGates, "Sensor Telemetry Controller", "Component: Spring MVC Rest Controller", $descr="Allows the user to receive sensor telemetry") Component(sensorServiceGates, "Sensor Service", "Component: Spring Service", $descr="Performs all processing of sensor functions") Component(sensorLayerGates, "Sensors Data Storage", "Component: Spring Bean", $descr="The layer allows you to interact with the database") Component(commandAdapterGates, "Adapter Command Service", "Component: Spring Bean", $descr="The service encodes/decodes all commands between the application and the sensor API") Component(sensorValidatorGates, "Sensors Validator Service", "Component: Spring Bean", $descr="The layer validates the possibility of connecting specific sensors") Component(sensorStatisticGates, "Sensors Statistic Service", "Component: Spring Bean", $descr="The layer collects sensor statistics and outputs telemetry") Rel(mobileApp, sensorDetectionGates, "Makes API calls to", "json|https") Rel(mobileApp, sensorControlGates, "Makes API calls to", "json|https") Rel(mobileApp, sensorTelemetryGates, "Makes API calls to", "json|https") Rel(sensorDetectionGates, sensorServiceGates, "use") Rel(sensorControlGates, sensorServiceGates, "use") Rel(sensorTelemetryGates, sensorStatisticGates, "use") Rel(sensorServiceGates, sensorLayerGates, "use") Rel(sensorStatisticGates, sensorLayerGates, "use") Rel(sensorServiceGates, sensorValidatorGates, "use") Rel(sensorServiceGates, commandAdapterGates, "use") Rel(sensorStatisticGates, commandAdapterGates, "use") } ' microservice - Video Container_Boundary(videoSystem, "Video Service") { Component(sensorDetectionVideo, "Sensor Detection Controller", "Component: Spring MVC Rest Controller", $descr="Allows the user to connect/disconnect the sensor") Component(sensorControlVideo, "Sensor Control Controller", "Component: Spring MVC Rest Controller", $descr="Allows the user to control the sensor") Component(sensorTelemetryVideo, "Sensor Telemetry Controller", "Component: Spring MVC Rest Controller", $descr="Allows the user to receive sensor telemetry") Component(sensorServiceVideo, "Sensor Service", "Component: Spring Service", $descr="Performs all processing of sensor functions") Component(sensorLayerVideo, "Sensors Data Storage", "Component: Spring Bean", $descr="The layer allows you to interact with the database") Component(commandAdapterVideo, "Adapter Command Service", "Component: Spring Bean", $descr="The service encodes/decodes all commands between the application and the sensor API") Component(sensorValidatorVideo, "Sensors Validator Service", "Component: Spring Bean", $descr="The layer validates the possibility of connecting specific sensors") Component(sensorStatisticVideo, "Sensors Statistic Service", "Component: Spring Bean", $descr="The layer collects sensor statistics and outputs telemetry") Rel(mobileApp, sensorDetectionVideo, "Makes API calls to", "json|https") Rel(mobileApp, sensorControlVideo, "Makes API calls to", "json|https") Rel(mobileApp, sensorTelemetryVideo, "Makes API calls to", "json|https") Rel(sensorDetectionVideo, sensorServiceVideo, "use") Rel(sensorControlVideo, sensorServiceVideo, "use") Rel(sensorTelemetryVideo, sensorStatisticVideo, "use") Rel(sensorServiceVideo, sensorLayerVideo, "use") Rel(sensorStatisticVideo, sensorLayerVideo, "use") Rel(sensorServiceVideo, sensorValidatorVideo, "use") Rel(sensorServiceVideo, commandAdapterVideo, "use") Rel(sensorStatisticVideo, commandAdapterVideo, "use") } ' microservice - Location Container_Boundary(locationSystem, "Location Service") { Component(houseController, "House Controller", "Component: Spring MVC Rest Controller", $descr="Allows users to manage homes") Component(roomController, "Room Controller", "Component: Spring MVC Rest Controller", $descr="Allows users to manage rooms") Component(houseService, "House Service", "Component: Spring Service", $descr="Performs the function of processing user's homes") Component(roomService, "Room Service", "Component: Spring Service", $descr="Performs the function of processing user's rooms") Component(locationLayer, "Location Data Storage", "Component: Spring Bean", $descr="The layer allows you to interact with the database") Rel(mobileApp, houseController, "Makes API calls to", "json|https") Rel(mobileApp, roomController, "Makes API calls to", "json|https") Rel(houseController, houseService, "use") Rel(roomController, roomService, "use") Rel(houseService, locationLayer, "use") Rel(roomService, locationLayer, "use") } ' databases ContainerDb(authDb, "Authorization Database", "PostgreSQL", $sprite="postgresql", $descr="Stores the user's personal data") ContainerDb(authCache, "Authorization Cache Database", "Redis", $sprite="redis", $descr="Stores session tokens") ContainerDb(heatingDb, "Heating Database", "PostgreSQL", $sprite="postgresql", $descr="Stores data about heating sensors") ContainerDb(lightDb, "Light Database", "PostgreSQL", $sprite="postgresql", $descr="Stores data about light sensors") ContainerDb(gatesDb, "Gates Database", "PostgreSQL", $sprite="postgresql", $descr="Stores data about gates sensors") ContainerDb(videoDb, "Video Database", "PostgreSQL", $sprite="postgresql", $descr="Stores data about video sensors") ContainerDb(locationDb, "Location Database", "PostgreSQL", $sprite="postgresql", $descr="Stores data about the user's houses and rooms") ' sensors cloud Container_Ext(heatingSensor, "Heating Cloud", $descr="Heating Sensor manufacturer's cloud for transmitting commands", $sprite="cloud") Container_Ext(lightSensor, "Light Cloud", $descr="Light Sensor manufacturer's cloud for transmitting commands", $sprite="cloud") Container_Ext(gatesSensor, "Gates Cloud", $descr="Gates Sensor manufacturer's cloud for transmitting commands", $sprite="cloud") Container_Ext(videoSensor, "Video Cloud", $descr="Video Sensor manufacturer's cloud for transmitting commands", $sprite="cloud") } Rel(user, mobileApp, "Use") ' Auth Rel(redisLayer, authCache, "Read/Write session tokens", "jedis|tcp") Rel(postgreLayer, authDb, "Read/Write person data", "sql|tcp") ' Heating Rel(sensorLayerHeating, heatingDb, "Read/Write person data", "sql|tcp") Rel(commandAdapterHeating, heatingSensor, "Read/Write person data", "https|tcp") ' Light Rel(sensorLayerLight, lightDb, "Read/Write person data", "sql|tcp") Rel(commandAdapterLight, lightSensor, "Read/Write person data", "https|tcp") ' Gates Rel(sensorLayerGates, gatesDb, "Read/Write person data", "sql|tcp") Rel(commandAdapterGates, gatesSensor, "Read/Write person data", "https|tcp") ' Video Rel(sensorLayerVideo, videoDb, "Read/Write person data", "sql|tcp") Rel(commandAdapterVideo, videoSensor, "Read/Write person data", "https|tcp") ' Location Rel(locationLayer, locationDb, "Read/Write person data", "sql|tcp") @enduml
Decode URL
Submit
amiga
aws-orange
black-knight
bluegray
blueprint
cerulean-outline
cerulean
crt-amber
crt-green
cyborg-outline
cyborg
hacker
lightgray
mars
materia-outline
materia
metal
mimeograph
minty
plain
reddress-darkblue
reddress-darkgreen
reddress-darkorange
reddress-darkred
reddress-lightblue
reddress-lightgreen
reddress-lightorange
reddress-lightred
sandstone
silver
sketchy-outline
sketchy
spacelab
spacelab-white
superhero-outline
superhero
toy
united
vibrant
🎉 Discover the future PlantUML Web Editor! 🚀
PNG
SVG
ASCII Art