Giter Site home page Giter Site logo

knoppiks / samply.broker.ui.material Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexanderkiel/samply.broker.ui.material

0.0 2.0 0.0 171 KB

Prototype of a Samply Broker UI which uses Material Design

License: Eclipse Public License 1.0

Dockerfile 0.41% JavaScript 2.38% sed 0.05% Shell 0.27% Elm 93.86% HTML 0.53% CSS 2.50%

samply.broker.ui.material's Introduction

Samply Broker UI Material Prototype

This project contains a prototype of a Samply Broker UI which uses Material Design as basis. Besides that this prototype tries to showcase the following:

  • full use of frontend technologies and build tools based on npm and webpack
  • carried out as SPA which runs in the browser and connects to backend services like the MDR
  • build with Elm a pure functional and typed language for the browser
  • Docker based build for a maximum of reproducibility and independence from different environments
  • customizable at deploy time through environment variables

Usage

To start the UI including the search store which is needed to persist the searches, this project contains a Docker compose file with the complete setup.

Clone this Git repository, if you haven't already:

git clone https://github.com/alexanderkiel/samply.broker.ui.material.git

Make sure you have port 8080 free or edit the docker-compose.yml before brining the system up with:

docker-compose up

Point your browser to: http://localhost:8080.

Environment

The Docker container needs certain environment variables to be able to run:

  • SEARCH_STORE_ROOT - the base URI of the search store
  • MDR_ROOT - the base URI of the Samply MDR to use
  • MDR_NAMESPACE - the namespace of the MDR to use

Build

The build is Docker based. Just run:

docker build .

Development

  • install npm
  • run npm install to install the required node packages
  • run the search store on port 8080: docker run -p 8080:8080 -e PORT="8080" -e DATABASE_URI="datomic:mem://store" akiel/samply.broker.search.store:latest
  • run npm run dev to run an interactive development environment with hot reloading
  • open http://localhost:3000 in your browser

Search Store API

The search store API is modeled after the CQRS pattern. There is one command endpoint, accepting all the writes and several REST-like query endpoints for the reads.

Command results only contain a sync token and an optional identifier. After issuing a command, the sync token is used to sync with the read side, so that we can be sure to see our own effects. One example is the search/create command which creates a new search. After creating the search, the UI navigates to the search page which displays it. The result of the search/create command is the search identifier and a sync token which is used in the subsequent read request of the search created.

License

Copyright © 2018 Alexander Kiel

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.