React frontend for HospitalRun: free software for developing world hospitals.
Version 1.0.0-beta is no longer supported. Version 2 is currently under development.
- To contribute, follow the guidelines in the readme or alternatively ask for details on Slack channel #contributors.
- To use version 1.0.0-beta (not production ready) in a hospital facility, ask for support on Slack channel #troubleshooting.
Contributions are always welcome. Before contributing please read our contributor guide.
- Fork this repository to your own GitHub account and then clone it to your local device
- Navigate to the cloned folder:
cd hospitalrun-frontend
- Install the dependencies:
yarn
- Run
yarn run start
to build and watch for code changes
Note: The following instructions are for connecting to HospitalRun Server during development and are not intended to be for production use. For production deployments, see the deployment instructions.
- Configure HospitalRun Server
- Start the HospitalRun Development Server
- Copy the
.env.example
file to.env
- Change the
REACT_APP_HOSPITALRUN_API
variable to point to the HospitalRun Development Server.
Some developers have reported the following errors and the corresponding fixes
There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.
The react-scripts package provided by Create React App requires a dependency:
"babel-loader": "8.1.0"
Don't try to install it manually: your package manager does it automatically.
However, a different version of babel-loader was detected higher up in the tree:
/path/to/hospitalrun/node_modules/babel-loader (version: 8.0.6)
Manually installing incompatible versions is known to cause hard-to-debug issues.
If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact order:
1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
2. Delete node_modules in your project folder.
3. Remove "babel-loader" from dependencies and/or devDependencies in the package.json file in your project folder.
4. Run npm install or yarn, depending on the package manager you use.
To fix this issue, add SKIP_PREFLIGHT_CHECK=true
to the .env
file.
yarn test:ci
will run the entire test suite
yarn test
will run the test suite in watch mode
yarn lint
will run the linter
yarn lint:fix
will run the linter and fix fixable errors
In order to optimize the workflow and to prevent multiple contributors working on the same issue without interactions, a contributor must ask to be assigned to an issue by one of the core team members: it's enough to ask it inside the specific issue.
This repo uses Conventional Commits. Commitizen is mandatory for making proper commits. Once you have staged your changes, can run npm run commit
or yarn commit
from the root directory in order to commit following our standards.
Cross-browser Testing Platform and Open Source <3 Provided by Sauce Labs
Stefano Casasola |
Michael Daly |
Riccardo Gulin |
Grace Lau |
Jack Meyer |
Matteo Vivona |
---|
John Kleinschmidtr |
Joel Worrall |
Joel Glovier |
---|
Released under the MIT license.