https://github.com/ohcnetwork/care_fe
Care is a Digital Public Good enabling TeleICU & Decentralised Administration of Healthcare Capacity across States.
https://github.com/ohcnetwork/care_fe
digital-public-goods hacktoberfest healthcare hmis
Last synced: 27 days ago
JSON representation
Care is a Digital Public Good enabling TeleICU & Decentralised Administration of Healthcare Capacity across States.
- Host: GitHub
- URL: https://github.com/ohcnetwork/care_fe
- Owner: ohcnetwork
- License: mit
- Created: 2020-03-21T17:32:30.000Z (about 5 years ago)
- Default Branch: develop
- Last Pushed: 2025-05-13T08:19:17.000Z (28 days ago)
- Last Synced: 2025-05-13T08:25:38.389Z (28 days ago)
- Topics: digital-public-goods, hacktoberfest, healthcare, hmis
- Language: TypeScript
- Homepage: https://care.ohc.network
- Size: 49.9 MB
- Stars: 511
- Watchers: 21
- Forks: 785
- Open Issues: 186
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
Our goal is to continuously improve the quality and accessibility of public healthcare services using digital tools.
๐ Staging Deployment
[](https://app.netlify.com/sites/care-ohc/deploys)
Auto deployed to care.ohc.network for
develop
branch. All pull requests have preview builds powered by Netlify.[](https://sourcerer.io/fame/tomahawk-pilot/ohcnetwork/care_fe/links/0)[](https://sourcerer.io/fame/tomahawk-pilot/ohcnetwork/care_fe/links/1)[](https://sourcerer.io/fame/tomahawk-pilot/ohcnetwork/care_fe/links/2)[](https://sourcerer.io/fame/tomahawk-pilot/ohcnetwork/care_fe/links/3)[](https://sourcerer.io/fame/tomahawk-pilot/ohcnetwork/care_fe/links/4)[](https://sourcerer.io/fame/tomahawk-pilot/ohcnetwork/care_fe/links/5)[](https://sourcerer.io/fame/tomahawk-pilot/ohcnetwork/care_fe/links/6)[](https://sourcerer.io/fame/tomahawk-pilot/ohcnetwork/care_fe/links/7)


[](https://cloud.cypress.io/projects/wf7d2m/runs)


[](https://www.codacy.com/gh/ohcnetwork/care_fe?utm_source=github.com&utm_medium=referral&utm_content=ohcnetwork/care_fe&utm_campaign=Badge_Grade)
[](https://codeclimate.com/github/ohcnetwork/care_fe/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
```sh
npm install
```#### ๐ Run the app in development mode
```sh
npm run dev
```Once the development server has started, open [localhost:4000](http://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.
#### ๐ API Credentials for care.ohc.network
Authenticate to care.ohc.network with any of the following credentials
```yaml
# Doctor at Aluva PHC
- username: care-doctor
password: Ohcn@123# Staff at Aluva PHC
- username: care-staff
password: Ohcn@123# Admin at Aluva PHC
- username: care-nurse
password: Ohcn@123# Facility Admin at Aluva PHC
- username: care-fac-admin
password: Ohcn@123# Volunteer at Aluva PHC
- username: care-volunteer
password: Ohcn@123# Administrator
- username: care-admin
password: Ohcn@123
```#### ๐ฑ Patient Login in Staging
For patient login via phone number:
- In production, an actual SMS with OTP is sent to the provided phone number
- In staging environment, to save costs, SMS messages are not actually sent
- For testing purposes in staging, use the hardcoded OTP: `45612`#### 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`](https://github.com/ohcnetwork/care_fe/tree/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](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))
- 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](https://crowdin.com/project/ohccarefe)
### 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](https://github.com/ohcnetwork/care#self-hosting).
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
#.env
REACT_CARE_API_URL=http://127.0.0.1:9000
```Once done, start the development server by running
```sh
npm run dev
```Once development server is running, then run the cypress tests in either of the ways described below.
```sh
npm run cypress:run # To run all tests in headless mode.
``````sh
npm run cypress:run:gui # To run all tests in headed mode.
``````sh
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
- [CARE Documentation](https://docs.ohc.network/docs/care)
- [Swagger API Documentation](https://careapi.ohc.network/swagger/)
- [Testing Documentation](https://docs.coronasafe.network/care-testing-documentation/)## ๐ Production
#### Build the app for production
```sh
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`
```sh
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!**