From 07b62aa1f489979540936d01f29fdd4e18a4e126 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Tue, 24 Sep 2024 13:58:24 +0300 Subject: [PATCH] update diagrams and text --- .../architectural-modules/page.mdx | 2 +- .../book/app/architecture/overview/page.mdx | 20 +++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/www/apps/book/app/architecture/architectural-modules/page.mdx b/www/apps/book/app/architecture/architectural-modules/page.mdx index 51d4864d7f5b9..84ac04ca219e8 100644 --- a/www/apps/book/app/architecture/architectural-modules/page.mdx +++ b/www/apps/book/app/architecture/architectural-modules/page.mdx @@ -18,7 +18,7 @@ Since modules are interchangeable, you have more control over Medusa’s archite There are different architectural module types including: -![Diagram illustrating how the modules connect to third-party services](https://res.cloudinary.com/dza7lstvk/image/upload/v1716197340/Medusa%20Book/architectural-modules_bj9bb9.jpg) +![Diagram illustrating how the modules connect to third-party services](https://res.cloudinary.com/dza7lstvk/image/upload/v1727095814/Medusa%20Book/architectural-modules_bj9bb9.jpg) - Cache Module: Defines the caching mechanism or logic to cache computational results. - Event Module: Integrates a pub/sub service to handle subscribing to and emitting events. diff --git a/www/apps/book/app/architecture/overview/page.mdx b/www/apps/book/app/architecture/overview/page.mdx index f92f9110c9889..f52a90b17effc 100644 --- a/www/apps/book/app/architecture/overview/page.mdx +++ b/www/apps/book/app/architecture/overview/page.mdx @@ -6,15 +6,13 @@ export const metadata = { In this chapter, you'll learn about the architectural layers in Medusa. -## API Layer +## HTTP, Workflow, and Module Layers -Medusa's server is headless. So, clients, such as storefronts or admin dashboards, send HTTP requests to Medusa's API routes to provide commerce features. +Medusa's server is headless. So, clients, such as storefronts or admin dashboards, send HTTP requests to Medusa's API routes to consume commerce features. -The API routes use the Medusa framework's tools to perform functionalities implemented in Medusa's commerce modules. +The API routes use workflows, powered by Medusa's workflows SDK, to perform functionalities implemented in commerce and architectural modules. -The framework tools include workflows, module links, Query, architectural modules, and more orchestration tools under-the-hood. - -![Diagram illustrating the HTTP layer](https://res.cloudinary.com/dza7lstvk/image/upload/v1727094282/http-layer_sroafr.jpg) +![Diagram illustrating the HTTP layer](https://res.cloudinary.com/dza7lstvk/image/upload/v1727175296/Medusa%20Book/http-layer_sroafr.jpg) --- @@ -24,11 +22,11 @@ The Medusa application injects into each module a connection to the configured P Modules use that connection to read and write data to the database. -![Diagram illustrating the database layer](https://res.cloudinary.com/dza7lstvk/image/upload/v1727094431/db-layer_pi7tix.jpg) +![Diagram illustrating the database layer](https://res.cloudinary.com/dza7lstvk/image/upload/v1727175379/Medusa%20Book/db-layer_pi7tix.jpg) --- -## Service Layer +## Service Integrations Third-party services are integrated through commerce and architectural modules. @@ -40,13 +38,13 @@ Commerce modules integrate third-party services relevant for commerce or user-fa These integrations are used when an HTTP request is sent, or as a result of a scheduled action or an emitted event. -![Diagram illustrating the commerce modules integration to third-party services](https://res.cloudinary.com/dza7lstvk/image/upload/v1727095115/service-commerce_qcbdsl.jpg) +![Diagram illustrating the commerce modules integration to third-party services](https://res.cloudinary.com/dza7lstvk/image/upload/v1727175357/Medusa%20Book/service-commerce_qcbdsl.jpg) ### Architectural Modules Architectural modules integrate third-party services and systems for architectural features. For example, you integrate Redis as a pub/sub service to send events, or SendGrid to send notifications. -![Diagram illustrating the architectural modules integration to third-party services and systems](https://res.cloudinary.com/dza7lstvk/image/upload/v1727095146/service-arch_ozvryw.jpg) +![Diagram illustrating the architectural modules integration to third-party services and systems](https://res.cloudinary.com/dza7lstvk/image/upload/v1727175342/Medusa%20Book/service-arch_ozvryw.jpg) --- @@ -54,4 +52,4 @@ Architectural modules integrate third-party services and systems for architectur The following diagram illustrates Medusa's architecture over the three layers. -![Full diagram illustrating Medusa's architecture](https://res.cloudinary.com/dza7lstvk/image/upload/v1727095208/architectural-diagram-full.jpg) +![Full diagram illustrating Medusa's architecture](https://res.cloudinary.com/dza7lstvk/image/upload/v1727174897/Medusa%20Book/architectural-diagram-full.jpg)