DiseaseControl is a disease control platform that facilitates end-to-end tracking of disease cases and resolutions keeping all nodes involved, starting from local level and growing up into a county wide level. This piece of software is originally designed to cover the needs of control software for Moldovan healthcare system for fighting against Coronavirus Covid-19.
The project started at C19.md Initiative Hackaton (March 2020).
- Milestone I
- Authentication and Authorization (RBAC)
- Add ability to onboard hospitals and groups them (2 level structure for now)
- Add ability to manage hospital “beds” and critical inventory (such as Lung Ventilation Systems, protective stuff, main medicine)
- Add ability to see available “beds” (e.g. for an ambulance) depending on the patient state and his needs.
- Milestone II
- Milestone III
- Milestone IV
- Git
- Docker
- NodeJS v12.x.x (for non docker usage)
Clone the project:
git clone https://github.com/AlexanderC/DiseaseControl.git
cd DiseaseControlIf you do NOT run docker mode you need to install dependencies by yourself by running
npm install
Configure environment:
cp sample.env .envYou might want to edit
.envto fill in your configuration
For testing purpose you might omit this step. System will use
sample.envas configuration file, which might be enough so far.
Starting production server:
npm startMonitoring production server:
npm run monitorStarting development server:
npm run start:devBuild image:
cp .sample.env .docker.env # Adjust your configurations...
docker build -t dc-api .Check if the image is available by running
docker images
Run services:
docker-compose up -dCheck if services as up and running by using
docker ps
Your application should have started on 0.0.0.0 at port 8000.
Run all database seeds:
npm run db:seeds:upDrop all data seeded:
npm run db:seeds:downDeploy to a server you have SSH access given:
# Add DEPLOY_SEEDS=1 in case you need to run seeds, mainly on first deploy
# Add DEPLOY_SEEDS_RELOAD=1 if you want to re-run seeds (e.g. a new one added)
DEPLOY_SERVER_ROOT=/root/api DEPLOY_SERVER_DSN=root@139.59.159.64 ./bin/deploy.shThe server has to be set up as of section
Prerequisites(except Git).
NPM and Node needs to be set up using nvm, which is the only one supported for now =(
If your database host is not resolving when
DEPLOY_SEEDS=1orDEPLOY_SEEDS_RELOAD=1option added on deploy- add it to/etc/hosts(e.g.127.0.0.1 database).
- Move logic from controllers into services
- Implement Milestone II (see Product Vision)
- Implement Milestone III (see Product Vision)
- Implement Milestone IV (see Product Vision)