Admin dashboard plugin for Medusa e-commerce platform providing web interface for managing products, orders, customers, and store configuration.
npx @tessl/cli install tessl/npm-medusajs--admin@7.1.0@medusajs/admin is a TypeScript-based plugin for the Medusa e-commerce platform that provides a comprehensive admin dashboard for managing online stores. It serves as both a build tool and runtime server component, enabling merchants to manage products, orders, customers, and store configuration through a web interface.
npm install @medusajs/admin or yarn add @medusajs/adminimport { withCustomWebpackConfig, PluginOptions } from "@medusajs/admin";For CommonJS:
const { withCustomWebpackConfig } = require("@medusajs/admin");The package is primarily used as a Medusa plugin in medusa-config.js:
module.exports = {
plugins: [
{
resolve: "@medusajs/admin",
options: {
serve: true,
path: "/app",
autoRebuild: false,
outDir: "build"
}
}
]
};@medusajs/admin is built around several key components:
Core plugin functionality for integrating with Medusa server instances. Provides Express routes and static file serving for the admin dashboard.
export function withCustomWebpackConfig(): any;
export interface PluginOptions extends AdminOptions {
/** Whether to serve the admin dashboard */
serve?: boolean;
/** Auto rebuild when options change (memory intensive) */
autoRebuild?: boolean;
}Command-line tools for building, developing, and bundling the admin dashboard and extensions.
interface BuildOptions extends AdminOptions {
deployment?: boolean;
}
interface DevelopArgs extends AdminOptions {
port: number;
}Available commands:
medusa-admin build - Build admin dashboard for productionmedusa-admin develop - Start development servermedusa-admin bundle - Bundle admin extensionsComplete TypeScript definitions for configuration options, UI extension components, and Medusa entity integrations.
export interface PluginOptions extends AdminOptions {
serve?: boolean;
autoRebuild?: boolean;
}
export interface RouteConfig {
// Re-exported from @medusajs/admin-ui
}
export interface WidgetConfig {
// Re-exported from @medusajs/admin-ui
}interface AdminOptions {
/** Path to serve admin dashboard on */
path?: string;
/** Output directory for build files */
outDir?: string;
/** Backend URL for API calls */
backend?: string;
/** Development server options */
develop?: {
port?: number;
host?: string;
open?: boolean;
allowedHosts?: string;
webSocketURL?: string;
};
}