Development of Hikma Health Mobile application has moved to a monorepo for greater system stability and code coherence across the platform. Active development and future updates now happens on the hikma-health-platform repository.
Please migrate to
hikma-health-platformas soon as possible. Updates to this repo will be a much, much lower priority and limited to security patches only. New features, bug fixes, and improvements will land inhikma-health-mobile.
A full-stack health management system designed for offline-first operation in low-resource settings. Built with modern web technologies and optimized for reliability and performance.
The Hikma Health platform is a mobile electronic health record system designed for organizations working in low-resource settings to collect and access patient health information. The repository contains the mobile application (Android tested, iOS support included) that supports offline functionality, thousands of patients and multiple languages including Arabic, Spanish, and English. Other languages can be added trivially.
The platform is designed to be intuitive and allow for efficient patient workflows for patient registration, data entry, and data download. You can see a user demo here: https://drive.google.com/file/d/1ssBdEPShWCu3ZXNCXnoodbwWgqlTncJb/view?usp=drive_link
This repository contains the client-side code for Hikma Health's mobile application. The corresponding server-side code is located at https://github.com/hikmahealth/hikma-health-backend. Please feel free to file feature requests and bugs at either location.
This app is built using React Native with Expo and can be compiled for either iOS or Android, although we do most of our testing on Android.
We recommend using the Hikma Health mobile applications found on the play stores instead of bundling your own and distributing it to your users.
We actively maintain the Hikma Health applications found in both the apple and google stores (apple is often 2 - 3 versions behind given our primary userbase) and stay ahead of store compliance, security and updates.
If you do choose to deploy your own version based on this open source repo, please rename the application and package names so as not to confuse your healthcare providers and users.
First, make sure you have set up react-native and Expo development environment by following the latest documentation on the official guide found here: https://docs.expo.dev/get-started/installation/
Clone this project
git clone git@github.com:hikmahealth/hikma-health-mobile.gitSet up the backend either locally or remotely by following the instructions on the backend repository: https://github.com/hikmahealth/hikma-health-backend
Go to the project directory
cd hikma-health-mobileInstall the dependencies using pnpm - depending on your internet connection, this could take a few minutes.
pnpm installRun the application on mobile device and/or emulator
pnpm androidFor iOS:
pnpm iosTo run this project, you will need to add the following environment variables to your .env file
EXPO_PUBLIC_HIKMA_API_TESTING: This is the endpoint for where your backend is hosted. This file is by default already ignored in the.gitignorefile, make sure it remains there.
Sentry configuration is handled through the app.json file in the Sentry plugin configuration.
🔥 DO NOT COMMIT THIS INFORMATION TO YOUR VERSION CONTROL (GITHUB) OR SHARE IT WITH UNAUTHORIZED PERSONNEL 🔥
Hikma Health mobile application is built on the open source community, key technologies used are:
- Expo SDK (v53): Managed React Native development platform
- React Native (v0.79): Cross platform development framework developed by Facebook
- React (v19): Declarative UI Framework
- TypeScript (v5.8): Adding types support to JavaScript
- React Navigation (v7): Performant and pleasant navigation library
- Zustand/XState Store (v3.8): State management with XState integration
- XState (v5.20): State Machines Library for complex workflows
- React Hook Form (v7.62): Performant forms with easy validation
- WatermelonDB (v0.28): Fast, Scalable & Lazy local database solution built on SQLite
- React Native MMKV (v3.2): Fast & secure key-value storage
- Expo Secure Store (v14.2): Secure storage for sensitive data
- i18next (v23.14) + react-i18next (v15): Internationalization with RTL support
- React Native Reanimated (v3.17): Smooth animations with native performance
- @legendapp/list (v1.1): High-performance list component
- Lucide React Native (v0.539): Beautiful & consistent icon library
- date-fns (v4.1): Modern JavaScript date utility library
- Sentry (v6.14): Error tracking and performance monitoring
- Effect (v3.17): Functional programming utilities
- Hermes: Fast and efficient JavaScript engine
- Jest (v29): Test runner
- Maestro: Automated End-to-End UI testing library
- EAS Build & Submit: Expo Application Services for building and distributing
- Offline Patient Registration
- Offline patient visits and workflows
- Fast sync of data to backend
- Light/dark mode toggle
- Download patient data
- Multilanguage support (including RTL)
- Cross platform (Android tested, iOS supported)
- Easily extendable
- Supports custom workflows and forms
The Hikma Health App project's structure will look similar to this:
hikma-health-mobile
├── app
│ ├── assets
│ ├── components
│ ├── config
│ ├── data
│ ├── db
│ ├── devtools
│ ├── hooks
│ ├── i18n
│ ├── models
│ ├── navigators
│ ├── screens
│ ├── services
│ ├── store
│ ├── theme
│ ├── utils
│ └── app.tsx
├── assets
│ ├── icons
│ └── images
├── lib
├── plugins
├── test
│ ├── __snapshots__
│ ├── mockFile.ts
│ └── setup.ts
├── types
├── vendor
├── .maestro
│ └── shared
├── README.md
├── android
├── ios
├── app.config.ts
├── app.json
├── eas.json
├── package.json
├── pnpm-lock.yaml
├── .env
└── tsconfig.json
The app directory contains the main application code:
assets Application-specific assets and resources.
components Reusable UI components that help build screens.
config Configuration files for different environments (dev/prod).
data Data layer including API calls and data transformations.
db Database models and migrations for WatermelonDB.
devtools Development tools and debugging utilities.
hooks Custom React hooks for shared logic.
i18n Internationalization files and translations.
models Data models and business logic.
navigators React Navigation navigators and routing configuration.
screens Screen components that represent full pages in the app.
services External services integration (APIs, storage, etc.).
store Global state management with XState and Zustand.
theme Application theming including colors, typography, and spacing.
utils Shared utility functions and helpers.
app.tsx Main application entry point.
Custom libraries and vendor-specific code.
Custom Expo plugins for build-time configuration.
TypeScript type definitions.
Third-party libraries with custom modifications.
End-to-end test configurations and flows.
This project uses pnpm as the package manager. Make sure you have pnpm installed:
npm install -g pnpmAll commands should be run with pnpm:
pnpm install
pnpm android
pnpm ios
pnpm testFollow our Maestro Setup recipe from the Ignite Cookbook!
Run E2E tests:
pnpm test:maestroThis project uses Expo Application Services (EAS) for building and deploying:
# Android development build
pnpm build:android:dev
# iOS development build
pnpm build:ios:dev# Android production build
pnpm build:android:prod
# iOS production build
pnpm build:ios:prod# Push OTA update to production
pnpm eas:update:prodApply the patch in patches/react-native-date-picker+5.0.13.patch:
In your terminal:
# Navigate to the specific package
cd node_modules/react-native-date-picker
# Apply the patch
git apply ../../patches/react-native-date-picker+5.0.13.patch Simply clear the application data and the app stored data will be removed. You can do this by going to the app settings (for android you can long press the icon from your apps menu), and choosing to clear all data from storage.
Remember that all data that is deleted before being synchronized is lost forever and this should only be done with testing data.
Furthermore, if the data has been synchronized and uploaded to the server, deleting the data locally will not help much since the data from the server will just synchronize back in on the next sync event (should be when you log in next time)
In the application code, locate the folder app/i18n. This folder contains all the translation files, with English, Español and Arabic already there.
You can add new language by creating a new file with your translations and updating the app/i18n/index.ts file with the location and name of your new translation. That's it!
If you are stuck for more than 10 minutes, please open an issue or email our head of development at ally[at]hikmahealth.org with your questions and concerns.
We are constantly looking for ways to build THE best portable electronic health record system and are constantly looking for feedback.
Features on the roadmap represent the vision for the mobile app over the coming versions, but none are guaranteed. If there is a feature you would love to see supported, open a feature-request / issue with more details and we can prioritize features with the most requests.
- Improve online only support (for areas with guaranteed internet access)
- Improve test coverage (priority to 80%)
- Faster boot time on lower end devices
- Official iOS support (add documentation for this support)
- Memory & performance profiling
- Automated CI pipeline for tests (add coveralls)
- Migration to React Native's New Architecture
- Enhanced offline capabilities with background sync
Please see the CONTRIBUTING.md file for more information.
This project, like many other open source works, relies heavily on the open source community and their contributions. We have built this EHR system on the shoulders of great projects such as the Ignite boilerplate, WatermelonDB, Expo, and many others.