Skip to content

sergkudinov/tdp-ui

 
 

Repository files navigation

TDP UI

tdp-ui is a graphical interface for tdp-server.

Pre-requisites

We assume that are available:

  • An instance of tdp-server, with the appropriate cors configuration (BACKEND_CORS_ORIGINS=[...,"http://tdp-ui-domain.local"]).
  • An identity provider, provisioned and configured to work with tdp-server. tdp-ui domain has to be registered as a redirect URI.
    Note: tdp_server provides a Docker environment containing an IDP for development purposes.

The following are required to build and develop tdp-ui. They aren't needed when exporting the project. tdp-ui can be used with any web server (such as NGINX):

Development and testing

  • Use the sample config.example.json file to provide tdp-ui the required environment variables:

    cp config.example.json config.json

    A skipAuth option is available to skip the authentication process. It is useful for development purposes.

  • Generate the API client SDK:

    npm run generate

    The SDK is generated in the ./build/tdp-sdk folder.

  • Install dependencies and start the app in development mode:

    npm install
    npm run dev

    By default, the client is available at http://localhost:3000.

Development with Docker

A Docker environment is provided with the required dependencies for development. It contains both tdp-server and Keycloak as the identity provider:

docker compose -f env/dev/compose.yml up -d

An user is provisioned in Keycloak to access the app. The credentials are:

  • username: user@tdp.com
  • password: secret

Build and export

By default, Next.js uses a Node.js server to serve the app. tdp-ui doesn't need a Node.js server and is exported to work without it:

npm install       # Install dependencies
npm run generate  # Generate the API client SDK
npm run export    # Build and export the project

The project is exported in the ./out folder to be used with any web server (such as NGINX).

Test export with Docker

A Docker environment is provided with NGINX to test the exported project:

docker compose -f env/export/compose.yml up -d

Contributions

Git hooks are defined using Husky to enforce good coding practices. For each commit, Husky automatically:

Further instructions are available in the docs folder.

About

Graphical interface for tdp-server

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 97.7%
  • Shell 1.5%
  • Other 0.8%