Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Tech-Labi/medusa2-marketplace-demo

Repository files navigation

Medusa2 Marketplace demo

This is a demo project which demoes how to create a multivendor marketplace demo using Medusa 2.0

Note

UPD: all the multivendor marketplace related code was moved to medusa-marketplace-plugin, so the demo app now uses this plugin (read Part 4 below).

A four-part series articles on Medium:

  • πŸ›  Part 1: setting up the multi-vendor structure and understanding how to manage multiple sellers on a single Medusa instance
  • πŸ§‘β€πŸ’Ό Part 2: building a powerful Super Admin layer to oversee vendors, products, orders, and more
  • 🎨 Part 3: customizing the Medusa Admin Dashboard to give super admins and vendors a clean, user-friendly experience
  • 🎨 Part 4: bring it all together - packaging everything into a Medusa 2 plugin

1_EMHanavMVUIrwCw4_ROoiw

How to run

Option 1: All in one

If you want to run both PostgreSQL and Medusa in one command, use the following command that combines both the main docker-compose.yml file and the docker-compose.medusa.yml file:

docker compose -f docker-compose.yml -f docker-compose.medusa.yml up --build

This command will build and start both PostgreSQL and Medusa containers.

Important: You can only run this command after PostgreSQL has already been started using the docker compose up command from Option 2 (below). This is because PostgreSQL creates a network that Medusa depends on to run properly.

Option 2: run Medusa app manually

  1. Run PostgreSQL

By default, running the following command will start only the PostgreSQL container:

docker compose up

This command will use your default docker-compose.yml file to start the PostgreSQL service, but Medusa will not be started automatically. This step is required because we create a network in PostgreSQL, and Medusa depends on it.

  1. Run Medusa app manually
cd medusa-marketplace-demo
yarn
cp .env.template .env
npx medusa db:setup --db marketplace
npx medusa db:migrate
yarn dev

The Medusa dashboard should now be running on http://localhost:9000/app

Cleanup resources

If you want to remove the containers, networks, and volumes created by Docker Compose, use the following commands:

Option 1: Using the default docker-compose.yml (for PostgreSQL only)

docker compose down -v

Option 2: Using the combined docker-compose.yml and docker-compose.medusa.yml

docker compose -f docker-compose.yml -f docker-compose.medusa.yml down -v

License

MIT

About

A demo project of Medusa 2.0 multivendor marketplace

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /