You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 29, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+85-26Lines changed: 85 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
[](https://www.repostatus.org/#wip)
1
+
[](https://www.repostatus.org/#active)
This package is still under development and has not reached version 1.0.0 yet. This means that its API may contain breaking changes until we're able to deploy the first stable version and begin semantic versioning. Please use tests to ensure expected outputs or to hardcode the version.
EDAVisualiser is a visualization library to show various views revolving around your application. An Application is seen something that communicate with others through incoming and outgoing connections. This is what makes up the foundation for the views.
35
+
# EDAVisualiser
36
+
EDAVisualiser is a visualization library to show various views revolving around your application. An Application is seen as something that communicates with others through incoming and outgoing "connections". This is what makes up the foundation for the views.
35
37
36
38
It is written in React, however, it also supports the most used frameworks such as [Vue](./examples/vue/) and [Angular](./examples/angular/), check out the [examples](./examples/) for concrete code examples.
37
39
40
+
## Installation
41
+
42
+
Run this command to install the visualizer in your project:
43
+
44
+
```bash
45
+
npm install @lagoni/edavisualiser
46
+
```
47
+
38
48
## Inputs
39
-
The library uses a domain-driven approach, meaning we don't assume one or the other input but build on top of a domain model that is specific for this problem we are trying to solve.
49
+
The library uses a domain-driven approach, meaning we don't assume one or the other input but build on top of a domain model that is specific to this problem we are trying to solve.
40
50
41
51
| Input | Example | Description|
42
52
|:---:|:---:|:---:|
43
-
|[**AsyncAPI**](asyncapi.com/)| <ahref="https://jonaslagoni.github.io/EDAVisualiser/asyncapi">Preview</a>, <ahref="https://github.com/jonaslagoni/EDAVisualiser/blob/main/examples/simple-react/src/SimpleAsyncapi.tsx">code</a> |*Allows you to reuse pre-parsed AsyncAPI documents from the [official AsyncAPI parser](github.com/asyncapi/parser-js), underneath it splits up the AsyncAPI document into the core building blocks.*|
44
-
|**Core building blocks**| <ahref="https://jonaslagoni.github.io/EDAVisualiser/asyncapi">Preview</a>, <ahref="https://github.com/jonaslagoni/EDAVisualiser/blob/main/examples/simple-react/src/SimpleApp.tsx">code</a> |*The core building blocks that is the domain abstraction for inputs, is what any other input type is converted to.*|
53
+
|[**AsyncAPI**](https://www.asyncapi.com/)| <ahref="https://jonaslagoni.github.io/EDAVisualiser/asyncapi">Preview</a>, <ahref="https://github.com/jonaslagoni/EDAVisualiser/blob/main/examples/simple-react/src/SimpleAsyncapi.tsx">code</a> |*Allows you to reuse pre-parsed AsyncAPI documents from the [official AsyncAPI parser](github.com/asyncapi/parser-js), underneath it splits up the AsyncAPI document into the core building blocks. AsyncAPI v2.0 -> v2.5 is supported.*|
54
+
|**Core building blocks**| <ahref="https://jonaslagoni.github.io/EDAVisualiser/">Preview</a>, <ahref="https://github.com/jonaslagoni/EDAVisualiser/blob/main/examples/simple-react/src/SimpleApp.tsx">code</a> |*The core building blocks is the domain abstraction for inputs this is what any other input type is converted to.*|
45
55
46
56
47
57
## Views
48
58
49
-
A view could for example be how a ["system" of applications are related](https://jonaslagoni.github.io/EDAVisualiser/social-media), [how a single application relate to others](https://jonaslagoni.github.io/EDAVisualiser/social-media/application/notification_service), only the fantasy sets the limitations, and [feel free to propose new ideas](https://github.com/jonaslagoni/EDAVisualiser/issues/new)!
59
+
A view could for example be how a ["system" of applications is related](https://jonaslagoni.github.io/EDAVisualiser/social-media), [how a single application relates to others](https://jonaslagoni.github.io/EDAVisualiser/social-media/application/notification_service), only the fantasy sets the limitations, and [feel free to propose new ideas](https://github.com/jonaslagoni/EDAVisualiser/issues/new)!
50
60
51
-
| View | Example | Description|
52
-
|:---:|:---:|:---:|
53
-
|**ApplicationFocusView**| <ahref="https://jonaslagoni.github.io/EDAVisualiser/social-media/application/notification_service"><imgsrc="./docs/img/applicationFocusView.png" /></a> |*Puts a single application in focus as part of a larger system. Used to figure out who are "connected" to the application*|
54
-
|**ApplicationView**| <ahref="https://jonaslagoni.github.io/EDAVisualiser/"><imgsrc="./docs/img/applicationView.png" /></a> |*Puts a single application is focus.*|
55
-
|**SystemView**| <ahref="https://jonaslagoni.github.io/EDAVisualiser/social-media"><imgsrc="./docs/img/systemView.png" /></a> |*Puts the system/collection of application in focus to figure out how they are all connected.*|
61
+
### ApplicationFocusView
62
+
Puts a single application in focus as part of a larger system. Used to figure out who is "connected" to the application.
Run this command to install the visualizer in your project:
66
+
#### **Configurations**
60
67
61
-
```bash
62
-
npm install @lagoni/edavisualiser
63
-
```
68
+
These are all the arguments you can use to configure the view.
69
+
| Arguments | Description | Value type | Default |
70
+
|:---:|:---:|:---:|:---:|
71
+
|`application`| The core building block for setting the application information. |`ApplicationNodeData \| undefined`|`undefined`|
72
+
|`incomingOperations`| The core building block for setting incoming operations for the application. |`Array<IncomingNodeData> \| undefined`| undefined |
73
+
|`outgoingOperations`| The core building block for setting incoming operations for the application. |`Array<OutgoingNodeData> \| undefined`| undefined |
74
+
|`external`| This is the main difference from the `ApplicationView` as it shows how external applications interact with it. |`Array<ApplicationViewData> \| undefined`| undefined |
75
+
|`asyncapi`| If the application is to be loaded from a pre-parsed AsyncAPI document, which can extend the node with a custom react component in the top of the node. I.e., if you want to render a button or whatever it can be. |`AsyncapiApplicationData \| undefined`| undefined |
76
+
|`layout`| Used to customize the layout of nodes by setting their position. |`(elements: FlowElement[]) => React.JSXElementConstructor<LayoutProps> \| undefined`| A column layout (`ColumnLayout`) |
77
+
|`sideMenu`| Used to create a custom menu, or whatever you wish to display within the view on top of the nodes. |`() => React.JSXElementConstructor<any> \| undefined`| Simple headline with the library name |
78
+
|`includeControls`| Include controls to zoom in and out, focus and lock nodes. |`boolean \| undefined`|`false`|
79
+
| `edgeType` | Determine the type of edge between nodes. | Either `'smoothstep'`, `'step'`, `'straight'`, `'floating'`, `'default'`, `'simplebezier'`, `'animated'` | `smoothstep`
80
+
81
+
82
+
### ApplicationView
83
+
Puts a single application in focus with only it's near connections that are incoming to the application or outgoing from it.
These are all the arguments you can use to configure the view.
90
+
| Arguments | Description | Value type | Default |
91
+
|:---:|:---:|:---:|:---:|
92
+
|`application`| The core building block for setting the application information. |`ApplicationNodeData \| undefined`|`undefined`|
93
+
|`incomingOperations`| The core building block for setting incoming operations for the application. |`Array<IncomingNodeData> \| undefined`| undefined |
94
+
|`outgoingOperations`| The core building block for setting incoming operations for the application. |`Array<OutgoingNodeData> \| undefined`| undefined |
95
+
|`asyncapi`| If the application is to be loaded from a pre-parsed AsyncAPI document, which can extend the node with a custom react component in the top of the node. I.e., if you want to render a button or whatever it can be. |`AsyncapiApplicationData \| undefined`| undefined |
96
+
|`layout`| Used to customize the layout of nodes by setting their position. |`(elements: FlowElement[]) => React.JSXElementConstructor<LayoutProps> \| undefined`| A column layout (`ColumnLayout`) |
97
+
|`sideMenu`| Used to create a custom menu, or whatever you wish to display within the view on top of the nodes. |`() => React.JSXElementConstructor<any> \| undefined`| Simple headline with the library name |
98
+
|`includeControls`| Include controls to zoom in and out, focus and lock nodes. |`boolean \| undefined`|`false`|
99
+
| `edgeType` | Determine the type of edge between nodes. | Either `'smoothstep'`, `'step'`, `'straight'`, `'floating'`, `'default'`, `'simplebezier'`, `'animated'` | `smoothstep`
100
+
101
+
### SystemView
102
+
Puts the system/collection of applications in focus to figure out how they are all connected.
These are all the arguments you can use to configure the view.
109
+
| Arguments | Description | Value type | Default |
110
+
|:---:|:---:|:---:|:---:|
111
+
|`applications`| A list of all the applications within your "system". |`Array<ApplicationViewData> \| undefined`|`undefined`|
112
+
|`layout`| Used to customize the layout of nodes by setting their position. |`(elements: FlowElement[]) => React.JSXElementConstructor<LayoutProps> \| undefined`| A circle layout (`CircleLayout`) |
113
+
|`sideMenu`| Used to create a custom menu, or whatever you wish to display within the view on top of the nodes. |`() => React.JSXElementConstructor<any> \| undefined`| Simple headline with the library name |
114
+
|`includeControls`| Include controls to zoom in and out, focus and lock nodes. |`boolean \| undefined`|`false`|
115
+
| `edgeType` | Determine the type of edge between nodes. | Either `'smoothstep'`, `'step'`, `'straight'`, `'floating'`, `'default'`, `'simplebezier'`, `'animated'` | `smoothstep`
116
+
117
+
## Showcases
118
+
These are the use-cases and where this library is used that you can use as inspiration.
119
+
120
+
- AsyncAPI Studio, was where this library's components was [originally created and split out from](https://github.com/asyncapi/studio/pull/342). It uses this library to visualize AsyncAPI documents.
121
+
122
+
Feel free to add your own projects that are using this library and why.
64
123
65
124
## Contributors ✨
66
125
Thanks go to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
0 commit comments