Skip to content

entur/enki

Repository files navigation

Enki

Build Quality Gate Status

Frontend app for Nplan - a simple timetable editor. Backend is Uttu.

Development

To run for development, simply do:

npm install
npm start

Note: The app uses Node version 18 (LTS).

To run together with a local instance of Uttu on port 11701, add the following to .env.development.local.

REACT_APP_UTTU_API_URL=http://localhost:11701/services/flexible-lines

Configuration

Configuration is bootstrapped from /bootstrap.json, when the app loads. You should add your environment-specific config to the deployment, along with the built static files (i.e. in the build/ folder).

For local development, add a bootstrap.json file to the public/ folder.

See src/config/ConfigContext.ts for the shape of the configuration.

Authentication

Uses OIDC for authentication. This solution is agnostic to which authentication provider you use.

Example configuration (works with Auth0):

"oidcConfig": {
  "authority": "https://<authentication domain>",
  "client_id": "<client id>",
  "extraQueryParams": {
    "audience": "<example audience>"
  }
},

For full configuration reference, see oidc-client-ts documentation.

Testing

Uses Jest for unit and reducer testing.

npm test