A free and open source NoSQL database we use to store all our data, configuration, and even the application code. CouchDB is really good at replication which is the process of sending the data to another database and back again. See more at the CouchDB site.
A NodeJS service which runs on the server as a wrapper around CouchDB. It provides security and APIs for browsers and integrations. It also includes a custom implementation of filtered replication to allow it to support more concurrent users. See more at the CHT Core API repo on Github.
Another NodeJS service running on the server, sentinel performs actions called transitions every time a document in CouchDB is added or modified. Some examples are validations, generating scheduled messages, automatic responses, creating patients, and sending alerts. See more at the CHT Core Sentinel repo on Github.
A free and open source SQL database that we use for analytics queries for display in tools like klipfolio. We created a library called couch2pg to replicate data from CouchDB into PostgreSQL. See more at the PostgreSQL site.
cht-core is composed of the following web applications:
The CHT Web Application is used by Community Health Workers and provides a large variety of features.
View the source code in our GitHub repository.
The CHT Web Application is reactive, responsive and a single page application built with Angular and NgRx frameworks. Additionally, it uses the following technology:
Technology | Usage |
---|---|
PouchDB | To implement an Offline-First strategy which means the data is stored on the client and all pages can load immediately regardless of whether the user has a fast connection, slow connection, or no connection at all. The data is stored in PouchDB which replicates changes back and forth in the background with the server CouchDB. |
Enketo | To render configured xforms and help with styling and dynamic elements such as show/hide and validation rules. |
Nools | A rules engine to compute the upcoming tasks and monthly targets of the users. |
Ngx-Bootstrap | To integrate Bootstrap components in the Angular application. |
Ngx-translate | To automatically translate the labels from a Angular application. Read more about how to configure translations. |
Karma | A test runner for unit tests |
MochaJS | A test framework to run the unit tests |
Protractor | To run the e2e tests |
Less | A CSS preprocessor |
The CHT Web Application has the following high level structure:
App Management is an interface for non-technical administrative users to manage users and settings.
View the application source code in our GitHub repository.
App Management is a single page application built with AngularJS framework and implements Redux to manage a reactive state. Additionally, it uses the following technology:
Technology | Usage |
---|---|
Angular Translate | To automatically translate the labels from a AngularJS application. Read more about how to manage translations. |
Karma | A test runner for unit tests |
MochaJS | A test framework to run the unit tests |
Protractor | To run the e2e tests |
Less | A CSS preprocessor |
CHT Web Application works in the browser or wrapped in the CHT Android app which allows for project branding, sets the project URL, and hides browser elements like the URL bar.
CHT Gateway is an android app for sending and receiving SMS messages. Each SMS enabled project has one gateway running. It polls an api endpoint to write incoming SMS into the CouchDB and retrieve outgoing SMS to send.
Medic Collect is an android app based on Open Data Kit to render xforms on the phone and send reports in to cht-gateway over SMS or directly to api over mobile data.
cht-conf is a command line utility for uploading configuration and bulk importing of records.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.