Backend overview
The backend is a robust, modular system built on top of MedusaJS that serves as the core engine of the platform. It’s designed to handle complex business logic, data management, and API integrations while providing a secure and scalable foundation for the entire application.Check Mercur main repository:
Github
Architecture
Mercur backend comes as a set of plugins you can install into plain Medusa application. This plugin-based architecture was intentionally designed to make Mercur highly modular and easy to update. By breaking down functionality into discrete plugins, you can selectively install only the features your marketplace needs, maintain each component independently, and seamlessly adopt new updates without disrupting your entire system. After plugin installation and configuration, you can start the backend and use Mercur, or extend, modify and override its behaviour like you normally do in Medusa applications.Customization
Workflows
Some of the Mercur workflows expose workflow hooks. You can utilize them to inject custom features into existing logic.API
You can change the API content of Mercur in two ways. First, is to override by creating exactly the same route in the customization layer, and modify the behaviour. Second, you can create other endpoint and create your own logic. More on that topic can be found in Medusa docs.Data models
Existing models created in Mercur can be extended by creating a separate module in your customization layer, and then linking them together. This approach is covered in Medusa docs.API
The backend exposes three main APIs:- Admin API: Provides administrative capabilities and system management.
- Vendor API: Built to resemble Admin API, this interface enables sellers to manage their own resources including orders, products, customer groups, promotions, and other marketplace-specific features. Each seller has access only to their own data and operations.
- Store API: Handles customer-facing operations and e-commerce functionality.
Actors
MercurJS recognizes three types of actors:- User: this actor has all administrative privileges, and is the only actor type who can use the administration panel.
- Seller has access to the vendor panel. Each
selleraccount is assigned to only one store it can manage. - Customer is a regular marketplace user.