Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/entur/enki

Front-end for Nplan
https://github.com/entur/enki

enki frontend nplan ror uttu

Last synced: about 2 hours ago
JSON representation

Front-end for Nplan

Awesome Lists containing this project

README

        

# Enki
![Build](https://github.com/entur/enki/actions/workflows/build.yml/badge.svg?event=push)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=entur_enki&metric=alert_status)](https://sonarcloud.io/dashboard?id=entur_enki)

Frontend app for Nplan - a simple timetable editor. Backend is [Uttu](https://github.com/entur/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](https://github.com/entur/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):

```json
{
"oidcConfig": {
"authority": "https://",
"client_id": "",
"extraQueryParams": {
"audience": ""
}
}
}
```

For full configuration reference, see [oidc-client-ts documentation](https://authts.github.io/oidc-client-ts/interfaces/UserManagerSettings.html).

### Bypass authentication locally

It's possible to bypass authentication locally with the configuration parameter `disableAuthentication`
set to `true`. This can be used in combination with the `local-no-authentication` profile in the backend.

## Testing

Uses [Jest](https://facebook.github.io/jest) for unit and reducer testing.

```
npm test
```