Skip to content
Data Stewardship Wizard - Client Application
Elm CSS Other
Branch: develop
Clone or download
Latest commit 0838770 Aug 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
nginx Remove last modified header Aug 1, 2019
scripts Add including build inffo during standard build process Feb 27, 2019
src Fix filter with tags Aug 19, 2019
tests Refactor KM structure Aug 13, 2019
vendor Fix question HTML id Jul 31, 2019
.dockerignore Add .dockerignore Jul 4, 2019
.gitignore Add configuration file for API url Mar 27, 2019
.travis.yml Fix travis build for RC versions Mar 6, 2019
Dockerfile Add support for including custom scss variables into the docker image Mar 11, 2019
LICENSE Update README and travis Dec 22, 2018
README.md Add configuration file for API url Mar 27, 2019
elm.json
package-lock.json 1.9.0 Jul 31, 2019
package.json 1.9.0 Jul 31, 2019
webpack.config.js Integrate registry May 22, 2019

README.md

Data Stewardship Wizard - Web Client

Build Status License

This is a web client for the Data Stewardship Wizard.

Data Stewardship Wizard - Server Application is the backend providing the API this client is using.

The Data Stewardship Wizard has the following functionality:

  • Organization & User Management
  • Knowledge Model Editor
  • Knowledge Model Migration Tool
  • Package Management

Development

Project is developed using the Elm language.

Development of the portal requires recent version of node and npm (node version 8.0.0 and npm version 5.0.0 should be fine). The project has a couple of dependencies that you need to install using npm.

$ npm install

Webpack is used to build the project. Webpack dev server is configured for smooth and easy development. You can start the dev server with:

$ npm start

Then navigate to http://localhost:8080 and you should see the client. During the development, the clients expects the backend running on localhost port 3000.

With webpack dev server, the default API url is http://localhost:3000, if you want to set a different one, create a file config.js in the project root with the following content:

window.dsw = {
    apiUrl: 'http://localhost:3000' // change API url to whatever you need
}

Use the following command to create a production minified build:

$ npm run build

To run the unit tests use:

$ npm test

Project Structure

All the application source code lives in the src directory. It contains following subdirectories and files:

  • elm - Elm source code, organized into modules
  • img - images
  • scss - SCSS source code, split into files based on the functionality and modules
  • index.ejs - template for Webpack HTML plugin
  • index.js - JavaScript that initializes the Elm app

Source code in vendor directory contains Elm code that is from libraries that could not be installed from Elm packages because they are either not published there or not published for the same Elm version.

Tests are in the tests directory organized in the same fashion as the source code in elm directory.

In the nginx directory, there is the configuration and the start script for nginx that is used in the Docker container to run the project.

Deployment

The project is automatically build into a Docker image using Travis CI. The Docker image for the portal is based on nginx that simply serves the static files build by webpack.

Configuration

When running the container with the DSW Client, you have to set ENV variable API_URL which should contain absolute URL to the API backend without the trailing slash.

Here is example docker compose configuration

version: '3'
services:
  dsw_client:
    image: datastewardshipwizard/client
    restart: always
    ports:
      - 80:80
    environment:
      - API_URL=https://api.example.com

Other deployment possibilities

It is not necessary to use the Docker image since the client contains only static files. You can just build the production build and serve the static files wherever from you want.

License

This project is licensed under the Apache License v2.0 - see the LICENSE file for more details.

You can’t perform that action at this time.