Skip to content

carsonefv/lantern-ui

 
 

Repository files navigation

lantern-ui

Build Status

screenshot-welcome

UI for Lantern.

A live demo is deployed to http://lantern-ui.jit.su/app/index.html running against the bundled mock server, which simulates a real Lantern backend. The real backend serves lantern-ui only over localhost, where minification, concatenation, and other speedups appropriate for remotely hosted files are not necessary. Please keep that in mind when accessing the public demo.

Overview

This is the repository for the UI of Lantern. It is maintained as a separate repository to facilitate development. This code can be run independently of Lantern's Java backend with a lightweight node.js http server using Faye to implement Lantern's bayeux server.

See SPECS.md for specifications of the state and the state transitions developed for the UI (work in progress).

Getting Started

Install required dependencies (sudo as necessary):

  • Node.js: brew install node or equivalent for your system

For working on the stylesheets:

Tell compass to watch for changes in the sass stylesheets and automatically compile them into css in the directory specified by the compass config file (config/compass.rb):

$ scripts/start-compass.sh &
>>> Compass is watching for changes. Press Ctrl-C to Stop.

Start up the Node.js mock server simulating the Lantern backend:

$ scripts/web-server.js
Bayeux-attached http server running at...

The UI should now be available at http://localhost:8000/app/index.html

To skip the setup process and go straight to an already set up instance, run:

$ scripts/web-server.js --skip-setup

You should then see something like this when you load the app:

screenshot-vis

Running tests

Globally install required Node.js packages (sudo as necessary):

npm install -g karma

Check out .travis.yml and referenced files for examples of running the unit tests and end-to-end tests.

TODO: expand this

Further Reading

The UI is implemented as an AngularJS app. Using the AngularJS Batarang Chrome extension (especially the performance tab) is highly recommended for development. As recommended, this repo was started with the angular-seed. The scripts/web-server.js script has been modified to attach a bayeux server and a work-in-progress http API to simulate the Lantern backend.

Specs are currently being developed to represent the full state of the application at any given time, as well as transitions between states. The specs are being developed in parallel to the UI and are currently changing frequently to meet its needs.

Packages

No packages published

Languages

  • JavaScript 99.9%
  • Other 0.1%