Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Projects

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Project documentation is in the RFC Repository on GitHub. This page is intended as Implementer Documentation, and should be migrated to there as the project reaches maturity.

Frontend Configuration

There are two types of pages served by OpenMRS: server-side (JSP/GSP) and client-side (Single-SPA). This documentation will treat the latter, which is the recommended way of developing and configuring user-facing content going forward. The module which handles Single-SPA is openmrs-module-spa. URLs under `/openmrs/spa` are treated as frontend routes—they serve the frontend application, which is passed the URLs for routing.

There are essentially two pieces to this frontend: the Import Map and the Microfrontends.

The Import Map

An import map is a browser specification for controlling the url to download in-browser JavaScript modules from. OpenMRS expects that file to be served at `/openmrs/import-map.json`.

Microfrontends

Microfrontends are the mostly-independent JavaScript applications that form the pieces of the new OpenMRS frontend. The Import Map tells OpenMRS what Microfrontends to serve, and where those Microfrontends are. There are two good ways to serve these  Microfrontends: through a CDN or locally through Tomcat.

Microfrontends on a CDN

This is a good option if you have a centralized deployment and users are assumed to have internet access. Your CDN can be something like Amazon S3. With this kind of deployment, you can update the front-end resources without having to touch the server at all.

Microfrontends locally through Tomcat

This is the way to deploy Microfrontends if your servers are deployed on-premises and are intended to be usable without internet access.

...