- Event emission and subscribers
- Workflows and distributed transaction orchestration
- File storage (local or cloud)
- Notification pipelines (email, SMS, internal channels)
- Caching and performance
- Distributed locking
- Analytics
Analytics Module
Tracks system and user events (such as cart updates or order placements) and forwards them to analytics providers.
Caching Module
Provides high-performance caching for frequently accessed data. Supports Redis, Memcached, and custom providers.
Event Module
Implements the publish/subscribe system used to emit events and run subscribers. Supports Local and Redis providers.
File Module
Handles file upload, retrieval, and storage. Used for assets such as product images. Supports Local and S3 providers.
Locking Module
Provides distributed locking to prevent race conditions during concurrent operations. Supports Redis and PostgreSQL providers.
Notification Module
Sends notifications through channels like email or SMS. Supports SendGrid, Resend, Slack, and Local providers.
Workflow Engine Module
Tracks and manages the execution of workflows and steps with strong consistency guarantees. Supports In-Memory and Redis engines.
How Mercur Uses These Modules
Mercur relies on Medusa’s infrastructure layer to power marketplace-specific concerns:- Event Module → seller actions, approval flows, requests, commissions
- Workflow Engine → multi-step processes like onboarding, payouts, order splitting
- File Module → seller product images, documents, attachments
- Caching Module → all cart-related operations
- Locking Module → concurrency protection for order splitting and inventory updates
- Notification Module → seller/admin notifications
- Analytics Module → seller performance and buyer activity tracking