carecentive

Getting Started (Tutorial)

This page provides a step-by-step documentation to get your first mobile health application based on carecentive up and running.

This page is written for "absolute beginners" without any web developing experience. If you are a more experienced developer, feel free to skip some or all of these parts.

If this guide is unclear, please write a comment/question in the comment section.

Foreword

How web applications are built

Before we start with programming the actual mobile health application based on carecentive, it is important to understand how (most) web applications are typically built.

Web applications are separated into a so-called "frontend" and "backend".

The frontend can be described as "what the user sees" and "what the user clicks".

The backend is usually where the actual data processing happens, such as storing questionnaires in a database.

Carecentive Philosophy

Carecentive itself is a backend framework. Most medical studies have similar needs: Users should be able to log in, submit questionnaire, use a journal, receive regular reminders, upload images of medical documents, and so on. All of this is functionality that carecentive offers "out of the box". This is similar to a toolbox.

Carecentive is not a frontend framework. This is because every study has its own needs, requirements, and design. The design of a pregnancy apps vastly differs from the design of an app for palliative care. However, we offer you plenty of examples (for various plattforms) to get started with a first mobile health application.

This tutorial will show you how to deploy carecentive as a backend framework. Additionally, we will show you how to deploy a first barebone vue.js-based frontend app to access the framework.

Prerequisites

In order to use and compile carecentive, you will need:

  • A suitable code editor, such as Visual Studio Code
  • Node.js, the "programming plattform" (JavaScript runtime environment) carecentive is based on
  • Git, a tool for version management
  • MySQL as database

If you do not have any above installed, please download and install them now. Installation guides can be found on the individual websites (or online using Google). These tools are available for Windows, Mac OS, and Linux.

In order to access your MySQL database, a "visual" database inspector such as HeidiSQL or DBeaver is helpful.

Creating a New MySQL Database

While carecentive stores some files directly in the file system, most information is stored in a (relational) database.

After installing MySQL, you will need to create and set it up. You will need to create a new database, for example called "carecentive-db". See this page for details.

Downloading carecentive

It is now time to install the actual carecentive framework.

You can download the framework from carecentive's official Github page.

Click on the green "code" button, and select "Download ZIP".

Now extract the ZIP wherever you like.

Open the extracted folder, and run the following console command.

npm install

This will install all dependencies, as well as carecentives core framework, automatically.

Setting Up carecentive

  • Copy the .env.example file to .env
  • Enter your database credentials
  • Generate a random JWT token secret, for example using node, then require('crypto').randomBytes(64).toString('hex'), and copy it to the .env file
  • Run npx knex migrate:latest

Starting carecentive

Run the application using npm start

Setting Up The Frontend

Use one of our frontend frameworks...