Skip to content

Quickstart

Add Core to your Medusa application, optionally use Manta Dashboard, and create your first company order.

Before you start

You need a working Medusa application. If you haven’t created one yet, follow Create Medusa App. Check the supported versions before installing.

1. Install Core

Install the package

In your Medusa application directory, run:

Terminal
npm install @mantajs/core

Register Core

In medusa-config.ts, add Core to the plugins array inside defineConfig. Create the array if needed and keep your other entries. Core has no mandatory configuration options. The excerpt below shows where it belongs; merge it into your existing configuration.

medusa-config.ts
// medusa-config.ts
import { defineConfig } from "@medusajs/framework/utils"

module.exports = defineConfig({
  // Keep your existing application configuration here.
  plugins: [
    // Keep your other plugins here.
    { resolve: "@mantajs/core", options: {} },
  ],
})

Run the migrations

Before the first migration of an existing database, back it up, restore it in isolation and test the migration on that copy. Preserve the application configuration and other plugins.

Create Core’s tables and module links:

Terminal
npx medusa db:migrate

Core supplies the private b2b_company index for the Companies directory. Medusa 2.23.1 enables PostgreSQL Search by default: normal db:migrate creates the index, then shared/worker startup fills it in the background. No additional Core-specific configuration or first-install reindex script is required. Keep Search enabled and check initialization errors; disabling it breaks the directory. This private Admin index must not be exposed through Store.

2. Install Dashboard (optional)

Dashboard is optional: Core’s company pages also work in the native Medusa Admin. Install Dashboard for its B2B or mixed navigation.

Install the package

Terminal
npm install @mantajs/dashboard

Configure the Admin

Import withB2BDashboard in medusa-config.ts. Wrap the existing admin options inside defineConfig with this helper. Keep those options, including any Vite function, backendUrl and storefrontUrl. If there is no admin property, add admin: withB2BDashboard({}).

medusa-config.ts
// medusa-config.ts
import { defineConfig } from "@medusajs/framework/utils"
import { withB2BDashboard } from "@mantajs/dashboard/config"

module.exports = defineConfig({
  // Keep your existing application configuration and plugins here.
  admin: withB2BDashboard({
    // Keep your existing admin options here.
  }),
})

Dashboard replaces the Admin during the build. Do not add it to plugins; it has no database migration.

Use the Dashboard version matching your Core version; see compatibility.

3. Build and start

Build the application, then start the development server:

Terminal
npx medusa build
npx medusa develop

Open your usual Medusa Admin URL (http://localhost:9000/app with the default local setup) and sign in. Core’s company pages, such as Companies, appear in the Admin menu. Dashboard organises these entries according to the commerce mode.

4. First company order

Your store needs its usual Medusa settings: a region and currency, a sales channel, priced products with stock, shipping and payment. If needed, use the Medusa Merchant Guide.

In the default native Admin without Dashboard, product creation has an accessibility limitation; pointer-based creation remains possible.

Unfiltered Companies list showing Company A and Company B, with the Employees column and Create company button.
Companies directory with synthetic Company A and Company B. Manta Core 1.0.3 and Dashboard 1.0.3 on Medusa 2.23.1. The list retains its Employees column.
  1. Open Core’s Companies entry in the Admin and create a company with its billing address and currency. Choose the currency of an existing region. With Dashboard, Companies appears in the B2B navigation.
  2. On the company page, open Buyers and choose Add existing customers. Search for and select the customer who already has a store account. This adds their buyer membership for the company.
  3. Open Core’s Draft Orders entry and create a draft for this company. With Dashboard, drafts are under B2B Orders. Choose a region in the company’s currency and a sales channel, add an in-stock priced variant, then select shipping.
  4. Enter a contact email and delivery phone number, then convert the draft into an order. Open the order and check its company and totals. Continue with Medusa’s usual payment and fulfilment steps.

Create buyer creates a guest contact, not a store login or invitation. To authorise an existing store account, use Add existing customers. Registering later with the same email does not automatically transfer the guest contact’s membership.

Company A details with Buyers, Create buyer, Add existing customers, a registered buyer and shared shipping address.
Company A with the Buyers card and its Create buyer and Add existing customers actions. Manta Core 1.0.3 and Dashboard 1.0.3 on Medusa 2.23.1; synthetic data.

The Account column reflects native has_account: Registered for true, No store account for false, and — when absent. Adding a guest contact does not create authentication credentials. Company membership is managed on this Company page, without a separate membership widget on the Customer profile.

If you installed Dashboard: choose a commerce mode

With Manta Dashboard installed, open Settings → Commerce. Select B2C and B2B for personal and company commerce, or B2B only for company purchasing. Both modes use the same Medusa catalogue, inventory, taxes and fulfilment. Core stores the mode; Dashboard uses it to organise navigation.

The mode changes Admin navigation, not backend permissions or storefront access. See Commerce modes.

Next

Understand companies and buyers

Connect your storefront with the Core API

Configure Dashboard commerce modes