Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(docs) O3-3525: Enhance README #211

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 66 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,78 @@

# OpenMRS ESM Home

An [OpenMRS Microfrontend](https://openmrs.atlassian.net/wiki/spaces/projects/pages/26936899/OpenMRS+3.0+A+Frontend+Framework+that+enables+collaboration+and+better+User+Experience) for frontend modules tied to the home page.
An [OpenMRS Microfrontend](https://openmrs.atlassian.net/wiki/spaces/projects/pages/26936899/OpenMRS+3.0+A+Frontend+Framework+that+enables+collaboration+and+better+User+Experience) for the O3 Home page.

## What is this?

openmrs-esm-home is an in-browser
[javascript module](https://github.com/openmrs/openmrs-rfc-frontend/blob/master/text/0002-modules.md)
that is a [single-spa application](https://single-spa.js.org/docs/building-applications.html).
It is responsible for rendering the UI for the landing page after the user logs in.
openmrs-esm-home is an in-browser [javascript module](https://github.com/openmrs/openmrs-rfc-frontend/blob/master/text/0002-modules.md)
that is a [single-spa application](https://single-spa.js.org/docs/building-applications.html). It is responsible for rendering the UI for the landing page after the user logs in.

## Contributing / Development

[Setup local development environment for OpenMRS SPA](https://o3-docs.openmrs.org/docs/frontend-modules/development)
Check out the developer documentation [here](https://o3-docs.openmrs.org/docs/frontend-modules/development).

This monorepo uses [yarn](https://yarnpkg.com/).

To install the dependencies, run:

```bash
yarn
```

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

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

## Running tests

To run all tests, run:

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

To run a specific test file, run:

```bash
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:

```bash
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:

```bash
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](https://dev3.openmrs.org/openmrs/spa), you likely have outdated versions of core libraries. To update core libraries, run the following commands:

```bash
# 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

Please visit our [design system](https://om.rs/o3ui) documentation website for documentation about our design patterns.
For documentation about our design patterns, please visit our [design system](https://om.rs/o3ui) documentation website.

## Configuration

Please see the [Implementer Documentation](https://wiki.openmrs.org/pages/viewpage.action?pageId=224527013) for information about configuring modules.
Loading