Skip to content

Care is a Digital Public Good enabling TeleICU & Decentralised Administration of Healthcare Capacity across States.

License

Notifications You must be signed in to change notification settings

nithish1018/care_fe

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CARE Logo

Our goal is to continuously improve the quality and accessibility of public healthcare services using digital tools.

Netlify Status

Auto deployed to care.ohc.network for develop branch. All pull requests have preview builds powered by Netlify.

Code scanning - action OSSAR Cypress Tests Staging Release Production Release Codacy Badge Maintainability

Getting started

  • πŸ’¬ Comment on the issue if you are willing to take it up, and link the pull request with the issue.
  • 🏷️ Tag @ohcnetwork/care-fe-code-reviewers for faster resolution.
  • πŸ“Έ Attach screenshots in the pull requests showing the changes made in the UI.

Install the required dependencies

npm run install-all

First-time setup

For first-time setup, run the following command to generate the pluginMap and install plugin configurations:

npm run setup

πŸƒ Run the app in development mode

npm run dev

Once the development server has started, open localhost:4000 in your browser. The page will be automatically reloaded when you make edits and save. You will also see any lint errors in the console.

πŸ”‘ Staging API Credentials

Authenticate to staging API with any of the following credentials

- username: dev-districtadmin
  password: Coronasafe@123
  role: District Admin

- username: staffdev
  password: Coronasafe@123
  role: Nurse

- username: doctordev
  password: Coronasafe@123
  role: Doctor

Contributing to CARE

  • Create a branch with branch name of the format issues/{issue#}/{short-name} (example issues/7001/edit-prescriptions) from the latest develop branch when starting to work on an issue.
  • Once the changes are pushed to the branch, make a pull request with a meaningful title (example: "πŸ’Š Adds support for editing prescriptions" #6369)
  • Ensure the issue number is mentioned in the PR with a closing tag by following the PR body template. (Refer: Linking a pull request to an issue)
  • Once the code review is done, the PR will be marked with a "Needs Testing" label where it'll be queued for QA testing.
  • Once tested, the PR would be marked with a "Tested" label and would be queued for merge.

Translations

All strings must be encased in i18n translations. New translation strings must be specified in src->Locale->en. Do not add translations for languages other than english through pull requests. Other language translations can be contributed through Crowdin

Testing

To ensure the quality of our pull requests, we use a variety of tools:

  • Automated E2E Testing: We use Cypress for end-to-end testing to automatically verify the functionality and performance of our code.
  • Manual Real Device Testing: We use BrowserStack to manually test our code on real devices, ensuring compatibility and functionality across different platforms and browsers.

πŸ§ͺ Run cypress tests

To run cypress tests locally, you'll need to setup the backend to run locally and load dummy data required for cypress to the database. See docs.

Once backend is running locally, you'll have to ensure your local front-end is connected to local backend, by setting the REACT_CARE_API_URL env.

#.env
REACT_CARE_API_URL=http://127.0.0.1:9000

Once done, start the development server by running

npm run dev

Once development server is running, then run the cypress tests in either of the ways described below.

npm run cypress:run        # To run all tests in headless mode.
npm run cypress:run:gui    # To run all tests in headed mode.
npm run cypress:open       # To debug and run tests individually.
  • Failed test screenshots are saved in cypress/screenshots
  • All test videos are saved in cypress/videos

πŸ“– Documentations

πŸš€ Production

Build the app for production

npm run build

Builds the app for production to the build folder. It correctly bundles React in production mode and optimizes the build for the best performance.

Start a production http-server

npm run preview

Starts a production http-server in local to run the project with Service worker. The build is minified and the filenames include the hashes.

πŸš€ Your app is ready to be deployed!

About

Care is a Digital Public Good enabling TeleICU & Decentralised Administration of Healthcare Capacity across States.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.5%
  • Other 1.5%