Git Product home page Git Product logo

shogun-gis-client's Introduction

SHOGun GIS client

This repository contains the default WebGIS client used within the SHOGun project.

The client was initialized with create-react-geo-app.

Installation ๐Ÿ’พ

We recommended to install the client via the prebuilt Docker image nexus.terrestris.de/repository/terrestris-public/shogun-gis-client.

Usage ๐Ÿ–ฑ๏ธ

Even if the client can be used without any backend providing a context configuration, it is designed to run on top of a SHOGun backend while reading the configuration from the /applications REST interface. To specify a configuration the query parameter applicationId must be set (e.g. https://localhost/client/?applicationId=18 to get the configuration for the application with the ID 18). If no ID is given (e.g. because no backend is available) or the requested application is not accessible, the client will load a fallback configuration.

Configuration ๐ŸŽจ

Several global settings for the client can be configured via the gis-client-config.js file:

Name Description Default
shogunBase The base URL of SHOGun, e.g. /api or https://my-shogun.org/ '/'
keycloak.enabled Whether Keycloak is used for authentication or not. Usually this should only set to false in client only mode or if no authentication is needed to access any SHOGun endpoints at all false
keycloak.host The Keycloak host, e.g. https://localhost/auth null
keycloak.realm The Keycloak realm that should be used for authentication, e.g. SHOGun null
keycloak.clientId The Keycloak client that should be used for authentication, e.g. shogun-client null
keycloak.onLoadAction See here for details 'check-sso'
print.url The url of the MapFish Print servlet '/print'

The configuration file is not bundled and will be loaded before application start from ./gis-client-config.js. Typically you want to override the file in a production environment and you can pass a custom file by mounting the desired one directly into the nginx container of the client. For example:

version: '3.7'
services:
  shogun-gis-client:
    image: nexus.terrestris.de/repository/terrestris-public/shogun-gis-client:latest
    volumes:
      - ./gis-client-config.js:/usr/share/nginx/html/gis-client-config.js
    (โ€ฆ)

The shogun-docker repository shows an alternative (and the preferred) way by providing the configuration file out of the root-nginx service while having support for dynamic environment variable replacement.

Development ๐Ÿง‘โ€๐Ÿ’ป

Checkout the repository and install all required dependencies via

npm i

While it's absolutely possible to run the client via

npm run start

to have the application available at https://localhost:8080 you usually want to start the full SHOGun stack for development. Please refer to the shogun-docker repository for further details.

Road to production ๐Ÿญ

The build artifact of the client can either be built via

npm run build

or directly included in an nginx based Docker image via:

docker build -t shogun-gis-client:1.0.0 .

Run docker run -p 80:80 shogun-gis-client:1.0.0 to start it locally.

Contributing ๐Ÿ’ซ

In short: yes, please contribute as you see fit ๐Ÿ˜Š, we're looking forward to your input.

Be bold and open PRs and issues for anything that bugs you or for all the ideas you want to share. We'd be happy to help you make your first steps or even bigger changes.

shogun-gis-client's People

Contributors

dnlkoch avatar dependabot[bot] avatar annarieger avatar lukaslohoff avatar fritzhoing avatar semantic-release-bot avatar kaivolland avatar unraveler avatar hblitza avatar

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.