/openmrs-distro-mf

Base OpenMRS backend distribution to run OpenMRS Micro Front-end application

Primary LanguageShell

OpenMRS Logo

OpenMRS Distribution for Micro Frontends

This repository maintains the 'distro POM' for the OpenMRS Distribution for Micro Frontends.

It downloads and brings in one place all artifacts needed by the distribution.

Folder structure:

  • docker/ Where to run the Docker Compose project. See below for detailed instructions.
  • micro-frontends/ Npm project to fetch all Micro Frontend modules and compute the corresponding Import Map -using Packmap. The list of the packaged Micro Frontends is documented in the package.json file:
"dependencies": {
    "@openmrs/esm-api": "^3.0.0",
    "@openmrs/esm-devtools-app": "^2.0.0",
    "@openmrs/esm-error-handling": "^1.1.1",
    ...
  • openmrs-config-mf/ A default OpenMRS Config (processed by Initializer) to configure the OpenMRS backend with a minimal set of metadata (concepts, global properties etc...)
  • the root pom.xml is where all backend dependencies are set:
<spaVersion>1.0.7-SNAPSHOT</spaVersion>
<fhir2Version>1.0.0-SNAPSHOT</fhir2Version>
<legacyuiVersion>1.3.3</legacyuiVersion>
<addresshierarchyVersion>2.12.0</addresshierarchyVersion>
...

Build and run locally:

Build the project:

mvn clean package

And run it locally (OpenMRS backend + MF):

cd docker/
docker-compose -p mf -f docker-compose-with-spa.yml up

-> http://localhost:8080/openmrs/spa

OpenMRS MF Login


This distribution can be used as a parent distribution when implementing any MF-based OpenMRS distribution.

To use it, simply refer to it as a <parent> in a child distribution's pom.xml file:

<parent>
  <groupId>net.mekomsolutions</groupId>
  <artifactId>openmrs-distro-mf</artifactId>
  <version>1.0.0</version>
</parent>

Output directory:

  • openmrs_modules/
    The required set of OpenMRS modules.
  • openmrs_config/
    The OpenMRS bespoke configuration (more here) to be processed by the Initializer module.
  • openmrs_core/
    The target version of OpenMRS Core.
  • frontends/
    The required set of Micro-Frontends.