Architectural Modules

Medusa's architectural functionalities, such as emitting and subscribing to events or caching data, are all implemented in Architectural Modules. An Architectural Module is a package that can be installed and used in any Medusa application. These modules allow you to choose and integrate custom services for architectural purposes.

For example, you can use our Redis Event Module to handle event functionalities, or create a custom module that implements these functionalities with Memcached. Learn more in the Architecture documentation.

This section of the documentation showcases Medusa's Architectural Modules, how they work, and how to use them in your Medusa application.

Cache Module#

A Cache Module is used to cache the results of computations such as price selection or various tax calculations. Learn more in this documentation.

The following Cache modules are provided by Medusa. You can also create your own cache module as explained in this guide.

In-Memory
For Development
Redis
For Production

Event Module#

An Event Module implements the underlying publish/subscribe system that handles queueing events, emitting them, and executing their subscribers. Learn more in this documentation.

The following Event modules are provided by Medusa. You can also create your own event module as explained in this guide.

Local
For Development
Redis
For Production

File Module#

The File Module handles file upload and storage of assets, such as product images. Refer to the File Module documentation to learn more about it.

The File Module has module providers that implement the underlying logic of handling uploads and downloads of assets, such as integrating third-party services. The following File Module Providers are provided by Medusa. You can also create a custom provider as explained in the Create File Module Provider guide.

Local
For Development
AWS S3 (and Compatible APIs)
For Production

Locking Module#

The Locking Module manages access to shared resources by multiple processes or threads. It prevents conflicts between processes and ensures data consistency. Refer to the Locking Module documentation to learn more about it.

The Locking Module uses module providers that implement the underlying logic of the locking mechanism. The following Locking Module Providers are provided by Medusa. You can also create a custom provider as explained in the Create Locking Module Provider guide.

Redis
Recommended
PostgreSQL

Notification Module#

The Notification Module handles sending notifications to users or customers, such as reset password instructions or newsletters. Refer to the Notifcation Module documentation to learn more about it.

The Notification Module has module providers that implement the underlying logic of sending notifications, typically through integrating a third-party service. The following modules are provided by Medusa. You can also create a custom provider as explained in the Create Notification Module Provider guide.

Local
For Development
SendGrid
For Production

Notification Module Provider Guides#

Send Notification
Create Notification Provider
Resend
Integration

Workflow Engine Module#

A Workflow Engine Module handles tracking and recording the transactions and statuses of workflows and their steps. Learn more about it in the Worklow Engine Module documentation.

The following Workflow Engine modules are provided by Medusa.

In-Memory
For Development
Redis
For Production
Was this page helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break