Advertisement
ptrcsky

Spotify - LikeC4

Feb 14th, 2025
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. specification {
  2.   // Define a container type for our application components
  3.   element container {
  4.     style {
  5.       shape rectangle
  6.       color lightblue
  7.     }
  8.   }
  9.   // Define a person type for users
  10.   element person {
  11.     style {
  12.       shape person
  13.       color green
  14.     }
  15.   }
  16. }
  17.  
  18. model {
  19.   // Define the containers
  20.   sftp   = container "SFTP" {
  21.     description "Handles file transfers via SFTP."
  22.   }
  23.   worker = container "Worker" {
  24.     description "Consumes files from SFTP."
  25.   }
  26.   appDB  = container "App DB" {
  27.     description "Database for the application."
  28.   }
  29.   webApp = container "WebApp" {
  30.     description "Web application interface."
  31.   }
  32.  
  33.   // Define the user as a person
  34.   user = person "User" {
  35.     description "User that connects to the WebApp."
  36.   }
  37.  
  38.   // Define relationships among elements
  39.   worker -> sftp   "Consumes files from"
  40.   worker -> appDB  "Connects to"
  41.   webApp -> appDB  "Connects to"
  42.   user   -> webApp "Uses"
  43. }
  44.  
  45. views {
  46.   view containerDiagram {
  47.     title "Container Diagram"
  48.     include *
  49.   }
  50. }
  51.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement