This repository contains the frontend code for the Portal written in React and Typescript.
The Portal application consists of
The Portal maintains and uses the portal-shared-components library.
The helm chart for installing the Portal is available in the portal repository.
Please refer to the docs
directory of the portal-assets repository for the overarching user and developer documentation of the Portal application.
The Portal is designed to work with the IAM.
Steps for running the application on your machine on http://localhost:3001/
- Install dependencies
yarn
- Build
yarn build
- Run
yarn start
Note: if you'd like to run the complete frontend application, follow the Run frontend on localhost.md
guide available within the technical documentation of portal-assets.
Folder, File and component name to be in Camel Case
Scss files to be in Camel Case
RTK folders and files to be in small case
Always use components from portal-shared-components library
Do not import components directly from mui
Box, useMediaQuery
Do not use useTheme from mui
Use theme from the portal-shared-components library
Use custom class names to override default or mui styles
Use appropriate Typography
for the text and do not override font family of it
Create a new file in the respective language
folder with the module name in assets/locales
Use small cases for the json
file\
ex: notifications.json
Keys inside json
file should be in Camel Case\
ex: notificationTitle
Import useTranslation
from react-i18next
Declare translation object using the specific module\
const { t } = useTranslation('notification')
Empty in the usetransation() will pull the data from main.json
file
const { t } = useTranslation()
Usage ex:
t('header.title')
Before committing your changes,
s1. Remove all the disabled linter rules from .eslintrc.json
and run yarn lint
on your newly created file or folder to see the results 2. Disable linter rules is allowd only for the exceptional cases. Code comments with proper reason is mandatory
- All the api call has to be addressed with a throbber in the UI
- Empty response to be shown with a proper message to the user
- API error has to be shown in a component with appropriate action
a. Error code 4xx needs to show error component with message
b. Error code 5xx should allow user to refetch the api once again.
URL path names to be in Camel Case
See Known Knowns.
This application provides container images for demonstration purposes.
See Docker notice for more information.
Distributed under the Apache 2.0 License. See LICENSE for more information.