Skip to content

Commit a2c6be7

Browse files
authored
Merge pull request #18 from nielsdejong/develop
1.0.7 pre-release
2 parents db0553c + b07d5d2 commit a2c6be7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1302
-693
lines changed

README.md

Lines changed: 7 additions & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -1,178 +1,16 @@
1-
# NeoDash - Neo4j Dashboard Builder
2-
## Introduction
3-
NeoDash is a lightweight web-based tool to create Neo4j dashboards.
1+
# ⚡ NeoDash - Neo4j Dashboard Builder
2+
NeoDash is a lightweight web app to create Neo4j dashboards.
43
Writing Cypher is all that's required to build your first dashboard in minutes. Want to give NeoDash a spin right away? Try it here: https://nielsdejong.nl/neodash/.
54

65
### Features
76
- Live reporting on a Neo4j database with a table, graph view, bar chart or line chart.
8-
- Support for reporting on Neo4j data types, including nodes, edges, paths, as well as aggregate types.
7+
- Interactively select parameters to be used as query parameters.
8+
- Native support for reporting on Neo4j data types, including nodes, edges, paths, as well as aggregate types.
99
- Setting auto-refresh intervals for each report.
1010
- Customizing your dashboard layout with a variety of report sizes.
1111
- Saving/loading dashboards as a JSON file.
1212

13+
### Documentation
14+
- For users, see [user-guide.md](./doc/user-guide.md).
15+
- Extending NeoDash? See [developer-guide.md](./doc/developer-guide.md).
1316

14-
## Documentation & User Guide
15-
### Reports
16-
NeoDash dashboards are a collection of reports - each report is a view of your graph.
17-
The current version of NeoDash supports six types of reports:
18-
19-
- Table views
20-
- Graph visualizations
21-
- Bar charts
22-
- Line charts
23-
- JSON output
24-
- Markdown Reports
25-
26-
Reports sit in resizable containers - _cards_.
27-
A report is always populated by a single Cypher query. An example table report is shown below:
28-
29-
![NeoDash Report](./public/neodash-table.png)
30-
31-
The following rule of thumb holds for reports:
32-
- one report = one card = one Cypher query
33-
34-
#### Report Settings
35-
Each report has a settings screen that can be accessed by clicking the (⋮) icon on the top right of the card.
36-
In the settings menu, the following can be defined:
37-
- The Cypher query populating the report,
38-
- The type of report,
39-
- The size of the report,
40-
- [Parameters](https://neo4j.com/docs/cypher-manual/current/syntax/parameters/) for your Cypher query,
41-
- A refresh interval for the report.
42-
43-
> A title of a report can be edited directly, without opening the settings. Just click the header of the report (which by default reads 'Report name...').
44-
45-
An example report settings view is shown below.
46-
47-
![NeoDash Settings](./public/neodash-editor.png)
48-
49-
While having the report settings open, the report can be moved around or deleted. To close the settings, click the 'save' icon.
50-
#### Tables
51-
The table view renders Neo4j native types in a standard table format. Columns are ordered in the order they are returned by Neo4j, column names are set to the names of your returned variables. [Structural data types](https://neo4j.com/docs/cypher-manual/current/syntax/values/#structural-types) such as nodes, relationships or paths can also be rendered in a table.
52-
53-
The colors of the nodes and relationships in the table can be set using the Cypher Parameters settings. For example, specifying:
54-
```
55-
{
56-
"nodeColor": "orange",
57-
"relColor": "black"
58-
}
59-
```
60-
will draw the nodes in the table as orange, and the relationships as black.
61-
62-
#### Graph Visualizations
63-
For almost all graph use-cases, a force-directed graph is your go-to choice of visualization. In NeoDash, you’ll be able to visualize your graph similar to the Neo4j browser: for each node label you choose a style and the property to be displayed. Any query returning nodes, relationships, or paths can be visualized as a graph.
64-
> Doing some graph exploration? Clicking a node will show all properties of that node.
65-
66-
Some style properties of the visualization can be changed by passing in extra parameters to your Cypher query. To use custom colors for the graph nodes, add the following to the Cypher Parameters in the settings:
67-
```
68-
{
69-
"nodeColors": ["navy","green","red"]
70-
}
71-
```
72-
73-
#### Bar Charts
74-
Bar charts can be used to visualize categorical data. Naturally, a bar chart will need a numeric value to plot on the y-axis. The properties to visualize can be dynamically select based on the returned values of your Cypher query.
75-
76-
77-
The color of a bar chart can be customized by setting the following value in the Cypher Parameters:
78-
```
79-
{
80-
"color": "red"
81-
}
82-
```
83-
#### Line Charts
84-
Line charts can be used to visualize the relationship between two numeric variables. Just like the bar chart, you’ll select two of the result properties to be plotted on the x and y axis.
85-
86-
The `Cypher Parameters` setting can be used to customize several style properties of your line chart. Add the following parameters, to create a red curved line chart, with a line width of 4 and a marker radius of 4:
87-
```
88-
{
89-
"curve": true,
90-
"radius": 4,
91-
"color": "red",
92-
"width": 4
93-
}
94-
```
95-
96-
#### JSON View
97-
The JSON view report will render the raw JSON response received by the Neo4j driver.
98-
JSON output reports are mainly intended as a debugging tool, if you need to inspect the direct data retrieved from Neo4j.
99-
100-
#### Markdown
101-
Markdown reports can be used to render static text and images in your reports.
102-
You'll likely use this type of reports to add some comments/interpretations of your reports for the user to see.
103-
104-
Unlike all other report types, markdown reports do not use Cypher input.
105-
Instead, the text/images you want to show need to be specified in the markdown format. This [page](https://www.markdownguide.org/basic-syntax/) contains a nice overview of the required syntax.
106-
107-
108-
### Dashboard Layout
109-
The web-app uses a free-flowing grid to organize your reports as cards. This grid layout has a page width of 12, and a standard card size of 4.
110-
Cards can be resized and moved around if needed.
111-
On mobile displays, small cards will scale to the full width of the screen.
112-
113-
Differently sized cards will sit together and try to take up available space in the dashboard. The image below illustrates how cards may sit together.
114-
115-
116-
117-
![Grid layout](./public/layout.png)
118-
119-
The Materialize CSS framework is used to render the cards in a grid layout. For more information on grid layouts in Materialize, check out this link:
120-
https://materializecss.com/grid.html
121-
122-
> The title of the dashboard can be edited by clicking the page header.
123-
124-
### Saving/Loading Reports
125-
By default, your latest dashboard is cached in the browser.
126-
127-
NeoDash al supports exporting and importing dashboards as a plain JSON file.
128-
This allows you to store / version control dashboards with a project if needed.
129-
130-
#### Saving
131-
Reports can be exported as JSON by clicking the 'Load/Export' button at the top right of the screen.
132-
133-
#### Loading
134-
To load an existing dashboard, click the 'Load/Export' button at the top right of the screen. Clear the existing JSON, and paste your loaded dashboard into the box.
135-
Click the green 'Save' button to proceed.
136-
137-
#### Working with dashboard JSON files
138-
Each dashboard JSON file will have the following structure:
139-
```
140-
{
141-
"title": "My Dashboard",
142-
"version": "1.0",
143-
"editable": true,
144-
"reports": [
145-
...
146-
]
147-
}
148-
```
149-
Here, the value of reports will contain an array of JSON objects, where each object represents a report.
150-
Save files shouldn't be manipulated directly (unless you know what you're doing).
151-
152-
153-
> Tip: by setting "editable" to false, your dashboard will be rendered in 'view only' mode, restricting users from changing report titles / editing the settings.
154-
155-
### Further examples
156-
Check out the NeoDash release blog post here:
157-
https://nielsdejong.nl/neo4j%20projects/2020/11/16/neodash.html
158-
159-
## Developer Guide
160-
NeoDash is built with React, and uses the `npm` package manager.
161-
When running NeoDash, ensure that the `PUBLIC_URL` environment variable is set to where you are hosting the application.
162-
Dependencies are specified in `package.json`.
163-
164-
> NeoDash is not intended to be used in a production setting by one or more users. [Get in touch](mailto:[email protected]) if you need help building a production-grade Neo4j front-end.
165-
### Install
166-
NeoDash can be installed using npm:
167-
168-
`npm install`
169-
170-
### Run in development mode
171-
Running the application in development mode:
172-
173-
`npm start`
174-
175-
### Build
176-
Building the application:
177-
178-
`npm run-script build`

doc/developer-guide.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# NeoDash Developer Guide
2+
> This guide is a work in progress. it is still under active development. If you have any questions, reach out to [email protected].
3+
4+
This document contains information on the following topics:
5+
- Running NeoDash
6+
- Extending NeoDash
7+
- Contributing
8+
9+
10+
## Running NeoDash
11+
> If you let end-users access NeoDash, make sure you let them use a read-only account.
12+
> Be aware that users can run any Cypher query, so only give access to users you trust.
13+
14+
There are three options for running NeoDash:
15+
- As a graph app (From Neo4j Desktop)
16+
- As a publicly accessible website
17+
- As a web-app in your own hosted environment
18+
19+
#### 1. From Neo4j Desktop
20+
If you're using Neo4j Desktop, you can install NeoDash from the [Graph App Gallery](when).
21+
NeoDash will automatically connect to your active database.
22+
23+
#### 2. Online
24+
The latest version of NeoDash will always be available at https://nielsdejong.nl/neodash.
25+
Your database credentials will only be cached in your browser.
26+
27+
#### 3. As a web app in your own hosted environment
28+
To build the application for running in your own environment, take the following steps:
29+
30+
- clone or download this repository.
31+
- Install `npm`.
32+
- navigate to the directory of the repository.
33+
- run `npm install` to install dependencies.
34+
- run `npm run-script build` to build the application. The app will be built to the `dist` folder.
35+
- Use your favourite web server (`apache` or `nginx`) to host the `dist` folder.
36+
37+
Ensure that the `PUBLIC_URL` environment variable is set to where you are hosting the application.
38+
39+
40+
## Extending NeoDash
41+
NeoDash can be extended to support other visualizations and report types.
42+
This section will provide some instructions on how to extend the application to fit your needs.
43+
44+
### Adding a new report type
45+
#### 1. Clone and run the application in development mode
46+
NeoDash is built with React, and uses the `npm` package manager.
47+
Dependencies are specified in `package.json`.
48+
49+
NeoDash can be installed using npm:
50+
- `npm install`
51+
52+
Running the application in development mode:
53+
- `npm start`
54+
55+
56+
57+
#### 2. Adding the new report type
58+
59+
#### 3. Making the new type selectable
60+
61+
#### 4. Build the application
62+
63+
## Contributing
64+
If you're extending the application, please consider contributing to the repository by creating a [pull request](https://github.com/nielsdejong/neodash/pulls).
File renamed without changes.
File renamed without changes.
File renamed without changes.

doc/user-guide.md

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# NeoDash User Guide
2+
> This guide is a work in progress. it is still under active development. If you have any questions, reach out to [email protected].
3+
4+
## Reports
5+
NeoDash dashboards are a collection of reports - each report is a view of your graph.
6+
The current version of NeoDash supports six types of reports:
7+
8+
- Table views
9+
- Graph visualizations
10+
- Bar charts
11+
- Line charts
12+
- JSON output
13+
- Markdown Reports
14+
15+
Reports sit in resizable containers - _cards_.
16+
A report is always populated by a single Cypher query. An example table report is shown below:
17+
18+
![NeoDash Report](./img/neodash-table.png)
19+
20+
The following rule of thumb holds for reports:
21+
- one report = one card = one Cypher query
22+
23+
### Report Settings
24+
Each report has a settings screen that can be accessed by clicking the (⋮) icon on the top right of the card.
25+
In the settings menu, the following can be defined:
26+
- The Cypher query populating the report,
27+
- The type of report,
28+
- The size of the report,
29+
- [Parameters](https://neo4j.com/docs/cypher-manual/current/syntax/parameters/) for your Cypher query,
30+
- A refresh interval for the report.
31+
32+
> A title of a report can be edited directly, without opening the settings. Just click the header of the report (which by default reads 'Report name...').
33+
34+
An example report settings view is shown below.
35+
36+
![NeoDash Settings](./img/neodash-editor.png)
37+
38+
While having the report settings open, the report can be moved around or deleted. To close the settings, click the 'save' icon.
39+
### Tables
40+
The table view renders Neo4j native types in a standard table format. Columns are ordered in the order they are returned by Neo4j, column names are set to the names of your returned variables. [Structural data types](https://neo4j.com/docs/cypher-manual/current/syntax/values/#structural-types) such as nodes, relationships or paths can also be rendered in a table.
41+
42+
The colors of the nodes and relationships in the table can be set using the Cypher Parameters settings. For example, specifying:
43+
```
44+
{
45+
"nodeColor": "orange",
46+
"relColor": "black"
47+
}
48+
```
49+
will draw the nodes in the table as orange, and the relationships as black.
50+
51+
### Graph Visualizations
52+
For almost all graph use-cases, a force-directed graph is your go-to choice of visualization. In NeoDash, you’ll be able to visualize your graph similar to the Neo4j browser: for each node label you choose a style and the property to be displayed. Any query returning nodes, relationships, or paths can be visualized as a graph.
53+
> Doing some graph exploration? Clicking a node will show all properties of that node.
54+
55+
Some style properties of the visualization can be changed by passing in extra parameters to your Cypher query. To use custom colors for the graph nodes, add the following to the Cypher Parameters in the settings:
56+
```
57+
{
58+
"nodeColors": ["navy","green","red"]
59+
}
60+
```
61+
62+
### Bar Charts
63+
Bar charts can be used to visualize categorical data. Naturally, a bar chart will need a numeric value to plot on the y-axis. The properties to visualize can be dynamically select based on the returned values of your Cypher query.
64+
65+
66+
The color of a bar chart can be customized by setting the following value in the Cypher Parameters:
67+
```
68+
{
69+
"color": "red"
70+
}
71+
```
72+
### Line Charts
73+
Line charts can be used to visualize the relationship between two numeric variables. Just like the bar chart, you’ll select two of the result properties to be plotted on the x and y axis.
74+
75+
The `Cypher Parameters` setting can be used to customize several style properties of your line chart. Add the following parameters, to create a red curved line chart, with a line width of 4 and a marker radius of 4:
76+
```
77+
{
78+
"curve": true,
79+
"radius": 4,
80+
"color": "red",
81+
"width": 4
82+
}
83+
```
84+
85+
### JSON View
86+
The JSON view report will render the raw JSON response received by the Neo4j driver.
87+
JSON output reports are mainly intended as a debugging tool, if you need to inspect the direct data retrieved from Neo4j.
88+
89+
### Markdown
90+
Markdown reports can be used to render static text and images in your reports.
91+
You'll likely use this type of reports to add some comments/interpretations of your reports for the user to see.
92+
93+
Unlike all other report types, markdown reports do not use Cypher input.
94+
Instead, the text/images you want to show need to be specified in the markdown format. This [page](https://www.markdownguide.org/basic-syntax/) contains a nice overview of the required syntax.
95+
96+
97+
## Dashboard Layout
98+
The web-app uses a free-flowing grid to organize your reports as cards. This grid layout has a page width of 12, and a standard card size of 4.
99+
Cards can be resized and moved around if needed.
100+
On mobile displays, small cards will scale to the full width of the screen.
101+
102+
Differently sized cards will sit together and try to take up available space in the dashboard. The image below illustrates how cards may sit together.
103+
104+
105+
106+
![Grid layout](./img/layout.png)
107+
108+
The Materialize CSS framework is used to render the cards in a grid layout. For more information on grid layouts in Materialize, check out this link:
109+
https://materializecss.com/grid.html
110+
111+
> The title of the dashboard can be edited by clicking the page header.
112+
113+
## Saving/Loading Reports
114+
By default, your latest dashboard is cached in the browser.
115+
116+
NeoDash al supports exporting and importing dashboards as a plain JSON file.
117+
This allows you to store / version control dashboards with a project if needed.
118+
119+
### Saving
120+
Reports can be exported as JSON by clicking the 'Load/Export' button at the top right of the screen.
121+
122+
### Loading
123+
To load an existing dashboard, click the 'Load/Export' button at the top right of the screen. Clear the existing JSON, and paste your loaded dashboard into the box.
124+
Click the green 'Save' button to proceed.
125+
126+
### Working with dashboard JSON files
127+
Each dashboard JSON file will have the following structure:
128+
```
129+
{
130+
"title": "My Dashboard",
131+
"version": "1.0",
132+
"editable": true,
133+
"reports": [
134+
...
135+
]
136+
}
137+
```
138+
Here, the value of reports will contain an array of JSON objects, where each object represents a report.
139+
Save files shouldn't be manipulated directly (unless you know what you're doing).
140+
141+
142+
> Tip: by setting "editable" to false, your dashboard will be rendered in 'view only' mode, restricting users from changing report titles / editing the settings.
143+
144+
## Further examples
145+
Check out the NeoDash release blog post here:
146+
https://nielsdejong.nl/neo4j%20projects/2020/11/16/neodash.html

0 commit comments

Comments
 (0)