Coder Social home page Coder Social logo

enki's Introduction

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.

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 for unit and reducer testing.

npm test

enki's People

Contributors

aryani1 avatar assadriaz avatar christianmosveen avatar dependabot[bot] avatar esuomi avatar fredrikmeyer avatar renovate-bot avatar renovate[bot] avatar simejo avatar snyk-bot avatar strandoe avatar testower avatar vpaturet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

enki's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Encrypted value is using deprecated PKCS1 padding, please change to using PGP encryption.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/cache v4
  • sonarsource/sonarqube-scan-action v2.1.0
  • actions/upload-artifact v4
.github/workflows/deploy.yml
  • actions/checkout v4
  • actions/download-artifact v4
  • FirebaseExtended/action-hosting-deploy v0
  • actions/checkout v4
  • actions/download-artifact v4
  • FirebaseExtended/action-hosting-deploy v0
  • actions/checkout v4
  • actions/download-artifact v4
  • FirebaseExtended/action-hosting-deploy v0
.github/workflows/pull-request-build-and-deploy.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/cache v4
  • sonarsource/sonarqube-scan-action v2.1.0
  • FirebaseExtended/action-hosting-deploy v0
npm
package.json
  • @apollo/client 3.10.4
  • @entur/a11y 0.2.85
  • @entur/alert 0.16.9
  • @entur/button 3.2.25
  • @entur/chip 0.7.11
  • @entur/datepicker 9.4.10
  • @entur/dropdown 5.4.10
  • @entur/expand 3.5.14
  • @entur/form 7.1.10
  • @entur/grid 0.3.51
  • @entur/icons 6.17.1
  • @entur/layout 2.3.9
  • @entur/menu 4.2.33
  • @entur/modal 1.7.46
  • @entur/table 4.8.10
  • @entur/tokens 3.15.0
  • @entur/tooltip 2.7.9
  • @entur/typography 1.8.38
  • @reduxjs/toolkit 1.9.7
  • @sentry/react 7.117.0
  • axios 1.7.2
  • classnames 2.5.1
  • date-fns 2.30.0
  • duration-fns 3.0.2
  • file-saver 2.0.5
  • graphql 16.8.1
  • graphql-request 6.1.0
  • leaflet 1.9.4
  • lodash.clonedeep 4.5.0
  • lodash.isempty 4.4.0
  • lodash.isequal 4.5.0
  • moment 2.30.1
  • oidc-client-ts 3.0.1
  • react 18.3.1
  • react-dom 18.3.1
  • react-helmet 6.1.0
  • react-intl 6.6.8
  • react-leaflet 4.2.1
  • react-oidc-context 3.1.0
  • react-redux 8.1.3
  • react-router-dom 6.23.1
  • redux-sentry-middleware 0.2.2
  • uuid 9.0.1
  • @redux-devtools/extension 3.3.0
  • @testing-library/jest-dom 6.4.6
  • @testing-library/react 15.0.7
  • @testing-library/user-event 14.5.2
  • @types/file-saver 2.0.7
  • @types/leaflet 1.9.12
  • @types/lodash.clonedeep 4.5.9
  • @types/lodash.isempty 4.4.9
  • @types/lodash.isequal 4.5.8
  • @types/node 18.19.34
  • @types/react 18.3.3
  • @types/react-dom 18.3.0
  • @types/react-helmet 6.1.11
  • @types/react-intl-redux 0.1.19
  • @types/react-leaflet 3.0.0
  • @types/react-modal 3.16.3
  • @types/redux-immutable-state-invariant 2.1.4
  • @types/uuid 9.0.8
  • @vitejs/plugin-react 4.3.1
  • @vitest/coverage-v8 1.6.0
  • @vitest/ui 1.6.0
  • check-node-version 4.2.1
  • husky 9.0.11
  • identity-obj-proxy 3.0.0
  • jsdom 24.1.0
  • lint-staged 15.2.5
  • prettier 3.3.2
  • prettier-plugin-organize-imports 3.2.4
  • redux-immutable-state-invariant 2.1.0
  • sass 1.77.4
  • source-map-explorer 2.5.3
  • typescript 5.4.5
  • vite 5.2.13
  • vite-plugin-svgr 4.2.0
  • vite-tsconfig-paths 4.3.2
  • vitest 1.6.0
  • vitest-sonar-reporter 2.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

Setup a framework for "sandbox" features

  • A separate folder for "sandbox" features, e.g. src/ext, so feature X would live in src/ext/x
  • Add a configuration-controlled feature flag system for sandbox features, all sandbox features are default OFF, unless turned ON by configuration
  • Do Chunk splitting
  • Each sandbox feature should have a codeowner
  • Review will be more lenient in case of code changes in a sandbox feature, and should be signed off by the codeowner of that feature

Potential use cases:

  • Mapview in journey pattern - interactions within it needs to affect the state of the application

Switch to "bootstrap"-based config

Instead of adding configuration to the static build, the CI/CD should add a config file to the public folder prior to deployment. The app will download this during loading to "bootstrap" the application.

Dropdown component used across the UI is missing localized string for case when no options are available

In various places, such as when creating a new line or selecting an authority to a new network, if there's no options available at all, the dropdown component shows

Ingen treff for søket

as the default text;
Screenshot 2024-05-23 at 15 23 09

This string is not localized. From what I can gather, it seems to come from within the component itself (@entur/dropdown?) and since it repeats everywhere where the dropdown component is used, the problem should be isolated in the component itself.

Feature detection for export downloads is too broad

The try/catch surround the feature detection for export downloads masks other errors, e.g. server errors:

This is the feature detection code:

    const isFileSaverSupported = !!new Blob();

The try/catch should wrap only this line of code. Other errors should be handled separately.

Additionally:

  • We should not use an alert to display the error message
  • The error message should be localized

Clean up date handling

There's a mix of date-fns, moment, native date and string / iso across models and components. This needs to be cleaned up.

Ideally, models should use @internationalized, and transform from/to api formats.

Solving this issue should remove the need to upgrade date-fns (#1159).

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>entur/abt-renovate-config:renovate). Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

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.