Giter Club home page Giter Club logo

lawsampo-web-app's Introduction

JavaScript Style Guide

User interface for LawSampo Portal

Based on Sampo-UI – A framework for building semantic portal user interfaces

master branch visible at https://lakisampo.fi

The Sampo-UI framework is being developed by the Semantic Computing Research Group (SeCo) at the Aalto University, Finland. See the research page for more information.

Requirements

Note for Linux users: if your home directory is mounted from a network drive, using the Node Version Manager for installing Node.js highly recommended.

Installation

Local development

Install the dependencies specified in package.json (this command needs to be run only once, as long as you don't modify the dependencies):

npm install

Run client and server concurrently:

npm run dev

Deploy with Docker

These example commands can be used to deploy the server at http://localhost:3006/ in production mode. Production mode means in this case that the server listens for API requests at URLs beginning with http://localhost:3006/api/v1/... and additionally serves the client (React app) at http://localhost:3006/. The API docs can be found at http://localhost:3006/api-docs/.

Note that in development mode Webpack is used for serving the client, and the server is used only for handling API requests.

The build argument API_URL must be provided.

Build

docker build --build-arg API_URL=http://localhost:3006/api/v1 -t sampo-web-app-image .

Run

docker run -d -p 3006:3001 --name sampo-web-app sampo-web-app-image

Run with password protected endpoint

docker run -d -p 3006:3001 -e SPARQL_ENDPOINT_BASIC_AUTH=your_password --name sampo-web-app sampo-web-app-image

Upgrade

docker build --build-arg API_URL=http://localhost:3006/api/v1 -t sampo-web-app-image .
docker stop sampo-web-app
docker rm sampo-web-app
docker run -d -p 3006:3001 --name sampo-web-app sampo-web-app-image

Developer guide

Coding style

The JavaScript style guide, linter, and formatter module (named "standard" in package.json) is installed by default as development dependency. Do not install or create any additional style definitions or configurations. Instead, install an appropriate plugin for your text editor. If there are no plugins available for your favorite editor, it is highly recommended to switch into a supported editor.

Documentation

Client

Sampo-UI's React components are documented here using Storybook.

Here is a list of the main JavaScript libraries on which the Sampo-UI client is built on:

Backend

The API provided by Sampo-UI's backend includes routes for the following search paradigms: faceted search, full text search, and federated full text or spatial search. The API is described using the OpenAPI Specification. The same specification is used for both documenting the API, and validating the API requests and responses.

An API documentation with example configuration can been seen here.

Sampo-UI's backend is based on the following JavaScript libraries:

lawsampo-web-app's People

Contributors

esikkala avatar razz0 avatar heikkir avatar jkesanie avatar dependabot[bot] avatar annasahola avatar ajjmai avatar evsheino avatar yoge1 avatar thomasthelen avatar

Watchers

James Cloos avatar Petri Leskinen avatar  avatar Eetu Mäkelä avatar  avatar M avatar Arttu Oksanen avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ajjmai

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.