From 9acd0f72a6dcb370262e3a98d5fcbb36966331bb Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Wed, 11 Dec 2024 12:36:16 +0200 Subject: [PATCH] docs: revise architectural modules documentation --- .../app/architectural-modules/file/page.mdx | 6 +- .../notification/page.mdx | 10 +- .../app/architectural-modules/page.mdx | 174 +++++++++++++++++- www/apps/resources/generated/edit-dates.mjs | 6 +- www/apps/resources/generated/sidebar.mjs | 12 +- www/apps/resources/sidebar.mjs | 9 +- 6 files changed, 196 insertions(+), 21 deletions(-) diff --git a/www/apps/resources/app/architectural-modules/file/page.mdx b/www/apps/resources/app/architectural-modules/file/page.mdx index 319c7c57658e8..e7021c554ea66 100644 --- a/www/apps/resources/app/architectural-modules/file/page.mdx +++ b/www/apps/resources/app/architectural-modules/file/page.mdx @@ -6,13 +6,9 @@ export const metadata = { # {metadata.title} -A File Module exposes the functionalities to upload assets, such as product images, to the Medusa application. - ---- - ## What is a File Module Provider? -A file module provider implements the logic of handling uploads and downloads. The File Module must have one file module provider configured. +The File Module exposes the functionalities to upload assets, such as product images, to the Medusa application. A file module provider implements the underlying logic of handling uploads and downloads of assets, such as integrating third-party services. The File Module must have one file module provider configured. By default, Medusa uses the Local File Module. This module uploads files to the `uploads` directory of your Medusa application. diff --git a/www/apps/resources/app/architectural-modules/notification/page.mdx b/www/apps/resources/app/architectural-modules/notification/page.mdx index ff1d2343825a4..2ebfb2c12d3b6 100644 --- a/www/apps/resources/app/architectural-modules/notification/page.mdx +++ b/www/apps/resources/app/architectural-modules/notification/page.mdx @@ -6,15 +6,13 @@ export const metadata = { # {metadata.title} -A Notification Module exposes the functionalities to send a notification to a customer or user. For example, sending an order confirmation email. - -You can resolve the Notification Module and send notifications in API routes, subscribers, or other resources. +## What is a Notification Module Provider? ---- +The Notification Module exposes the functionalities to send a notification to a customer or user. For example, sending an order confirmation email. -## What is a Notification Module Provider? +You can resolve the Notification Module and send notifications in API routes, subscribers, or other resources. -A notification module provider implements the logic of sending the notification. It either integrates a third-party service or uses custom logic to send the notification. +A notification module provider implements the underlying logic of sending notification. It either integrates a third-party service or uses custom logic to send the notification. By default, Medusa uses the Local Notification Module which only simulates sending the notification by logging a message in the terminal. diff --git a/www/apps/resources/app/architectural-modules/page.mdx b/www/apps/resources/app/architectural-modules/page.mdx index ae19437da66dc..d5d27a60abdf4 100644 --- a/www/apps/resources/app/architectural-modules/page.mdx +++ b/www/apps/resources/app/architectural-modules/page.mdx @@ -1,4 +1,4 @@ -import { ChildDocs } from "docs-ui" +import { ChildDocs, CardList } from "docs-ui" export const metadata = { title: `Architectural Modules`, @@ -6,6 +6,174 @@ export const metadata = { # {metadata.title} -This section includes documentation for official Medusa 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. - \ No newline at end of file +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 about Medusa's architecture in [this documentation](!docs!/learn/introduction/architecture). + +This section of the documentation showcases official architectural modules and how to configure them in your application. + +## Cache Modules + +A Cache Module is used to cache the results of computations such as price selection or various tax calculations. Learn more in [this documentation](./cache/page.mdx). + +The following modules are provided by Medusa. You can also create your own cache module as explained in [this guide](./cache/create/page.mdx). + + + +--- + +## Event Modules + +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). + +The following modules are provided by Medusa. You can also create your own event module as explained in [this guide](./event/create/page.mdx). + + + +--- + +## File Module Providers + +A file module provider implements the logic of handling uploads and downloads of assets, such as integrating third-party services. Learn more in [this documentation](./file/page.mdx). + +The following modules are provided by Medusa. You can also create your own file module as explained in [this guide](/references/file-provider-module). + + + +--- + +## Notification Module Providers + +A notification module provider implements the logic of sending notifications, typically through integrating a third-party service. Learn more in [this documentation](./notification/page.mdx). + +The following modules are provided by Medusa. You can also create your own file module as explained in [this guide](/references/notification-provider-module). + + + +### Notification Module Provider Guides + + + +--- + +## Workflow Engine Modules + +Workflow engine modules handle tracking and recording the transactions and statuses of workflows and their steps. Learn more in [this documentation](./workflow-engine/page.mdx). + +The following modules are provided by Medusa. + + diff --git a/www/apps/resources/generated/edit-dates.mjs b/www/apps/resources/generated/edit-dates.mjs index 59d67fbc7e374..f8457ec531bb8 100644 --- a/www/apps/resources/generated/edit-dates.mjs +++ b/www/apps/resources/generated/edit-dates.mjs @@ -211,7 +211,7 @@ export const generatedEditDates = { "app/commerce-modules/auth/auth-identity-and-actor-types/page.mdx": "2024-12-09T13:04:01.129Z", "app/commerce-modules/api-key/page.mdx": "2024-12-09T14:47:01.509Z", "app/commerce-modules/auth/create-actor-type/page.mdx": "2024-12-09T15:32:07.594Z", - "app/architectural-modules/page.mdx": "2024-05-28T13:25:03+03:00", + "app/architectural-modules/page.mdx": "2024-12-11T10:33:53.064Z", "app/architectural-modules/workflow-engine/redis/page.mdx": "2024-10-15T12:50:59.507Z", "app/commerce-modules/api-key/examples/page.mdx": "2024-10-15T14:58:58.994Z", "app/architectural-modules/notification/sendgrid/page.mdx": "2024-10-15T12:51:25.569Z", @@ -230,11 +230,11 @@ export const generatedEditDates = { "app/architectural-modules/notification/local/page.mdx": "2024-10-15T12:51:21.284Z", "app/architectural-modules/file/local/page.mdx": "2024-10-16T15:48:42.839Z", "app/architectural-modules/notification/send-notification/page.mdx": "2024-09-30T08:43:53.151Z", - "app/architectural-modules/file/page.mdx": "2024-07-01T10:21:19+03:00", + "app/architectural-modules/file/page.mdx": "2024-12-11T10:27:50.510Z", "app/architectural-modules/event/page.mdx": "2024-05-28T13:25:03+03:00", "app/architectural-modules/cache/create/page.mdx": "2024-10-16T08:51:35.074Z", "app/admin-widget-injection-zones/page.mdx": "2024-11-22T11:00:30.159Z", - "app/architectural-modules/notification/page.mdx": "2024-10-15T12:51:28.735Z", + "app/architectural-modules/notification/page.mdx": "2024-12-11T10:29:47.317Z", "app/architectural-modules/event/create/page.mdx": "2024-12-09T14:46:40.248Z", "references/core_flows/Order/functions/core_flows.Order.orderEditUpdateItemQuantityValidationStep/page.mdx": "2024-08-20T00:10:58.913Z", "references/core_flows/Order/functions/core_flows.Order.orderEditUpdateItemQuantityWorkflow/page.mdx": "2024-08-20T00:10:58.949Z", diff --git a/www/apps/resources/generated/sidebar.mjs b/www/apps/resources/generated/sidebar.mjs index 40c94ead13429..914557b46987b 100644 --- a/www/apps/resources/generated/sidebar.mjs +++ b/www/apps/resources/generated/sidebar.mjs @@ -7858,7 +7858,7 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "File Provider Modules", + "title": "File Module Providers", "children": [ { "loaded": true, @@ -7906,7 +7906,7 @@ export const generatedSidebar = [ "loaded": true, "isPathHref": true, "type": "category", - "title": "Notification Provider Modules", + "title": "Notification Module Providers", "children": [ { "loaded": true, @@ -7953,6 +7953,14 @@ export const generatedSidebar = [ "path": "/references/notification-provider-module", "title": "Create Notification Provider", "children": [] + }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/integrations/guides/resend", + "title": "Integrate Resend", + "children": [] } ] } diff --git a/www/apps/resources/sidebar.mjs b/www/apps/resources/sidebar.mjs index b236e431d2577..680c990bd5615 100644 --- a/www/apps/resources/sidebar.mjs +++ b/www/apps/resources/sidebar.mjs @@ -1655,7 +1655,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([ }, { type: "category", - title: "File Provider Modules", + title: "File Module Providers", children: [ { type: "link", @@ -1687,7 +1687,7 @@ export const sidebar = sidebarAttachHrefCommonOptions([ }, { type: "category", - title: "Notification Provider Modules", + title: "Notification Module Providers", children: [ { type: "link", @@ -1718,6 +1718,11 @@ export const sidebar = sidebarAttachHrefCommonOptions([ path: "/references/notification-provider-module", title: "Create Notification Provider", }, + { + type: "link", + path: "/integrations/guides/resend", + title: "Integrate Resend", + }, ], }, ],