Skip to content

Commit

Permalink
Update docs and remove stale Vagrantfile
Browse files Browse the repository at this point in the history
  • Loading branch information
bijanvakili committed May 17, 2020
1 parent 91a88e9 commit c6927c0
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 213 deletions.
88 changes: 51 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,60 +21,68 @@ them can be overwhelming.
- Provides reproducible navigation via:
- Clicking on vertices within the current view
- Type ahead search for vertex properties
- HTML5 SVG display for easier export and scaling
- [Generalized JSON format](./docs/data_format.md) that is not application specific
- HTML5 SVG display scaling
- Cayley Graph database for incremental traversal of large graphs
- GraphQL API for vertex queries

## Graph Data
## Requirements

Currently, only the following project creates valid RDF graphs for this project:
You will need to install the following locally:

- [django_codecrumb](https://github.com/bijanvakili/django-codecrumb)
- [Docker](https://www.docker.com/) v19+
- [node.js](https://nodejs.org/) v6+
- [yarn](https://yarnpkg.com/en/) v0.24+

All graph data is stored in Cayley DB. This project runs Cayley in a Docker container.
## Graph Database

## Configuration
### Graph Data

Edit `etc/render_settings.json` to specify how to displays your graph data
Currently, only the following project creates valid RDF graphs for this project:

```json
{
"startVertexId": "<SHA1 vertex ID hash>",
"vertexColumnPageSize": 8,
"images": [
...
]
}
```
- [django_codecrumb](https://github.com/bijanvakili/django-codecrumb)

All graph data is stored in Cayley DB. This project runs Cayley in a Docker container.

## Load Data
### Load Data

NOTE: Database must be _shut down_.
NOTE: Database must be initially _shut down_.

Copy your Cayley DB import file into the `./data` folder (e.g. `filename.nq.gz`) and
run the following Docker command:

```bash
docker-compose run --rm --entrypoint "cayley load -i /import/filename.nq.gz" db
```
docker-compose run --rm --entrypoint "cayley load -i /import/filename.nq.gz" db

## Volume Inspection
### Volume Inspection

To or manipulate the Cayley DB files, run the following:

```bash
docker-compose run --rm shell
```
docker-compose run --rm shell

## Running locally
### Running

You'll only need to install the following:
You can start the Cayley graph database using Docker as follows:

- [node.js](https://nodejs.org/) v6+
- [yarn](https://yarnpkg.com/en/) v0.24+
docker-compose up -d db

## Web Application

### Configuration

Edit `etc/render_settings.json` to specify how to displays your graph data

```json
{
"startVertexId": "<SHA1 vertex ID hash>",
"vertexColumnPageSize": 8,
"images": [
...
]
}
```

### Building

Run the following to install all the necessary build dependencies using `yarn` and runtime dependencies using [`webpack`](https://webpack.github.io/).
Run the following to install all the necessary build dependencies using `yarn`:

yarn install

Expand All @@ -86,12 +94,14 @@ Run the following to build and bundle all Javascript code into the `./dist` subd

Then run the following to run the web server:

yarn run web
GRAPHWALKER_RENDER_SETTINGS=etc/render_settings.json yarn run web

Finally, open the following URL in your web browser:

open http://localhost:9080/

## Local Development

### Running a Test server

[tmux](https://github.com/tmux/tmux/wiki) is required to run a test server using watch mode on all source files:
Expand All @@ -100,15 +110,19 @@ Finally, open the following URL in your web browser:

This will run multiple watch windows for both client and server.

### Local Development
### git hooks

Set up the git pre-commit hook as follows:

```sh
ln -s ../../scripts/pre-commit .git/hooks/pre-commit
```
ln -s ../../scripts/pre-commit .git/hooks/pre-commit

### GraphQL testing

Open up the following to use the Apollo GraphQL playground, an interactive and in-browser GraphQL IDE

open http://localhost:9080/graphql

#### Cleanup
## Cleanup

To remove build files, run the following:

Expand Down
65 changes: 0 additions & 65 deletions Vagrantfile

This file was deleted.

89 changes: 0 additions & 89 deletions docs/data_format.md

This file was deleted.

62 changes: 40 additions & 22 deletions docs/references.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,52 @@
# Quick References
# Technology Stack References

## Language and Platform
## Languages

* [Typescript](https://www.typescriptlang.org/docs)
* [Javascript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
* [node.js](https://nodejs.org/)
* [less](http://lesscss.org/)
- [Typescript](https://www.typescriptlang.org/docs)
- [Javascript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
- [less](http://lesscss.org/)
- [GraphQL](https://graphql.org/graphql-js/graphql/)

## UI Libraries
## Database

* [React](https://facebook.github.io/react/docs/react-api.html)
* [Bootstrap](https://getbootstrap.com/)
* [d3.js](https://d3js.org/)
* [Redux](https://redux.js.org/)
* [react-redux](https://github.com/reactjs/react-redux)
* [redux-thunk](https://github.com/gaearon/redux-thunk)
* [reselect](https://github.com/reduxjs/reselect)
* [typesafe-actions](https://github.com/piotrwitek/typesafe-actions)
- [Cayley](https://cayley.gitbook.io/cayley/)

## Utility Libraries
## Backend

* [lodash v4](https://lodash.com/)
* [classnames](https://jedwatson.github.io/classnames/)
- [node.js](https://nodejs.org/)
- [Apollo Server](https://www.apollographql.com/docs/apollo-server/)
- [express](https://expressjs.com/)

## Frontend

- [React](https://facebook.github.io/react/docs/react-api.html)
- [Bootstrap](https://getbootstrap.com/)
- [d3.js](https://d3js.org/)
- [Redux](https://redux.js.org/)
- [react-redux](https://github.com/reactjs/react-redux)
- [redux-thunk](https://github.com/gaearon/redux-thunk)
- [reselect](https://github.com/reduxjs/reselect)
- [typesafe-actions](https://github.com/piotrwitek/typesafe-actions)
- [Apollo React Client](https://www.apollographql.com/docs/react/) (a.k.a. Apollo Boost)

## Utility

- [lodash v4](https://lodash.com/)
- [classnames](https://jedwatson.github.io/classnames/)

## Development Tools

* [tslint](https://palantir.github.io/tslint/)
* [yarn](https://yarnpkg.com/en/docs/cli/)
* [webpack](https://webpack.js.org/configuration/)
- [markdownlint](https://github.com/DavidAnson/markdownlint)
- [tslint](https://palantir.github.io/tslint/)
- [prettier](https://prettier.io/)
- [yarn](https://yarnpkg.com/en/docs/cli/)
- [webpack](https://webpack.js.org/configuration/)
- [grunt](https://gruntjs.com/)
- [graphql-codegen](https://graphql-code-generator.com/)
- [tmux](https://github.com/tmux/tmux/wiki)
- [nodemon](https://nodemon.io/)
- [busybox](https://busybox.net/)

## Theory

* [Graph Terminology](http://btechsmartclass.com/DS/U3_T8.html)
- [Graph Terminology](http://btechsmartclass.com/DS/U3_T8.html)

0 comments on commit c6927c0

Please sign in to comment.