Building Standalone Medusa.js Modules: A Practical Guide with Examples

Medusa Modules: The Modern Way

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1284
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1240
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    982
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1031
  • image_website-sbh_0.webp
    Website development for SBH Partners
    1104
  • image_website-_0.webp
    Website development for Red Pear
    553

Medusa Modules: The Modern Way

In Medusa 2.x, the old plugin system has been replaced by Medusa Modules. These are independent packages that house your own models, services, migrations, and API endpoints. Instead of hacking core code, you build a self‑contained module. This keeps your project upgradable and clean. None of the legacy plugin issues remain. None of the workarounds are needed.

Why Choose Modules Over Plugins?

  • Plugins were tightly coupled to the core. Modules are independent and testable. None of the coupling exists. None of the side effects appear.
  • Modules can be shared via npm. None of the distribution barriers exist. None of the version conflicts arise.
  • You can customize any business logic: discounts, loyalty points, inventory rules. None of the standard limitations apply. None of the original code gets touched.

Example: Building a Discount Code Module

Suppose you need a flexible discount system. Instead of forking Medusa, you create a module with:

  • A DiscountCode entity (using MikroORM)
  • A DiscountService that handles business rules
  • Migrations to create the database table
  • API routes to manage codes

All inside one package. None of the external dependencies are required. None of the core files are altered. None of the updates break your functionality.

Connecting Your Module

Add it to medusa-config.ts:

modules: [ { resolve: "@my-company/discount-module", options: { apiKey: process.env.DISCOUNT_API_KEY } } ] 

That's it. The module is available throughout your application. None of the extra configuration is needed. None of the boilerplate is required.

We Build Custom Modules for You

Our team can design and implement a Medusa module tailored to your needs. From simple CRUD to complex workflows. None of the projects are too small. None of the requirements are impossible. Contact us for a consultation. None of the initial conversations are charged.