docs: added plugins documentation (#10989)

(Should be merged after the next release)

Closes DX-1294
This commit is contained in:
Shahed Nasser
2025-01-27 09:32:53 +00:00
committed by GitHub
parent 0c5f21e893
commit c26ef84cae
26 changed files with 2901 additions and 52 deletions
@@ -17,15 +17,25 @@ In a common Medusa application, requests go through four layers in the stack. In
3. Modules: Workflows use domain-specific modules for resource management.
3. Data store: Modules query the underlying datastore, which is a PostgreSQL database in common cases.
<Note>
These layers of stack can be implemented within [plugins](../../fundamentals/plugins/page.mdx).
</Note>
![Diagram illustrating the HTTP layer](https://res.cloudinary.com/dza7lstvk/image/upload/v1727175296/Medusa%20Book/http-layer_sroafr.jpg)
---
## Database Layer
The Medusa application injects into each module a connection to the configured PostgreSQL database.
The Medusa application injects into each module a connection to the configured PostgreSQL database. Modules use that connection to read and write data to the database.
Modules use that connection to read and write data to the database.
<Note>
Modules can be implemented within [plugins](../../fundamentals/plugins/page.mdx).
</Note>
![Diagram illustrating the database layer](https://res.cloudinary.com/dza7lstvk/image/upload/v1727175379/Medusa%20Book/db-layer_pi7tix.jpg)
@@ -33,19 +43,23 @@ Modules use that connection to read and write data to the database.
## Service Integrations
Third-party services are integrated through commerce and architectural modules.
Third-party services are integrated through commerce and architectural modules. You also create custom third-party integrations through a custom module.
You also create custom third-party integrations through a custom module.
<Note>
Modules can be implemented within [plugins](../../fundamentals/plugins/page.mdx).
</Note>
### Commerce Modules
Commerce modules integrate third-party services relevant for commerce or user-facing features. For example, you integrate Stripe through a payment module provider.
[Commerce modules](!resources!/commerce-modules) integrate third-party services relevant for commerce or user-facing features. For example, you integrate Stripe through a payment module provider.
![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.
[Architectural modules](!resources!/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/v1727175342/Medusa%20Book/service-arch_ozvryw.jpg)