Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 2.66 KB

README.md

File metadata and controls

55 lines (35 loc) · 2.66 KB

OdoViz: React Client

This repo contains the reactive web-based OdoViz rich client front-end operated alongside a thin server that serves the dataset files. It's loosely coupled design allows you to easily use it with your own server.

Quick Start

The instructions given in the parent directory already includes as part of it building the client front-end app into build directory.

However, if you want to build and run the client separately

cd <to_this_dir>
yarn install
yarn run build

The app is fully functional offline after the initial page load, except for the features that inherently require internet e.g. maps. The build process creates static files that can be accessed by directly opening build/index.html in the browser. The app will still require dataset files to be served.

Serving dataset files

The web-client expect the dataset files to be downloadable at /files, with an autoindex JSON API conforming to NGINX JSON autoindex output standards for browsing the data directories at /files/<path>.

Setting up with a Custom Server

  1. Build the app
  2. Make the dataset files browsable and downloadable
  3. Static-serve build directory containing the app from your server.

Setting up a Custom Parser

OdoViz supports customizing existing parsers and allows adding parsers for new datasets with ease. For more details, please refer to the parsers page.

Developer Instructions

Dev Server

# keep the server running in another terminal / background
cd <to_this_dir>
yarn install
yarn start

This should start a HMR dev server on http://localhost:3000. File requests will be proxied to the server running at http://localhost:3001, check package.json to edit this setting.

The changes made to the client code will now reflect on the dev server on-the-go.

If you would like the changes to be made public on this repo, please follow the instructions given in CONTRIBUTING.md. Contributions are very welcome!

Extensions

More information about extensions such as Analyze Distances Extension and Analyze Locations Extension are provided in the respective extension source code directories. You can add new extensions to src/extensions/extensions.js copying the same structure of the existing extensions.