A web-based tool for viewing and modifying assurance arguments in Goal-Structured-Notation (GSN), with capabilities to store the assurance argument as a local file or into a database
- To run this application, Node.js, NPM package manager are needed (if you have already installed it, please go directly to STEP 2).
- Install Node.js & NPM with the following command line. (on Terminal) ※Take Linux as example.
$ sudo apt update
$ sudo apt install npm
- Clone the repository from https://github.com/safeautonomy/WebGSN
- Use VScode to open the WebGSN-main folder (when using VSCode, please also install LiveServer as an addon).
- Create a new
.envfile in the backend folder. - Go to https://www.mongodb.com/ set up a database. (How to set up a NoSQL database on MongoDB)
- Paste the following text in
.envfile and don’t forget to save.
MONGO_URI = URI WHICH YOU GET FROM MONGODB
- In VScode, open two terminals; you could achieve that by clicking
◫. - On one terminal, change the directory to WebGSN-main/frontend and install all dependencies.
npm i
- On the other terminal, change the directory to WebGSN-main/backend and install all dependencies.
npm i
Then, run the backend with the following command.
npm run dev
- Trigger the web server. (in VSCode, click on “Go Live” at the bottom right)
The following instructions provide an overview in terms of how to create an assurance argument from scratch.
- Right-click on the root node of the tree (G1).
- Among four options to be chosen, select
Remove tree, which enables removing the selected node and its subtrees. - Scroll down and press
Update JSON, and then pressCreate Safety Casebutton to create your own safety case.
- There shall be a pop-up window, asking for a topic of your safety case. For example, enter "My_Safety_Case"
- When you see the page reload back to the template, please search your safety case by typing the Topic in the search bar (on the top of the website), then an empty canvas will pop out.
- For example, enter "My_Safety_Case"
- To add a new node, simply double-click the background.
- This new node has a long type (Goal, Subgoal, Strategy, Context, Solution, Justification, Assumption), please double click on the string, and manually change it to Goal.
- Hover to an existing node,
+would show up, click to add a new node below. - After pressing
+, you would be asked to define the type of the node, By changing Type, a node will change its shape. The following formats are provided :- Goal (G) → Rectangle
- Subgoal → Rectangle
- strategy (S) → Parallelogram
- Context (C) → Capsule
- Solution (Sn) → Circle
- Justification (J) → Ellipse
- Assumption (A) → Ellipse
- To edit the details of a node, click on the node, and scroll down to Details. The input field would show up for you to edit.
- Description explain the purpose of this node.
- Comments is an optional input for more information, if it’s needed.
- linkDirection decides which direction you wish the node to connect to its parent.
- Parent references the id number of the node one above your current node. This is generated automatically
- To save changes, first press
Update JSON, then pressSave Changes.
- One can relocate the location of nodes to beautify the layout.
- If you want to switch a node and its child nodes under another parent node, simply by dragging it to the parent node until the parent turns red and release.
- By clicking
▲, one can collapse the diagram. - By clicking
▼, one can expand the diagram. - Press
Zoom to FitorCenter on root, to include the whole diagram in the image before downloading. - Click
Download Imageto download the safety case. - Click
Download JSONto download the safety case as the JSON file.
As the safety case is stored in MongoDB, one can simply browse the database and delete your created safety case.