# Install apps (Care 3.1)

This page is for operators who add apps to a Care 3.1 instance. It covers the two ways to enable an app's frontend part, how to install its backend part, how to match app builds to Care 3.1, and the setup for the apps that have user pages: ABDM, Filly and AI Vision.

For what staff see once an app is installed, see [Apps in Care](https://docs.ohc.network/apps/apps-in-care.md).

## What an app is

An app adds to Care's screens without a change to Care's own code. It can add pages, entries in the facility, billing, user and admin menus, organization tabs, encounter tabs and workspace widgets, device types, questionnaire groups, overrides of registered components, and content in fixed places (slots) on existing screens.

The Care frontend loads an app's frontend part at runtime with module federation: it loads the app's `./manifest` under the app's slug. If an app fails to load, Care logs the error, skips that app, and the rest of Care keeps working.

Each slot renders inside its own error boundary, so a crash in one app does not take down the screen.

Some apps also have a backend part, called a plug: a Python package that the backend image installs at build time. Django adds it to `INSTALLED_APPS` and serves its URLs under `/api/<plug name>/`.

| Part | What it is | How you enable it |
| - | - | - |
| Frontend part | A module federation build that the Care frontend loads from the app's `remoteEntry.js` | `REACT_ENABLED_APPS`, or a plug config row that you create in **Admin Dashboard** > **Apps** |
| Backend part (plug) | A Python package, pip-installed into the backend image | `plug_config.py` or `ADDITIONAL_PLUGS`, then an image rebuild |

The App Store installs only the frontend part. If an app needs a backend part, install the plug yourself before you install the app.

## Before you start

* To use **Admin Dashboard** > **Apps**, you need a superuser account.
* To change `REACT_ENABLED_APPS`, you need access to the frontend build settings or to the `runtime-env.js` file that the frontend serves.
* To install a backend part, you need to rebuild and redeploy the backend image.
* Use an app build that is made for Care 3.1. See [Match app builds to Care 3.1](#match-app-builds-to-care-31).

## Enable the frontend part

There are two ways to enable an app's frontend part. They differ in who sets them, where the setting is kept, and the slug the app gets.

| | `REACT_ENABLED_APPS` | **Admin Dashboard** > **Apps** |
| - | - | - |
| Who sets it | Whoever builds or serves the frontend | A superuser, in the Care UI |
| Where it is kept | The frontend's configuration | A plug config row in the backend database |
| Slug | The repository name, for example `care_filly_fe` | The App Store id, for example `care-filly`, or the slug you type in **Manual setup** |
| Config values for the app | None | The row's `meta.config` |
| In **Admin Dashboard** > **Apps** | Read-only, with **View config** | Editable, with **Edit Config** |

Older settings such as `REACT_ENABLE_ABDM`, `REACT_ENABLE_HCX` and `REACT_ENABLE_SCRIBE` have no effect in Care 3.1.

### With REACT\_ENABLED\_APPS

`REACT_ENABLED_APPS` is a comma-separated list. Each entry is `org/repo` or `org/repo@url`.

| Entry | Where Care loads the app from |
| - | - |
| `org/repo` | GitHub Pages, at `https://<org>.github.io/<repo>` |
| `org/repo@host/path/to/remoteEntry.js` | That host over https, or over http if the host contains `localhost` |
| `org/repo@/path/to/remoteEntry.js` | A path on the Care frontend's own origin |

If an entry is not in one of these forms, the frontend logs it and leaves it out. The setting then fails validation, and the frontend does not start.

Care imports the URL exactly as given, so point it at the app's `remoteEntry.js`. On a test stack on 2026-11-29, entries that gave only a host failed to load with "Failed to fetch dynamically imported module"; the same entries ending in `/assets/remoteEntry.js` loaded.

This entry loads the ABDM frontend from a build served on the local machine at port 5020, and Filly from its hosted 3.1 build:

```
REACT_ENABLED_APPS="10bedicu/care_abdm_fe@localhost:5020/assets/remoteEntry.js,ohcnetwork/care_filly_fe@care-3-1.care-filly-fe.pages.dev/assets/remoteEntry.js"
```

The ABDM frontend README gives `ohcnetwork/care_abdm_fe@localhost:5173`, with no path to `remoteEntry.js`.

An app enabled this way is built in. Its slug is the repository name, and **Admin Dashboard** > **Apps** shows it as read-only: **View config** opens a form with the badges **Built-in** and **Read only** and no save button.

If a plug config row has the same slug as a built-in app, the built-in entry replaces it. The built-in entry's meta keys win, the row's other meta keys, such as `config`, are kept, and the app stays read-only. Built-in apps are listed first.

A `REACT_ENABLED_APPS` entry carries no config values. If a built-in app reads config values, put them in a plug config row with the same slug.

You can change `REACT_ENABLED_APPS` after the build. Serve your own `/runtime-env.js`: `care.config.ts` merges its values (`window.__CARE_RUNTIME_ENV__`) over the build's values. See [Runtime configuration](https://github.com/ohcnetwork/care_fe/blob/develop/docs/runtime-configuration.md) in the care\_fe repository.

`REACT_MFE_REGISTERED_COMPONENTS`, which lists the components that apps can override, is build-only. You cannot change it in `runtime-env.js`.

caution

If you build an app in and also install it from the App Store, Care has two entries for it. The two ways give different slugs, such as `care_filly_fe` and `care-filly`. The App Store shows **Install** for a built-in app. Use one way for each app.

In the development server only, Care also loads apps placed under `apps/<slug>/src/manifest.tsx`. Production builds include none of them.

### With Admin Dashboard > Apps

#### Who can use it

Only instance admins can install, change or delete apps on this page. In practice, this means superusers.

The page is at **Admin Dashboard** > **Apps**. Only superusers see the **Admin Dashboard** button on the user dashboard. **Apps** is under Administration in the admin sidebar.

The routes `/admin/apps` and `/admin/apps/$slug` check only that a user is signed in, so any signed-in user can open the page by its address.

Saving is checked on the backend. Creating, updating and deleting a plug config need a Django `is_staff` account (DRF `IsAdminUser`), so the backend refuses a save from any other user. No Care API sets `is_staff`; superusers are created with Django's `create_superuser`.

#### Where the catalog comes from

The **Available apps** tab lists the catalog at `REACT_APP_STORE_API_URL`. The default is `https://experience.ohc.network/api/plugins/`. `care.config.ts` has no other fallback.

Care 3.0 read a different setting, `REACT_APP_STORE_INDEX_URL`, which pointed at the care\_apps\_registry `index.json`. Care 3.1 reads neither that setting nor care\_apps\_registry.

The browser fetches the catalog directly, page by page, as `GET <REACT_APP_STORE_API_URL>?limit=100&offset=N`. The Care backend is not involved. If the browser cannot reach the catalog, the tab shows "Couldn't load the App Store" with a retry button.

To turn the catalog off, set `REACT_APP_STORE_API_URL` to an empty value. The page then shows the badge **App Store is not configured** and hides the **Available apps** tab.

Like `REACT_ENABLED_APPS`, this setting can be changed after the build in `runtime-env.js`.

On 2026-11-29 the default catalog listed three apps, all for Care 3.1: CARE AI Vision (`care-ai-vision`), CARE Excalidraw (`care-excalidraw`) and CARE Filly (`care-filly`).

#### The page

| Part | What it shows |
| - | - |
| Title | **CARE App Store** |
| **Installed apps** tab | Each installed app, with an **Installed** badge and **View config** (built in) or **Edit Config** (installed on this page). With no apps, it says "No apps are installed yet." |
| **Available apps** tab | The catalog, with **Configure** and **Install** on each app, tag filters that start with **All**, a **Search for apps** box, and **Load More** when there are more pages |
| **Manual setup** button | A blank setup form for an app that is not in the catalog. It is a button, not a tab. |

#### Install an app from the App Store

1. If the app has a backend part, install and deploy its plug first. See [Install the backend part](#install-the-backend-part).
2. Sign in with a superuser account.
3. On the user dashboard, select **Admin Dashboard**.
4. In the admin sidebar, select **Apps**.
5. Select the **Available apps** tab.
6. Find the app with **Search for apps** or a tag filter.
7. To install with the catalog's values, select **Install**.
8. To change the values first, select **Configure**, change them, and select **Save**. If the form has **Server health check**, select **Run health check** first.

When you select **Install**, Care does these steps in this order:

1. It checks that each config field of the app has a value. If a field is blank, it shows "This app needs a few details before it can be installed. Redirecting to setup." and opens the setup form.
2. If the app declares a backend health check, the browser calls the Care API URL followed by the health check path. If the call fails, Care shows "Health check could not reach the configured API. Verify networking and CORS before enabling the plug." and opens the setup form.
3. It saves a plug config row and shows "App installed successfully". The row's slug is the App Store id. Its meta holds `url`, `name`, `plug` and `config` from the app's catalog entry.

The setup form opens from **Configure**, from **Edit Config**, or after a failed check:

| Part | What it does |
| - | - |
| Heading | **Create New Config** for a new app, **Edit Config** for an installed app |
| App card | Publisher, License and categories, and an **App README** card when the catalog has one |
| **Slug** | Locked to the App Store id |
| **Configuration** | One text field for each config key, labelled with the key name and filled with the catalog's value |
| **Server health check** | Shown for an app with a backend part. **Run health check** shows **Healthy** or **Unhealthy**. For a new app, **Save** stays disabled until the check succeeds. |
| Buttons | **Save** for a new app, **Update** for an installed app, and **Delete Config** for an installed app that you can edit |

**Delete Config** asks you to confirm. Its message says that the deletion is permanent and cannot be undone.

The backend caches the plug config list and clears the cache on every create, update and delete. The frontend reads the list when it starts.

#### Set up an app by hand

Use **Manual setup** for an app that is not in the catalog.

1. In **Admin Dashboard** > **Apps**, select **Manual setup**.
2. In **Slug**, type the app's slug.
3. In **Meta (JSON)**, type the app's meta as JSON.
4. Select **Save**.

If the JSON is not valid, the form shows **Invalid meta JSON**.

The meta must contain `url`, the address of the app's `remoteEntry.js`. Care skips a config that has no `meta.url` and logs an error. App Store installs also write `name`, `plug` and `config`.

:::warning Plug config can be read without sign-in Anyone can read plug config rows, because `GET /api/v1/plug_config/` and `GET /api/v1/plug_config/<slug>/` need no sign-in. The frontend also puts each app's config in the browser as `window.__CARE_PLUGIN_RUNTIME__`. Do not put secrets, such as API keys, in an app's meta or config. Keep them in the backend plug's settings or in environment variables. :::

## Install the backend part

The default `plug_config.py` declares no plugs.

Declare a plug in one of two places:

* In `plug_config.py`, as a `Plug` in the `plugs` list that is passed to `PlugManager`.
* In the `ADDITIONAL_PLUGS` environment variable, as a JSON list of plug objects. If the value is not valid JSON, Care logs "ADDITIONAL\_PLUGS is not a valid JSON" and ignores it.

| Field | Meaning |
| - | - |
| `name` | The Django app name. Care serves the plug's URLs under `/api/<name>/`. |
| `package_name` | The package to pip-install, for example a `git+https://` URL |
| `version` | Appended to the package name. The default is `@main`. Set it to a branch that exists: care\_abdm, for example, has no `main` branch. |
| `configs` | Settings for the plug. Care collects them into `PLUGIN_CONFIGS`. |

This example declares the ABDM plug in `plug_config.py`. The name is from the care\_abdm README. The repository and branch are where the code is on 2026-11-29:

```
from plugs.manager import PlugManager

from plugs.plug import Plug



abdm_plug = Plug(

    name="abdm",

    package_name="git+https://github.com/10bedicu/care_abdm.git",

    version="@develop",

    configs={},

)



plugs = [abdm_plug]



manager = PlugManager(plugs)
```

The same plug in `ADDITIONAL_PLUGS`:

```
ADDITIONAL_PLUGS='[{"name": "abdm", "package_name": "git+https://github.com/10bedicu/care_abdm.git", "version": "@develop", "configs": {}}]'
```

`install_plugins.py` pip-installs every declared plug. The production and development Dockerfiles run it when they build the image, with `ADDITIONAL_PLUGS` as a build argument. No start script installs plugs, so rebuild the image after you add, remove or change a plug.

When the backend starts, Django adds every plug to `INSTALLED_APPS`, builds `PLUGIN_CONFIGS` from the plugs' `configs`, and serves each plug's URLs under `/api/<plug name>/`.

:::caution Set ADDITIONAL\_PLUGS where the backend runs As read in the code, not tested: the production Dockerfile sets `ADDITIONAL_PLUGS` only in its builder stage, and Care reads the plug list from the environment again when it starts. A plug given only as a build argument is then installed but not loaded. Set `ADDITIONAL_PLUGS` in the environment of each backend container too, or list the plug in `plug_config.py`. :::

The [AWS ECS guide](https://docs.ohc.network/deployment/providers/aws/ecs.md) passes `ADDITIONAL_PLUGS` as a build argument only.

Care passes `PLUGIN_CONFIGS` to plugs, and each plug decides how it reads its settings. The ABDM plug, for example, reads each setting from its `configs` first, then from the environment, then from its default.

### Plug permissions and roles

A plug can add permissions with `PermissionController.register_permission_handler` and roles with `RoleController.register_role`.

These permissions and roles reach the database only through `manage.py sync_permissions_roles`, which "should be run after all deployments and plug changes". The shipped Celery beat script runs it when it starts.

After a deployment that adds or changes a plug, run the sync:

```
python manage.py sync_permissions_roles
```

After the sync, a plug permission appears in the admin role editor like a core permission.

## Match app builds to Care 3.1

The backend plug machinery did not change between Care 3.0 and 3.1. The frontend side did, so an app's frontend part needs a build that matches Care 3.1.

* Care 3.1 shares these packages with apps: `react`, `react-dom`, `react-i18next`, `@tanstack/react-query`, `@tanstack/react-router`, `sonner` and `decimal.js`. It does not share `raviger`, although some app builds, including the AI Vision 3.1 build, still list it as shared.
* The care\_abdm\_fe 3.1 compatibility change, for example, replaced `raviger` with `@tanstack/react-router`, which care\_abdm\_fe now shares with the host.
* The Scribe slot now receives `actions` and `invoke`, in place of the 3.0 `formState` and `setFormState`. An app that uses this slot needs a matching 3.1 build.
* The App Store setting is `REACT_APP_STORE_API_URL`, not the 3.0 `REACT_APP_STORE_INDEX_URL`.

Catalog entries carry `branch` and `care_version` fields, but the frontend does not read them. Care does not filter or warn by Care version, so check `care_version` before you install.

The 3.1 catalog entries for Filly and AI Vision point at builds from the apps' `care-3.1` branches, hosted on `care-3-1.*.pages.dev`. On 2026-11-29 both hosted builds served their branch heads' label files, and the AI Vision build held code newer than the commit the catalog lists.

For an app that you enable yourself, use the build that its maintainers name for Care 3.1. For example, the care\_abdm\_fe README says that it requires care\_fe 3.1 or later.

## App notes

### ABDM

ABDM (Ayushman Bharat Digital Mission) applies to deployments in India. For what staff do with it, see [ABDM and ABHA](https://docs.ohc.network/apps/abdm.md).

ABDM has a backend part, the care\_abdm plug with the name `abdm`, and a frontend part, care\_abdm\_fe. It was not in the App Store catalog on 2026-11-29.

#### Backend

* Declare the plug as in the example above. Care serves its API under `/api/abdm/`.
* Set these settings in the plug's `configs` or in the environment: `ABDM_CLIENT_ID`, `ABDM_CLIENT_SECRET`, `ABDM_GATEWAY_URL`, `ABDM_ABHA_URL`, `ABDM_FACILITY_URL`, `ABDM_CM_ID`, `CURRENT_DOMAIN` and `BACKEND_DOMAIN`.
* Scan & Pay needs a payment provider registered under the name in `ABDM_SCAN_AND_PAY_PROVIDER` (default `razorpayx`). care\_abdm ships no provider, and an unknown name is a configuration error.

warning

The defaults point at the ABDM sandbox: client id `SBX_001`, gateway `dev.abdm.gov.in`, ABHA `abhasbx`, facility `facilitysbx` and CM id `sbx`. The plug loads with these defaults, but calls to ABDM fail. For a production deployment, override all of them.

`CURRENT_DOMAIN` and `BACKEND_DOMAIN` default to `https://care.ohc.network` and `https://careapi.ohc.network`. The plug builds the address where ABDM sends fetched records from `BACKEND_DOMAIN`. Set both to your own addresses.

#### Frontend

* Enable it with `REACT_ENABLED_APPS`, as `ohcnetwork/care_abdm_fe@<host>`, where `<host>` serves the app's build. Its slug is `care_abdm_fe`.
* Its options come from `meta.config` of the plug config row with the slug `care_abdm_fe`. The `REACT_ENABLED_APPS` entry carries no config, and it keeps the row's `config` when both exist.
* Create that row with **Manual setup**, or with `POST /api/v1/plug_config/` as an `is_staff` user.
* If you do not build the app in, the row also needs `url`. See [Set up an app by hand](#set-up-an-app-by-hand).

| Option | Effect |
| - | - |
| `enforceAbhaNumberLinking` | On the patient registration and update form, the ABHA drawer opens by itself for a patient with no ABHA. The only way out other than linking is "Go back" to the patient search. |
| `scanAndShareUrl` | Turns on "Generate Scan and Share QR" in the Configure Health Facility sheet. The QR code encodes this URL, with `<HF_ID>` replaced by the Health Facility Id and `<COUNTER_ID>` by the counter name. Without it, the sheet says that the QR code is not available. |
| `faceAuthUrl` | Shows "Verify with Face" for an Aadhaar number. |
| `enableScanPayMarkPaid` | Shows "Mark as paid" on pending Scan & Pay orders, for users with "Can Update Account" in the facility. |
| `enableScanPayCancelOrder` | Shows "Cancel order" on pending Scan & Pay orders, for users with "Can Update Account" in the facility. |

### Filly and AI Vision

Filly and AI Vision are in the App Store catalog. Both need the care\_filly backend plug, and the App Store installs only their frontend parts.

For what staff do with them, see [Filly](https://docs.ohc.network/apps/filly.md) and [AI Vision](https://docs.ohc.network/apps/ai-vision.md).

#### Backend: care\_filly

* Declare care\_filly as a plug, rebuild the image, and run `python manage.py migrate care_filly`. Care serves it under `/api/care_filly/`.
* Set `MEDISPEAK_BASE_URL` and `MEDISPEAK_API_KEY` in the plug's `configs` or in the environment. Both are empty by default.
* Keep the Medispeak API key on the backend. Do not put it in the app's config.
* Run `sync_permissions_roles`, so that the permission "Can Use Filly" reaches the database.

Without the two Medispeak settings, Care still starts, with the warning `care_filly.W001`. Starting a session then returns 502 with "MEDISPEAK\_BASE\_URL is not configured" or "MEDISPEAK\_API\_KEY is not configured", and the apps show that text.

Both apps use the health check `/api/care_filly/healthz`, which the App Store runs from the browser before it installs them. The check returns `{"ok": true}` without sign-in and without contacting Medispeak, so a passing check does not show that Medispeak is set up.

Filly sends audio from the browser straight to Medispeak, with a short-lived token from care\_filly, and AI Vision uploads its images and PDFs to Medispeak. care\_filly stores only a pointer row for each session (user, facility and Medispeak session id). Transcripts and extracted data stay with Medispeak, and the backend never receives the audio.

:::caution AI Vision and the care\_filly branch AI Vision asks care\_filly for a document session (`modality: "document"`). At care\_filly develop (55fa66c) the session call does not forward `modality`. The `ocr` branch does, and the two branches have diverged. This was read in the code, not run. Ask the app's maintainers which care\_filly branch to use with AI Vision. :::

#### Permission: Can Use Filly

"Can Use Filly" ("Allows recording an encounter and generating a filly draft") is a facility permission that care\_filly adds. It exists only on deployments that install care\_filly.

By default, Doctor, Nurse, Staff, Facility Admin and Administrator hold it. Pharmacist and Volunteer do not.

Both apps start their sessions through care\_filly, so users of both apps need it. A user needs it through a role in any organization of the facility. Without it, starting a session fails with "You do not have permission to use filly."

Role permissions can be edited, so you can add it to another role in the admin role editor.

#### Frontend config

| App | Config key | Catalog value | Effect |
| - | - | - | - |
| Filly | `FILLY_LANGUAGES` | `ta,en,ml` | The languages offered after "Auto-detect": here Tamil, English and Malayalam |
| Filly | `ENABLE_FILLY_MASCOT` | `true` | An animated mascot replaces the plain button, unless the value is `false` |
| Filly | `REACT_MEDISPEAK_API_URL` | `https://medispeak.ohc.network/api/v2` | The Medispeak address. Filly also accepts `MEDISPEAK_API_URL`. |
| AI Vision | `MEDISPEAK_API_URL` | `https://medispeak.ohc.network/api/v2` | The Medispeak address |

Each user turns each app on for their own account. Both apps are off until the user does this.

## Related

* [Define extension fields](https://docs.ohc.network/deployment/configuration/define-extension-fields.md)
* [Apps in Care](https://docs.ohc.network/apps/apps-in-care.md)
* [Plugin system](https://docs.ohc.network/contributing/plugins.md), for developers who build apps
