critocrito / ncube

Data exploration and verification for the human rights.
https://sugarcubetools.net
GNU General Public License v3.0
8 stars 2 forks source link

Ncube

Enter the hypercube.

![Ncube Screenshot](https://raw.githubusercontent.com/critocrito/ncube/main/resources/screenshots/ncube.png) [Installation](#installation) • [Documentation](#documentation) • [Ncube Discovery](#ncube-discovery) • [Development](#development) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/critocrito/ncube/Build%20Status?style=flat-square) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/critocrito/ncube?color=orange&style=flat-square) ![GitHub](https://img.shields.io/github/license/critocrito/ncube?color=blue&style=flat-square)

Ncube supports human rights defenders and investigative journalists to conduct data based investigations. It helps to develop compelling stories which expose the misuse of power and human rights abuses. It is a graphical desktop and cross-platform application that turns quantitative data into qualitative data. All the features of Ncube have one purpose: produce a set of verified data. Ncube's features around the preservation, exploration and verification of data all serve this single goal.

Read more about Ncube in its introduction blog post. To get help about Ncube and data investigation methodologies, or to suggest new use cases and functionality, feel free to post on the Sugarcube Tools community forum.

This project is in an early stage. Some features are not implemented yet.

Installation

You can find installation instructions for Linux and macOS on the Sugarcube Tools website.

From Source

The following prerequesites are required to build Ncube from source:

Verify that all build dependencies are satisfied.

$ cargo --version
rustc 1.42.0 (b8cedc004 2020-03-09)

$ node --version
v12.16.1

$ yarn --version
1.22.0

$ make --version
GNU Make 3.81

and if you are using OSX, verify xcode-select as well.

$ xcode-select --version
xcode-select version 2373.

Once all the dependencies are in place you can choose one of the following build targets. The build target that you most likely want can be simply build by running make:

There are more specialized build targets as well:

If something goes wrong or you want to make a clean build from scratch clean the old builds first:

Documentation

All documentation can be found in the doc directory.

The HTTP endpoints of ncubed are described in the HTTP API documentation.

The account authorization for remote workspaces is described in a dedicated document.

The high level architecture of Ncube is described with a series of diagrams. To re-generate the architecture diagrams install fc4 and regenerate the images:

fc4 -fsr doc/diagrams

Ncube Discovery

Ncube is accompanied by a browser extension for the Firefox browser and for the Google Chrome browser for a smoother investigation workflow. The browser extension allows to store URL from the browser as sources directly in Ncube.

Discovery Browser Extension Screenshot

Installation

The browser extension communicates with the Ncube application that has to run on your local computer. Before using the browser extension see above for ways to install the desktop version of Ncube. The discovery plugin only works while Ncube is running.

TODO: Publish extension to AMO and provide a download link.

Development

The following instructions are to test and develop the browser extension locally. Make sure to install all required dependencies.

yarn install

To build the full extension and package it up simply run:

make pkg-web-ext

This will produce the package in the pkgs directory.

To develop locally run compilation of the web extension in one terminal:

yarn web-ext:watch

In another terminal start a development version of Firefox that contains the browser extension:

yarn web-ext

The source code of the browser extension and Ncube is shared. The entry point for the discovery source code can be found in src/ts/discovery.tsx.

Development

Ncube consists of several parts:

See the installation from source section to setup all the build dependencies.

Since the backend delivers the frontend using it's own HTTP server, the frontend assets must be available when compiling the backend. there is an open issue to resolve this but until then before compiling the backend you need to run the following once, and everytime you clean the target directory.:

make ui
make workspace

Open a terminal in the project root and start the backend:

cargo run --bin ncubed

In a different terminal start the webpack development server to build the UI:

yarn start

This will open a browser at http://localhost:8080 that provides the UI.

Tests

The tests can be run by executing the following command:

make test

License

All code is copyrighted by christo@cryptodrunks.net and licensed under the GPL3.

Support

Ncube was developed with the support of: