Raw
1 import { CardList } from "docs-ui"
2
3 export const metadata = {
4 title: `Infrastructure Modules`,
5 }
6
7 # {metadata.title}
8
9 Medusa's architectural functionalities, such as emitting and subscribing to events or caching data, are all implemented in Infrastructure Modules. An Infrastructure 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.
10
11 For example, you can use our [Redis Event Module](./event/redis/page.mdx) to handle event functionalities, or create a custom module that implements these functionalities with Memcached. Learn more in [the Architecture documentation](!docs!/learn/introduction/architecture).
12
13 This section of the documentation showcases Medusa's Infrastructure Modules, how they work, and how to use them in your Medusa application.
14
15 ## Analytics Module
16
17 <Note>
18
19 The Analytics Module is available starting [Medusa v2.8.3](https://github.com/medusajs/medusa/releases/tag/v2.8.3).
20
21 </Note>
22
23 The Analytics Module exposes functionalities to track and analyze user interactions and system events. For example, tracking cart updates or completed orders. Learn more in the [Analytics Module documentation](./analytics/page.mdx).
24
25 {/* The Analytics Module has module providers that implement the underlying logic of integrating third-party services for tracking analytics. The following Analytics Module Providers are provided by Medusa. You can also create a custom provider as explained in the [Create Analytics Module Provider guide](/references/analytics/provider). */}
26
27 <CardList
28 items={[
29 {
30 title: "Local",
31 href: "/infrastructure-modules/analytics/local",
32 badge: {
33 variant: "neutral",
34 children: "For Development"
35 }
36 },
37 {
38 title: "PostHog",
39 href: "/infrastructure-modules/analytics/posthog",
40 badge: {
41 variant: "green",
42 children: "For Production"
43 }
44 }
45 ]}
46 />
47
48
49
50 ## Caching Module
51
52 The Caching Module provides functionality to cache data in your Medusa application, improving performance and reducing latency for frequently accessed data.
53
54 The following Caching modules are provided by Medusa. You can also create a custom Caching Module Provider as explained in the [Create Caching Module Provider guide](#).
55
56 <Note>
57
58 The Caching Module is available starting [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0). It replaces the deprecated [Cache Module](./cache/page.mdx).
59
60 </Note>
61
62 <CardList
63 items={[
64 {
65 title: "Redis",
66 href: "/infrastructure-modules/caching/providers/redis",
67 badge: {
68 variant: "green",
69 children: "For Production"
70 }
71 },
72 {
73 title: "Memcached",
74 // TODO add link
75 href: "#",
76 badge: {
77 variant: "blue",
78 children: "Tutorial"
79 }
80 }
81 ]}
82 />
83
84 ---
85
86 ## Event Module
87
88 An Event Module implements the underlying publish/subscribe system that handles queueing events, emitting them, and executing their subscribers. Learn more in [this documentation](./event/page.mdx).
89
90 The following Event modules are provided by Medusa. You can also create your own event module as explained in [this guide](./event/create/page.mdx).
91
92 <CardList
93 items={[
94 {
95 title: "Local",
96 href: "/infrastructure-modules/event/local",
97 badge: {
98 variant: "neutral",
99 children: "For Development"
100 }
101 },
102 {
103 title: "Redis",
104 href: "/infrastructure-modules/event/redis",
105 badge: {
106 variant: "green",
107 children: "For Production"
108 }
109 }
110 ]}
111 />
112
113 ---
114
115 ## File Module
116
117 The File Module handles file upload and storage of assets, such as product images. Refer to the [File Module documentation](./file/page.mdx) to learn more about it.
118
119 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](/references/file-provider-module).
120
121 <CardList
122 items={[
123 {
124 title: "Local",
125 href: "/infrastructure-modules/file/local",
126 badge: {
127 variant: "neutral",
128 children: "For Development"
129 }
130 },
131 {
132 title: "AWS S3 (and Compatible APIs)",
133 href: "/infrastructure-modules/file/s3",
134 badge: {
135 variant: "green",
136 children: "For Production"
137 }
138 }
139 ]}
140 />
141
142 ---
143
144 ## Locking Module
145
146 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](./locking/page.mdx) to learn more about it.
147
148 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](/references/locking-module-provider).
149
150 <CardList
151 items={[
152 {
153 title: "Redis",
154 href: "/infrastructure-modules/locking/redis",
155 badge: {
156 variant: "green",
157 children: "Recommended"
158 }
159 },
160 {
161 title: "PostgreSQL",
162 href: "/infrastructure-modules/locking/postgres",
163 }
164 ]}
165 />
166
167 ---
168
169 ## Notification Module
170
171 The Notification Module handles sending notifications to users or customers, such as reset password instructions or newsletters. Refer to the [Notification Module documentation](./notification/page.mdx) to learn more about it.
172
173 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](/references/notification-provider-module).
174
175 <CardList
176 items={[
177 {
178 title: "Local",
179 href: "/infrastructure-modules/notification/local",
180 badge: {
181 variant: "neutral",
182 children: "For Development"
183 }
184 },
185 {
186 title: "SendGrid",
187 href: "/infrastructure-modules/notification/sendgrid",
188 badge: {
189 variant: "green",
190 children: "For Production"
191 }
192 }
193 ]}
194 />
195
196 ### Notification Module Provider Guides
197
198 <CardList
199 items={[
200 {
201 title: "Send Notification",
202 href: "/infrastructure-modules/notification/send-notification"
203 },
204 {
205 title: "Create Notification Provider",
206 href: "/references/notification-provider-module"
207 },
208 {
209 title: "Resend",
210 href: "/integrations/guides/resend",
211 badge: {
212 variant: "blue",
213 children: "Integration"
214 }
215 }
216 ]}
217 />
218
219 ---
220
221 ## Search Module
222
223 <Note>
224
225 The Search Module is available starting [Medusa v2.21.1](https://github.com/medusajs/medusa/releases/tag/v2.21.1).
226
227 </Note>
228
229 The Search Module provides full-text search functionality in your Medusa application through its providers. You declare which data to index, and the module keeps the search engine current and serves queries with relevance ranking, filters, and facets. Refer to the [Search Module documentation](./search/page.mdx) to learn more about it.
230
231 The Search Module has module providers that implement the underlying logic of indexing and searching documents in a search engine. The following Search Module Providers are provided by Medusa. You can also create a custom provider as explained in the [Create Search Module Provider guide](/references/search/provider).
232
233 <CardList
234 items={[
235 {
236 title: "PostgreSQL",
237 href: "/infrastructure-modules/search/providers/postgres",
238 },
239 {
240 title: "Medusa Search",
241 href: "!cloud!/search",
242 badge: {
243 variant: "blue",
244 children: "Cloud"
245 }
246 },
247 ]}
248 />
249
250 ### Search Module Guides
251
252 <CardList
253 items={[
254 {
255 title: "Index Definitions",
256 href: "/infrastructure-modules/search/index-definitions"
257 },
258 {
259 title: "Search Queries",
260 href: "!docs!/learn/fundamentals/query/search"
261 },
262 {
263 title: "Reindexing and Migrations",
264 href: "/infrastructure-modules/search/reindexing"
265 }
266 ]}
267 />
268
269 ---
270
271 ## Workflow Engine Module
272
273 A Workflow Engine Module handles tracking and recording the transactions and statuses of workflows and their steps. Learn more about it in the [Workflow Engine Module documentation](./workflow-engine/page.mdx).
274
275 The following Workflow Engine modules are provided by Medusa.
276
277 <CardList
278 items={[
279 {
280 title: "In-Memory",
281 href: "/infrastructure-modules/workflow-engine/in-memory",
282 badge: {
283 variant: "neutral",
284 children: "For Development"
285 }
286 },
287 {
288 title: "Redis",
289 href: "/infrastructure-modules/workflow-engine/redis",
290 badge: {
291 variant: "green",
292 children: "For Production"
293 }
294 }
295 ]}
296 />