Skip to content
This repository has been archived by the owner on Sep 19, 2021. It is now read-only.

PBSA/peerid-gui

Repository files navigation

PeerID

JavaScript Commitizen friendly Conventional Commits

Sonar badges can be retrieved from your SonarCloud dashboard once you have configured it.

STACK

  • React
  • react-hot-loader
    • React-🔥-Dom
    • Updating translation file contents will not work with hot reloading.
  • Redux (single source of truth state management)
  • Redux dev tools (allow user to debug )
  • React-Router (we use this to control navigation)
  • React-Router-Redux (sync React-Router with Redux so we can handle navigation with Redux)
  • ESlint (to ensure code style consistency)
  • Stylelint (to ensure stylesheet consistency)
  • Commitlint (to ensure commit message adhere to Conventional Commits)
  • SCSS (CSS preprocessor)

Commits

If you have run the init script, you can commit via git cz.
If you have not run the init script, you must commit via npm run commit.
If you do neither, commit message consistency will be difficult for you.

This repository uses a combination of tools to aid in consistent commit messages. The reason we do this is so we can have dynamic changelog creation and smart semantic versioning based on commits (with the ability to override).

NEVER COMMIT THE .ENV FILE

The following tools are used:

  1. commitizen
    Used for prompting recommended entries within a commit message to ensure it contains the necessary information.
  2. husky
    By using the hooks from this package we intercept commits being made and verify them with commitlint.
    • Prevent bad commits/pushes.
  3. commitlint

.ENV Requirements

You must provide the following information in a .env file in the root of the repository for full application functionality.

The application requires certain parameters to be provided such as the API endpoint for calls to the backend node server API:

DEV_API_ROUTE='http://localhost:3000/'
PRODUCTION_API_ROUTE='http://localhost:3000/'

DEV_BASE_ROUTE='http://localhost:8082'
PRODUCTION_BASE_ROUTE='http://localhost:8082'

The API routes mentioned above are the urls for the PeerID backend. Start PeerID backend before starting this project.

Starting the app

Once the .env file has been added, use the command npm i to install the dependencies and then npm run start to start the app. The app will build and run at http://localhost:8082.