/ docs / views.c4
views.c4
  1  views {
  2    view index {
  3      title: "System Context"
  4      description: """
  5          **Top Level** overview.
  6          """
  7      include
  8        vendors.microvisor-systems with {
  9          navigateTo deployment
 10        },
 11        microvisor,
 12        openws with {
 13          navigateTo openws
 14        },
 15        doombsd,
 16        apollyon-linux,
 17  
 18    }
 19  
 20    deployment view deployment {
 21      title "Deployment"
 22  
 23      include
 24        *,
 25        production.**,
 26  
 27    }
 28  
 29    dynamic view openws {
 30      title "OpenWS"
 31  
 32      include
 33        openws,
 34        openws.caddy,
 35        vendors
 36  
 37      person -> vendors.cloudflare {
 38        color blue
 39        technology "HTTPS"
 40        notes """
 41  - Anyone wanting to go to `([A-Za-z0-9-]+\.)*openws.org`
 42  """
 43      }
 44  
 45      vendors.cloudflare.dns
 46        -> vendors.cloudflare.dns "lookup domain records" {
 47          notes """
 48  ### Tradeoffs
 49  | 🔴 | 🟢 |
 50  |-|-|
 51  | Single point of failure | DDOS Protection |
 52  | | High Performance |
 53  
 54  - [Source](https://github.com/MFarabi619/MFarabi619/blob/main/config/providers/cloudflare.go)
 55  """
 56        }
 57  
 58        -> vendors.cloudflare.tunnels "resolve to" {
 59          notes """
 60  - Resolve corresponding domain CNAME record to matching tunnel.
 61  """
 62        }
 63  
 64        -> openws.caddy.virtual-hosts "route request" {
 65          technology "HTTP"
 66  
 67          notes """
 68  ### Tradeoffs
 69  | 🔴 | 🟢 |
 70  |-|-|
 71  | Single point of failure | Easy TLS Termination `https` -> `http` |
 72  
 73  - [Source](https://github.com/MFarabi619/MFarabi619/blob/main/modules/nixos/services/cloudflared.nix)
 74  """
 75        }
 76  
 77  
 78        -> openws.caddy.virtual-hosts "lookup domain name" {
 79          notes """
 80  - [Source](https://github.com/MFarabi619/MFarabi619/blob/main/modules/nixos/services/caddy.nix)
 81  
 82  | 🔴 | 🟢 |
 83  |-|-|
 84  | Single point of attack | Fast resolution |
 85  |  | Load Balancing |
 86  """
 87        }
 88  
 89        -> openws.caddy.reverse-proxy "handle route" {
 90        }
 91  
 92      parallel {
 93        openws.caddy.reverse-proxy -> openws.homepage "openws.org" {
 94          technology "HTTP"
 95        }
 96  
 97        openws.caddy.reverse-proxy -> openws.open-webui "ai.openws.org" {
 98          technology "HTTP"
 99        }
100  
101        openws.caddy.reverse-proxy -> openws.docs "docs.openws.org" {
102          technology "HTTP"
103        }
104      }
105  
106      openws.open-webui -> openws.ollama "calls"
107  
108      vendors.cloudflare -> person {
109        color green
110        technology "HTTPS"
111      }
112    }
113  
114    view microvisor of microvisor {
115      title: "Microvisor"
116      description "Multikernel Build System"
117      include
118        *,
119        vendors._,
120        microcontrollers.*,
121        operating-systems.*,
122        langugages.*,
123        documentation.*,
124        pr-review.*,
125        gitops.*,
126        frameworks.*,
127        build-systems.*,
128        databases.*,
129        ci.*,
130        cd.*
131    }
132  
133    view userspaces of microvisor.operating-systems.userspaces {
134      title: "Operating Systems"
135      include
136        *,
137        microvisor.operating-systems.kernels._
138    }
139  
140    view kernels of microvisor.kernels {
141      title: "Kernels"
142      description: """
143          Supported operating system back-ends
144          """
145      include
146        *,
147        linux.**
148    }
149  
150    view microcontrollers of microvisor.microcontrollers {
151      title: "Microcontrollers"
152      description: """
153          Supported embedded devices
154          """
155      include microcontrollers.**
156    }
157  
158    view vendors of vendors {
159      description: "Third-party services"
160      include
161        *,
162        pulumi.*,
163        google.**,
164        cloudflare.*,
165        ui-ux-design.*,
166        software-development.*,
167        marketing-and-communication.*
168    }
169  
170  
171    view screenplay-pattern of screenplay-pattern {
172      description: "Behavior-Driven Development"
173      include *
174    }
175  
176    view hardware of hardware {
177      description: "Hardware"
178      include *
179      include hardware.**
180    }
181  }