Prospective Monitoring and Management - App (PIA).
PIA facilitates the data acquisition in health studies and takes into account the wishes of the participants, the study center and the research institution and thereby also supports the long-term motivation of the participants.
PIA consists of a web application as well as mobile apps for Android and iOS that enables the participants to conduct health studies and study management, as well it can be used as a symptom diary for contact tracing. The main goals of this project are:
- Simplify the data collection process
- (Long-term) motivation of users through persuasive technology
- Focus on usability and user centered design
- Focus on data protection and security
In the backend PIA is composed of Node.js microservices that are using PostgreSQL as a database. The microservices are containerized using Docker. As frontends an Angular web app and a Ionic powered iOS and Android mobile app are provided.
To get a local copy up and running follow these simple steps.
Docker, Docker-Compose and Node.js should be installed.
To run PIA locally move to pia-ansible/local
and run start.sh.
cd pia-ansible/local
./start.sh
Use docker ps
to check and wait until all services are healthy.
After that PIA can be accessed using localhost.
To add the first admin user, you can use the following command:
docker exec authservice node src/scripts/useradd.js --user=TestAdmin --password=TestPassword
A dockerized node service can be added by creating a new directory and placing the corresponding sources, Dockerfile
and package.json
into it.
psa.utils.repo-tool generate
will automatically adjust the gitlab pipelines.
It will also include unit-/integration-tests and linting if specified in the package.json
.
For the deployment the new service has to be added to docker-compose.yml.j2.
If the service requires a certificate generate-secrets must be updated to create a certificate for that service.
For the service to be reachable from the outside, the routes to that service have to be configured inside the apigateway.
A service can use a library that is included in this monorepo. To utilize that functionality you can install the library using relative paths.
psa.service.code-sharing-example$ npm install --save ../psa.lib.code-sharing-example/
Inside the Dockerfile
of psa.service.code-sharing-example
the dependent lib has to be copied before the npm ci
call:
WORKDIR /usr/src/node-app/
ARG DIR=
COPY $DIR/package.json package.json
COPY $DIR/package-lock.json package-lock.json
#copy dependencies
COPY psa.lib.code-sharing-example/ ../psa.lib.code-sharing-example
RUN npm ci --production
After that psa.utils.repo-tool generate
has to be executed to update the generated dockerfiles.
Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Make sure your Changes are formatted using prettier (
npx prettier --write .
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the AGPL-3.0 license. See LICENSE for more information.