Skip to content

A "Hello World" app you can use as a template for creating new microfrontend apps in OpenMRS v3

License

Notifications You must be signed in to change notification settings

Piumal1999/openmrs-esm-template-app

This branch is 3 commits ahead of, 9 commits behind openmrs/openmrs-esm-template-app:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7f6e92e · Jul 15, 2024

History

68 Commits
May 7, 2024
May 7, 2024
May 16, 2024
May 7, 2024
Jul 15, 2024
May 7, 2024
Jul 12, 2023
Jun 4, 2021
Jun 4, 2021
May 7, 2024
Jan 18, 2024
Sep 16, 2022
Jan 21, 2022
Jan 29, 2024
May 16, 2024
Jun 7, 2021
Jan 16, 2024
Jan 18, 2024
May 7, 2024
Jun 11, 2024
May 16, 2024
Jan 18, 2024
May 7, 2024
Jan 21, 2022
May 7, 2024
Jun 11, 2024

Repository files navigation

Node.js CI

OpenMRS ESM Template App

This repository provides a starting point for creating your own OpenMRS Microfrontend.

For more information, please see the OpenMRS Frontend Developer Documentation.

In particular, the Setup section can help you get started developing microfrontends in general. The Creating a microfrontend section provides information about how to use this repository to create your own microfrontend.

Running this code

yarn  # to install dependencies
yarn start  # to run the dev server

Once it is running, a browser window should open with the OpenMRS 3 application. Log in and then navigate to /openmrs/spa/root.

Adapting the code

  1. Start by finding and replacing all instances of "template" with the name of your microfrontend.
  2. Update index.ts as appropriate, at least changing the feature name and the page name and route.
  3. Rename the root.* family of files to have the name of your first page.
  4. Delete the contents of the objects in config-schema. Start filling them back in once you have a clear idea what will need to be configured.
  5. Delete the greeter and patient-getter directories, and the contents of root.component.tsx.
  6. Delete the contents of translations/en.json.
  7. Open up .github/workflows and adapt it to your needs. If you're writing a microfrontend that will be managed by the community, you might be able to just replace all instances of template with your microfrontend's name. However, if you're writing a microfrontend for a specific organization or implementation, you will probably need to configure GitHub Actions differently.
  8. Delete the contents of this README and write a short explanation of what you intend to build. Links to planning or design documents can be very helpful.

At this point, you should be able to write your first page as a React application.

Check out the Medication dispensing app for an example of a non-trivial app built using the Template.

Integrating it into your application

Please see Creating a Frontend Module.

About

A "Hello World" app you can use as a template for creating new microfrontend apps in OpenMRS v3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 67.1%
  • JavaScript 13.6%
  • SCSS 9.1%
  • Shell 6.8%
  • Dockerfile 3.4%