From 29206d373a0ba081f041f789ccfb87b7ef89a1d9 Mon Sep 17 00:00:00 2001 From: Yury Emelyanov Date: Tue, 24 Jan 2017 12:38:49 +0300 Subject: [PATCH] Documentation for building and using the library --- README.md | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 70 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ce998fa..941821b 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,76 @@ # iKnowGraphBrowser -Build/run steps: +iKnowGraphBrowser is a software library that helps you visualize graphs coming from iKnow REST endpoint. +User can apply filters to graph, select nodes, export them to CSV file. + +## Preparing to work with: + +This will get you prepared to either running demo version of iKnowGraphBrowser or modifying and building it. 1. Get node.js version 4+ and npm version 3+ for your OS 2. Clone this repository 3. Resolve dependencies with `npm install` -4. Set IKNOW_ENDPOINT and IKNOW_AUTH environmental variables or edit end of `webpack.demo.config.js` to specify what iKnow REST endpoint to use. -5. Run `npm run demo` to build application and run proxy server -6. Point your browser to `http://localhost:5000` to view UI + +## Running demo + +This will run the demo with UI to select iKnow data scenario and ability to select seed word. +Data will be fethed from iKnow REST endpoint you specify via enviromental variables. + +1. Set IKNOW_ENDPOINT and IKNOW_AUTH environmental variables or edit end of `webpack.demo.config.js` to specify what iKnow REST endpoint to use. +2. Run `npm run demo` to build application and run proxy server. This will launch webpack build process and start development server. +3. Point your browser to `http://localhost:5000` to view UI + + +## Building library + +Library is built using `npm run build` which produce dist/iKnowBrowser.js file with all the JS dependencies of the project. + +## Using library + +This is minimal html code to run the library: + +``` + + + + + iKnowGraphBrowser Demo + + + + + + + +
+ + + + + +``` + +## Architecture + +Library is written in JavaScript ES6 language, it uses modules and webpack to build library bundle with all dependencies. +UI of the library is written using React framework, graph visualization used Linkurious build of sigma.js. + +Dependencies: + +* file-saver - cross-browser support of launching `Save As` dialog for exporting JSON file +* linkuroius - sigma.js graph visualization library enhanced with numerous plugins, some of them are used +* lodash - general purpose algorithmic/helper library +* react - library by Facebook used to create UI +* react-dom - react library helper +* bootstrap - basic styles/some UI components. Not a strict dependency, could be removed if nessesary.