Sign inSign up

akiel/lens-app

By akiel

•Updated over 10 years ago

Lens is a tool for online analytical data processing in medical studies.

Image
0

1.3K

akiel/lens-app repository overview

Please start at the Top-Level Lens Repo⁠.

⁠Lens App

Build Status Docker Pulls

The Lens App is a static ClojureScript frontend single page app using various backend services. Please see section Architecture⁠ for more information.

⁠Build

Currently a complete compilation including a production optimized ClojureScript to JavaScript compilation works using:

lein with-profile production compile :all

⁠Test

lein cljsbuild test

⁠Run Lens App with Docker

There is an automated build of Lens App on Docker Hub⁠ which builds a container running a Nginx⁠ web server which delivers the static files of the Lens App web application and proxies the backend services.

The container exposes port 80 and needs three environment variables

Start the container with the following command

docker run -p 80:80 -e AUTH_HOST=<...> -e WORKBOOK_HOST=<...> -e WAREHOUSE_HOST=<...> akiel/lens-app

⁠Develop

Lens App uses figwheel⁠

rlwrap lein figwheel

Currently I get many warnings if I start figwheel without doing a lein clean first.

You need to have the five backend services of Lens running under the URIs specified in the resources/public/index-dev.html. Currently this is

var lensAuth = "http://localhost:5001/auth";
var lensWorkbook = "http://localhost:5002/wb";
var lensWarehouse = "http://localhost:5003/wh";
var lensReport = "http://192.168.99.100:3001/report";
var lensAcrf = "http://192.168.99.100:3000/acrf";

⁠Architecture

Lens as a system consists of one frontend web application and various backend services and so follows the style of a microservice architecture⁠.

The frontend application Lens App is build after the principles described in Static Apps⁠. Lens App is written in ClojureScript⁠ which is compiled to JavaScript at build time. After loading Lens App in the browser, it talks to various backend services through AJAX.

⁠Authentication and Authorization

Lens backend services use token-based authentication. Bearer tokens⁠ are used. The tokens are issued by the Lens Auth⁠ service.

http://www.staticapps.org/articles/authentication-and-authorization⁠

⁠Frontend State Management and DOM Update

TODO: React, Om

⁠License

Copyright © 2015 Alexander Kiel

Distributed under the Eclipse Public License, the same as Clojure.

Tag summary

Content type

Image

Digest

sha256:da44b178d…

Size

53.1 MB

Last updated

over 10 years ago

docker pull akiel/lens-app