1 | <p align="center"><a href="https://github.com/Nhogs/popoto" target="_blank"><img alt="popoto logo" width="301" src="https://raw.githubusercontent.com/wiki/Nhogs/popoto/img/logo.png"></a></p>
|
2 |
|
3 | [![CI](https://github.com/nhogs/popoto/actions/workflows/ci.yml/badge.svg)](https://github.com/Nhogs/popoto/actions/workflows/ci.yml)
|
4 | [![npm version](https://img.shields.io/npm/v/popoto.svg)](https://www.npmjs.com/package/popoto)
|
5 | [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
|
6 | [![Maintainability](https://api.codeclimate.com/v1/badges/d00736e10d4c630c2010/maintainability)](https://codeclimate.com/github/Nhogs/popoto/maintainability)
|
7 | [![Test Coverage](https://api.codeclimate.com/v1/badges/d00736e10d4c630c2010/test_coverage)](https://codeclimate.com/github/Nhogs/popoto/test_coverage)
|
8 |
|
9 | [Popoto.js](https://github.com/Nhogs/popoto) is a JavaScript library built with [D3.js](https://d3js.org) designed to create interactive and customizable visual query builder for [Neo4j](https://neo4j.com) graph databases.
|
10 |
|
11 | The graph queries are translated into Cypher and run on the database. Popoto also helps to display and customize the results.
|
12 |
|
13 | An application is composed of various components, each one can be included independently anywhere in a web application.
|
14 | It just needs to be bound to a container ID in an HTML page and the content will be generated automatically.
|
15 |
|
16 | A common example application contains the following components:
|
17 |
|
18 | <p align="center"><a href="https://github.com/Nhogs/popoto/wiki"><img src="https://raw.githubusercontent.com/wiki/Nhogs/popoto/img/main-eclate.png"></a></p>
|
19 |
|
20 | <table width="100%">
|
21 | <tr valign="middle">
|
22 | <td width="50px" align="center"><a href="https://github.com/Nhogs/popoto/wiki/Graph"><img src="https://raw.githubusercontent.com/wiki/Nhogs/popoto/img/count/1.png"></a></td>
|
23 | <td width="*"><a href="https://github.com/Nhogs/popoto/wiki/Graph"><b>Graph</b></a> component is an interactive interface designed to build queries for non technical users, the graph is made of selectable nodes connected to each other by links.</td>
|
24 | </tr>
|
25 | <tr valign="middle">
|
26 | <td width="50px" align="center"><a href="https://github.com/Nhogs/popoto/wiki/Toolbar"><img src="https://raw.githubusercontent.com/wiki/Nhogs/popoto/img/count/2.png"></a></td>
|
27 | <td width="*"><a href="https://github.com/Nhogs/popoto/wiki/Toolbar"><b>Toolbar</b></a> is a list of actions available in the graph container.</td>
|
28 | </tr>
|
29 | <tr valign="middle">
|
30 | <td width="50px" align="center"><a href="https://github.com/Nhogs/popoto/wiki/Taxonomy"><img src="https://raw.githubusercontent.com/wiki/Nhogs/popoto/img/count/3.png"></a></td>
|
31 | <td width="*"><a href="https://github.com/Nhogs/popoto/wiki/Taxonomy"><b>Taxonomy</b></a> container contains the list of searchable labels in the database.</td>
|
32 | </tr>
|
33 | <tr valign="middle">
|
34 | <td width="50px" align="center"><a href="https://github.com/Nhogs/popoto/wiki/Query"><img src="https://raw.githubusercontent.com/wiki/Nhogs/popoto/img/count/4.png"></a></td>
|
35 | <td width="*"><a href="https://github.com/Nhogs/popoto/wiki/Query"><b>Query</b></a> viewers container shows different representation of the corresponding query defined in the Graph component.</td>
|
36 | </tr>
|
37 | <tr valign="middle">
|
38 | <td width="50px" align="center"><a href="https://github.com/Nhogs/popoto/wiki/Result"><img src="https://raw.githubusercontent.com/wiki/Nhogs/popoto/img/count/5.png"></a></td>
|
39 | <td width="*"><a href="https://github.com/Nhogs/popoto/wiki/Result"><b>Result</b></a> container displays the results matching the graph query.</td>
|
40 | </tr>
|
41 | </table>
|
42 |
|
43 | ## Resources
|
44 | * [Examples](https://github.com/Nhogs/popoto-examples)
|
45 | * [Wiki](https://github.com/Nhogs/popoto/wiki)
|
46 |
|
47 | ## Install
|
48 | For NPM, `npm install popoto` For Yarn, `yarn add popoto`.
|
49 |
|
50 | [![NPM](https://nodei.co/npm/popoto.png?compact=true)](https://www.npmjs.com/package/popoto)
|
51 |
|
52 | Otherwise, download the [latest release](https://github.com/Nhogs/popoto/releases/latest).
|
53 |
|
54 | You can also load directly from [unpkg](https://unpkg.com/popoto/) or [jsDelivr](https://www.jsdelivr.com/package/npm/popoto)
|
55 |
|
56 | Example:
|
57 | ```html
|
58 | <!-- Add default CSS reference -->
|
59 | <link rel="stylesheet" href="https://unpkg.com/popoto/dist/popoto.min.css">
|
60 | <!-- Or -->
|
61 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/popoto/dist/popoto.min.css">
|
62 | ```
|
63 |
|
64 | ```html
|
65 | <!-- Add Popoto script reference, will default to popoto.min.js -->
|
66 | <script src="https://unpkg.com/popoto"></script>
|
67 | <!-- Or -->
|
68 | <script src="https://cdn.jsdelivr.net/npm/popoto/dist/popoto.min.js"></script>
|
69 | ```
|
70 |
|
71 | For source version:
|
72 | ```html
|
73 | <!-- Add Popoto script reference -->
|
74 | <script src="https://unpkg.com/popoto/dist/popoto.js"></script>
|
75 | <!-- Or -->
|
76 | <script src="https://cdn.jsdelivr.net/npm/popoto/dist/popoto.js"></script>
|
77 | ```
|
78 |
|
79 | ## Quick start guide:
|
80 | - Edit the "index.html" file, by default this application is based on Neo4j movie graph example.
|
81 | - Create your driver instance following Neo4j developer guide: https://neo4j.com/developer/javascript/
|
82 | ```javascript
|
83 | const driver = neo4j.driver(
|
84 | "neo4j://dff437fa.databases.neo4j.io", // Unencrypted
|
85 | //"neo4j+s://dff437fa.databases.neo4j.io", //Encrypted with Full Certificate
|
86 | neo4j.auth.basic("popoto", "popotopassword"),
|
87 | //{disableLosslessIntegers: true} // Enabling native numbers
|
88 | );
|
89 | ```
|
90 | - Change the value of `popoto.runner.DRIVER = driver` to your running server driver instance.
|
91 | - If needed you can change the default session creation to add parameters:
|
92 | ```javascript
|
93 | popoto.runner.createSession = function () {
|
94 | return runner.DRIVER.session({defaultAccessMode: "READ"})
|
95 | };
|
96 | ```
|
97 | - Update the list of labels defined in "popoto.provider.node.Provider" definition. All node labels to display in the graph should be added in this list.
|
98 | - Add any other customization you need in this file. See [Nhogs/popoto-examples](https://github.com/Nhogs/popoto-examples) for detailed configuration examples.
|
99 | - Open index.html file in your preferred web browser to see the result.
|
100 | - Click on a node to display and select a value, click on relationship arcs around nodes to navigate in relations uses right click to remove a value and ctrl+click to negate a node. See all [Basic actions](https://github.com/Nhogs/popoto/wiki/Basic-action) for details
|
101 |
|
102 | See an explained example page source in [Getting started](https://github.com/Nhogs/popoto/wiki/Getting-started).
|
103 |
|
104 | ## License
|
105 | [GPL-3.0](https://www.gnu.org/licenses/gpl-3.0) |
\ | No newline at end of file |