Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 3.12 KB

ARCHITECTURE.md

File metadata and controls

43 lines (30 loc) · 3.12 KB

Architecture

This repo's source code builds a static React app to be served on https://console.redhat.com.

The React app bundled using Webpack includes:

Micro frontends

These assets are loaded via Insights chrome which provides user auth, top and side nav (aka chroming), and a <main id="root"> to inject into, using a micro frontends approach. Diagram here:

Console dot architecture diagram

More information on the overall setup can be found on the Storybook for console.redhat.com here.

Webpack

This repo uses a shared common config with sensible defaults to build and run your application.

This repo uses federated modules to seamlessly load multiple applications at runtime.

Code Quality Tools

To maintain code quality, the following tools are used:

  • Typescript, to add type checking
  • Eslint, to enforce consistent code formatting
  • Prettier, an opinionated code formatter for automatic code formatting on save
    • To set this up in VS Code:
      • Install the Prettier extension
      • In settings (command + comma or control + comma), search for "format on save" and make sure that is checked
      • Still in settings, search for Prettier and make sure that the "Require Config" is checked.
      • Then open a file and intentionally make spacing off and hit save, to confirm that prettier is auto-formatting properly.
  • Husky to verify changes before commits.
  • Jest, for unit tests. Note that the repo is configured so that at least 85% code coverage is required for the entire app or the test suite will fail.
  • @testing-library/react for additional testing functionality
  • Sentry for error tracking in production