# Enabling Custom Extensions

You can extend the Management Dashboard with your custom extensions, which can be embedded directly in Management Dashboard to make it easier for your employees to work with integrated systems. Learn how to prepare your custom extension to make it work smoothly within Emporix platform.

## Custom extension

### Prerequisites

Use the **MD extension template** to build your extension. The template is based on the module federation concept that introduces more flexibility for developers, who can use the shared code, components and dependencies in the custom applications. Refer to the [MD Module Template](https://github.com/emporix/md-module-template) repository to start building your own extension.

### Create a custom extension

{% stepper %}
{% step %}
Fork the [MD Module Template](https://github.com/emporix/md-module-template) repository and create your own project from it.
{% endstep %}

{% step %}
Install dependencies in your new project by running `npm install`.
{% endstep %}

{% step %}
Copy `.env.example` to `.env` and provide the API URL for your environment.
{% endstep %}

{% step %}
Start local development with `npm run dev` and build your extension UI.
{% endstep %}

{% step %}
Before publishing, run quality checks:

* `npm run lint`
* `npm run typecheck`
* `npm run test:run`
  {% endstep %}

{% step %}
Build the extension for deployment by running `npm run build`.
{% endstep %}

{% step %}
Host the generated files on your preferred hosting platform and make sure the app can be loaded from the Management Dashboard domain (CORS enabled).
{% endstep %}

{% step %}
Copy the URL to `remoteEntry.js` from your hosted build. You need it when registering the extension in Management Dashboard.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
If you want to test your extension locally in Management Dashboard first, run `npm run preview` and use the local `remoteEntry.js` URL from the preview server.
{% endhint %}

### Add the extension to the Management Dashboard

When your extension is ready, add it to the Management Dashboard. There are a few ways to add an extension:

* As an extension - follow the steps described in [Extensions](/ce/management-dashboard/administration/extensions.md). The custom extension is visible under **Extensions** module.
* As a module - follow the steps described in [Modules](/ce/management-dashboard/administration/modules.md#add-custom-modules). The module is displayed where you place it in the navigation menu.
* As a perspective - follow the steps described in [Perspectives](/ce/management-dashboard/administration/perspectives.md). The extension is available from the perspective chooser.

This video tutorial demonstrates how to add the custom extension to the Emporix Management Dashboard.

{% embed url="<https://youtu.be/FnomFyz2gAg>" %}

{% hint style="success" %}
**Hosting**

Emporix provides you with the possibility to host the custom extensions within the Emporix infrastructure. Emporix hosting is a secure, and scalable way to store your custom components. To have the service enabled on your tenant, contact the [Sales Team](mailto:sales@emporix.com).

Learn more in [Extension and Cloud Function Hosting](/ce/extensibility-and-integrations/extensibility-cases/extension-hosting.md).
{% endhint %}

## Example use case

Custom extensions can support many different business needs and help your teams work more efficiently in many ways.

One practical example is a custom extension for improving storefront search by managing synonyms in your search index provider.\
We have built the *Synonyms* extension that communicates directly with an index provider and we've embedded it in the Management Dashboard. While the example uses Algolia, the same approach can be used with other providers.

With this extension, your team can add, edit, and remove product-related synonyms directly in the Emporix UI.\
This helps improve search relevance, because customers often use different words for the same product.\
As a result, teams can optimize search results without switching to a separate search provider interface.

{% hint style="warning" %}
The *Synonyms* extension is an example use case of custom extensions.\
If you want to try it out, as a prerequisite for the extension to work, you need to activate and configure your own index provider.\
You can achieve that by using the Emporix API.\
To learn more, see the [Indexing Service](/ce/system-management/search/indexing.md).
{% endhint %}

<figure><img src="/files/96k8VuDe8RDbMjBxWd6l" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To see more example extensions that are available for public reuse and adaptation, refer to the [MD Extensions](https://github.com/emporix/md-extensions/tree/master) repository. Check it out to get inspired and start building your own extensions.
{% endhint %}

{% hint style="info" %}
See also the related pages:

* [Management Dashboard - Administration - Extensions](/ce/management-dashboard/administration/extensions.md)
* [Management Dashboard - Extensions](/ce/management-dashboard/extensions.md)
* [Management Dashboard - Modules](/ce/management-dashboard/administration/modules.md)
* [Management Dashboard - Perspectives](/ce/management-dashboard/administration/perspectives.md)
  {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/ce/extensibility-and-integrations/extensibility-cases/custom-extensions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
