Skip to content

The homepage microfrontend for the OpenMRS SPA

License

Notifications You must be signed in to change notification settings

openmrs/openmrs-esm-home

Repository files navigation

👋 New to our project? Be sure to review the OpenMRS 3 Frontend Developer Documentation.

Node.js CI

OpenMRS ESM Home

An OpenMRS Microfrontend for the O3 Home page.

What is this?

openmrs-esm-home is an in-browser javascript module that is a single-spa application. It is responsible for rendering the UI for the landing page after the user logs in.

Contributing / Development

Check out the developer documentation here.

This monorepo uses yarn.

To install the dependencies, run:

yarn

To start a dev server for the home app, run:

yarn start --sources 'packages/esm-home-app'

Running tests

To run all tests, run:

yarn turbo run test --filter=@openmrs/esm-home-app

To run a specific test file, run:

yarn turbo run test -- <test-file-name>

The above command will only run tests in the file or files that match the provided string.

To generate a coverage report, run:

yarn turbo run coverage

By default, turbo will cache test runs. This means that re-running tests without changing any of the related files will return the cached logs from the last run. To bypass the cache, run tests with the force flag, as follows:

yarn turbo run test --force

Troubleshooting

If you notice that your local version of the application is not working or that there's a mismatch between what you see locally versus what's in dev3, you likely have outdated versions of core libraries. To update core libraries, run the following commands:

# Upgrade core libraries
yarn up openmrs@next @openmrs/esm-framework@next

# Reset version specifiers to `next`. Don't commit actual version numbers.
git checkout package.json

# Run `yarn` to recreate the lockfile
yarn

Design Patterns

For documentation about our design patterns, please visit our design system documentation website.

Configuration

Please see the Implementer Documentation for information about configuring modules.