# @medusajs/admin

> @medusajs/admin

Latest version **7.1.18** (published 2025-02-07) · 0 weekly downloads

## Install

```sh
npm install @medusajs/admin
pnpm add @medusajs/admin
yarn add @medusajs/admin
bun add @medusajs/admin
```

Provides the command `medusa-admin`.

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; high quality score; popular repo.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 7.1.18 |
| Published | 2025-02-07 |
| First published | 2023-03-02 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 17 |
| Unpacked size | 73 KB |
| Known vulnerabilities | 0 (+5 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 36482 |
| Maintainers | sebrindom, oliverjuhl |

## Links

- npm: https://www.npmjs.com/package/@medusajs/admin
- Repository: https://github.com/medusajs/medusa
- Homepage: https://github.com/medusajs/medusa#readme
- Issues: https://github.com/medusajs/medusa/issues
- npm.io page: https://npm.io/package/@medusajs/admin

## Dependencies (17)

- [dotenv](https://npm.io/package/dotenv.md) ^16.4.5
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [rollup](https://npm.io/package/rollup.md) 3.20.7
- [esbuild](https://npm.io/package/esbuild.md) 0.17.18
- [express](https://npm.io/package/express.md) 4.18.2
- [fs-extra](https://npm.io/package/fs-extra.md) 11.1.0
- [commander](https://npm.io/package/commander.md) ^10.0.0
- [ts-dedent](https://npm.io/package/ts-dedent.md) ^2.2.0
- [medusa-core-utils](https://npm.io/package/medusa-core-utils.md) 1.2.3
- [@medusajs/admin-ui](https://npm.io/package/@medusajs/admin-ui.md) ^2.1.18
- [@rollup/plugin-json](https://npm.io/package/@rollup/plugin-json.md) 6.0.0
- [@rollup/plugin-alias](https://npm.io/package/@rollup/plugin-alias.md) 5.0.0
- [rollup-plugin-esbuild](https://npm.io/package/rollup-plugin-esbuild.md) 5.0.0
- [@rollup/plugin-replace](https://npm.io/package/@rollup/plugin-replace.md) 5.0.2
- [@rollup/plugin-virtual](https://npm.io/package/@rollup/plugin-virtual.md) ^3.0.1
- [@rollup/plugin-commonjs](https://npm.io/package/@rollup/plugin-commonjs.md) 24.1.0
- [@rollup/plugin-node-resolve](https://npm.io/package/@rollup/plugin-node-resolve.md) 15.0.2

## Recent versions

- 7.1.18 (latest) — 2025-02-07
- 7.1.16-snapshot-20240723085529 (snapshot) — 2024-07-23
- 7.1.14-next-20240502141229 (next) — 2024-05-02
- 6.0.5-canary-20230806135701 (canary) — 2023-08-06
- 7.0.0-beta-20230727162508 (beta) — 2023-07-27
- 7.0.0-alpha-20230713133730 (alpha) — 2023-07-13
- 5.0.1-preview-20230528131710 (preview) — 2023-05-28
- 4.0.1-nextjs-commerce-20230515081748 (nextjs-commerce) — 2023-05-15
- 4.0.1-nextjs-20230507103235 (nextjs) — 2023-05-07
- 1.0.0-rc.8 (rc) — 2023-04-04
- 7.1.17 — 2024-09-27
- 7.1.16 — 2024-07-29
- 7.1.15 — 2024-07-18
- 7.1.15-snapshot-20240718083016 — 2024-07-18
- 7.1.14 — 2024-05-02
- … 652 more at https://npm.io/package/@medusajs/admin/versions

## README

<p align="center">
  <a href="https://www.medusajs.com">
    <img alt="Medusa" src="https://user-images.githubusercontent.com/7554214/153162406-bf8fd16f-aa98-4604-b87b-e13ab4baf604.png" width="100" />
  </a>
</p>
<h1 align="center">
  @medusajs/admin
</h1>

<h4 align="center">
  <a href="https://docs.medusajs.com/v1">Documentation</a> |
  <a href="https://demo.medusajs.com/">Medusa Admin Demo</a> |
  <a href="https://www.medusajs.com">Website</a>
</h4>

<p align="center">
An open source composable commerce engine built for developers.
</p>
<p align="center">
  <a href="https://github.com/medusajs/medusa/blob/master/LICENSE">
    <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Medusa is released under the MIT license." />
  </a>
  <a href="https://circleci.com/gh/medusajs/medusa">
    <img src="https://circleci.com/gh/medusajs/medusa.svg?style=shield" alt="Current CircleCI build status." />
  </a>
  <a href="https://github.com/medusajs/medusa/blob/master/CONTRIBUTING.md">
    <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" alt="PRs welcome!" />
  </a>
    <a href="https://www.producthunt.com/posts/medusa"><img src="https://img.shields.io/badge/Product%20Hunt-%231%20Product%20of%20the%20Day-%23DA552E" alt="Product Hunt"></a>
  <a href="https://discord.gg/xpCwq3Kfn8">
    <img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Discord Chat" />
  </a>
  <a href="https://twitter.com/intent/follow?screen_name=medusajs">
    <img src="https://img.shields.io/twitter/follow/medusajs.svg?label=Follow%20@medusajs" alt="Follow @medusajs" />
  </a>
</p>

## Getting started

Install the package:

```bash
yarn add @medusajs/admin
```

Add the plugin to your `medusa-config.js`:

```js
module.exports = {
  // ...
  plugins: [
    {
      resolve: "@medusajs/admin",
      options: {
        // ...
      },
    },
  ],
  // ...
}
```

## Configuration

The plugin can be configured with the following options:

| Option        | Type       | Description                                                                                                                                             | Default     |
| ------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| `serve`       | `boolean?` | Whether to serve the admin dashboard or not.                                                                                                            | `true`      |
| `path`        | `string?`  | The path the admin server should run on. Should not be prefixed or suffixed with a slash. Cannot be one of the reserved paths: `"admin"` and `"store"`. | `"app"`     |
| `outDir`      | `string?`  | Optional path for where to output the admin build files                                                                                                 | `undefined` |
| `autoRebuild` | `boolean?` | Decides whether the admin UI should be rebuild if any changes or a missing build is detected during server startup                                      | `false`     |

**Hint**: You can import the PluginOptions type for inline documentation for the different options:

```js
module.exports = {
  // ...
  plugins: [
    {
      resolve: "@medusajs/admin",
      /** @type {import('@medusajs/admin').PluginOptions} */
      options: {
        path: "app",
      },
    },
  ],
  // ...
}
```

## Building the admin dashboard

The admin will be built automatically the first time you start your server if you have enabled `autoRebuild`. Any subsequent changes to the plugin options will result in a rebuild of the admin dashboard.

You may need to manually trigger a rebuild sometimes, for example after you have upgraded to a newer version of `@medusajs/admin`, or if you have disabled `autoRebuild`. You can do so by adding the following script to your `package.json`:

```json
{
  "scripts": {
    "build:admin": "medusa-admin build"
  }
}
```

## Accessing the admin dashboard

The admin dashboard will be available at `your-server-url/app`, unless you have specified a custom path in the plugin options. If you are running your server locally on port 9000 with the default path `"app"`, you will be able access the admin dashboard at `http://localhost:9000/app`.

---
_Source: https://npm.io/package/@medusajs/admin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
