/nrich-frontend

React monorepo providing bindings to simplify the integration with nrich libraries.

Primary LanguageTypeScriptApache License 2.0Apache-2.0

Build codecov.io Documentation License

npm (scoped) npm (scoped) npm (scoped)

nrich-frontend

React monorepo providing bindings to simplify the integration with nrich libraries.

The overall project is built on top of the concept of Yarn workspaces using Turborepo as a build management system.

For the demonstration of the integrations provided here, please visit the nrich-demo-frontend repository.

Workspace/module overview

Workspace is divided in config and libs subcategories. config contains common configuration used throughout the libs implementations.

libs contains implementation of specific modules separated in two categories. First is a core module which contains common logic and custom hooks for the module. Second are adapters for specific UI component library, currently only mui.

The following workspaces/modules are available:

Development of new modules

When developing a new module, the workspaces are to be organized as in the example:

  • libs/foo-core, where foo is the name of the module matching the naming conventions of the complementary backend module
  • libs/foo-bar, where foo is the name of the module matching the naming conventions of the complementary backend module, and bar is the name of the UI component library

Common commands

Build

To build all modules, run yarn build.

To build specific module(s), run yarn build -filter=foo, where foo is the workspace name (e.g. @croz/nrich-notification-core). This specific command receives a variable number of arguments.

Clean

To clean build artifacts, run yarn clean.

Lint

To execute the linting process in a read-only mode (without actually affecting the files), run yarn lint.

To automatically apply changes, run yarn lint --fix.

Test

To run tests, use yarn test.