Skip to content

Commit

Permalink
docs: general fixes and additions (#10876)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahednasser authored Jan 8, 2025
1 parent 9427f1e commit a0e944a
Show file tree
Hide file tree
Showing 12 changed files with 235 additions and 74 deletions.
6 changes: 5 additions & 1 deletion www/apps/book/app/learn/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Medusa ships with three main tools:

When you install Medusa, you get a fully fledged commerce platform with all the features you need to get off the ground. However, unlike other platforms, Medusa is built with customization in mind. You don't need to build hacky workarounds that are difficult to maintain and scale. Your efforts go into building features that brings your business's vision to life.

---
---

## Who should use Medusa

Expand Down Expand Up @@ -84,6 +84,10 @@ This documentation is split into the following sections:

To get started, check out the [Installation chapter](./installation/page.mdx).

### Using with LLM Editors

This documentation provides an [llms.txt](https://docs.medusajs.com/llms.txt) file to support LLM editors such as Cursor. Add the documentation to the list of supported documentation in your LLM editor to access the documentation directly from your editor and benefit from code generation.

---

## Useful Links
Expand Down
2 changes: 1 addition & 1 deletion www/apps/book/generated/edit-dates.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export const generatedEditDates = {
"app/learn/fundamentals/scheduled-jobs/page.mdx": "2024-12-09T10:51:40.570Z",
"app/learn/fundamentals/workflows/page.mdx": "2024-12-09T14:45:17.837Z",
"app/learn/deployment/page.mdx": "2024-11-25T14:32:44.949Z",
"app/learn/page.mdx": "2024-11-28T14:17:53.023Z",
"app/learn/page.mdx": "2025-01-08T10:49:58.879Z",
"app/learn/fundamentals/modules/commerce-modules/page.mdx": "2024-12-09T10:46:29.339Z",
"app/learn/fundamentals/workflows/retry-failed-steps/page.mdx": "2024-12-04T07:37:59.823Z",
"app/learn/fundamentals/workflows/workflow-hooks/page.mdx": "2024-12-09T10:44:33.781Z",
Expand Down
4 changes: 2 additions & 2 deletions www/apps/book/sidebar.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ export const sidebar = numberSidebarItems(
},
{
type: "link",
path: "/learn/fundamentals/module-links/remote-link",
title: "Remote Link",
path: "/learn/fundamentals/module-links/link",
title: "Link",
},
{
type: "link",
Expand Down
23 changes: 21 additions & 2 deletions www/apps/resources/app/architectural-modules/cache/page.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChildDocs } from "docs-ui"
import { CardList } from "docs-ui"

export const metadata = {
title: `Cache Modules`,
Expand All @@ -18,7 +18,26 @@ By default, Medusa uses the In-Memory Cache Module. This module uses a plain Jav

This is useful for development. However, for production, it's highly recommended to use other Cache Modules, such as the Redis Cache Module.

<ChildDocs type="item" hideItems={["Guides"]} onlyTopLevel={true} />
<CardList
items={[
{
title: "In-Memory",
href: "/architectural-modules/cache/in-memory",
badge: {
variant: "neutral",
children: "For Development"
}
},
{
title: "Redis",
href: "/architectural-modules/cache/redis",
badge: {
variant: "green",
children: "For Production"
}
}
]}
/>

---

Expand Down
23 changes: 21 additions & 2 deletions www/apps/resources/app/architectural-modules/event/page.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChildDocs } from "docs-ui"
import { CardList } from "docs-ui"

export const metadata = {
title: `Event Modules`,
Expand All @@ -18,7 +18,26 @@ By default, Medusa uses the Local Event Module. This module uses Node’s EventE

This is useful for development. However, for production, it’s highly recommended to use other Event Modules, Redis Event Module.

<ChildDocs type="item" hideItems={["Guides"]} onlyTopLevel={true} />
<CardList
items={[
{
title: "Local",
href: "/architectural-modules/event/local",
badge: {
variant: "neutral",
children: "For Development"
}
},
{
title: "Redis",
href: "/architectural-modules/event/redis",
badge: {
variant: "green",
children: "For Production"
}
}
]}
/>

---

Expand Down
23 changes: 21 additions & 2 deletions www/apps/resources/app/architectural-modules/file/page.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChildDocs } from "docs-ui"
import { CardList } from "docs-ui"

export const metadata = {
title: `File Module Providers`,
Expand All @@ -14,7 +14,26 @@ By default, Medusa uses the Local File Module. This module uploads files to the

This is useful for development. However, for production, it’s highly recommended to use other File Modules, such as the S3 Module.

<ChildDocs type="item" hideItems={["Guides"]} onlyTopLevel={true} />
<CardList
items={[
{
title: "Local",
href: "/architectural-modules/file/local",
badge: {
variant: "neutral",
children: "For Development"
}
},
{
title: "AWS S3 (and Compatible APIs)",
href: "/architectural-modules/file/s3",
badge: {
variant: "green",
children: "For Production"
}
}
]}
/>

---

Expand Down
23 changes: 21 additions & 2 deletions www/apps/resources/app/architectural-modules/notification/page.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChildDocs } from "docs-ui"
import { CardList } from "docs-ui"

export const metadata = {
title: `Notification Module Providers`,
Expand All @@ -18,7 +18,26 @@ By default, Medusa uses the Local Notification Module which only simulates sendi

Medusa provides other Notification Modules that actually send notifications, such as the SendGrid Notification Module Provider.

<ChildDocs type="item" hideItems={["Guides"]} onlyTopLevel={true} />
<CardList
items={[
{
title: "Local",
href: "/architectural-modules/notification/local",
badge: {
variant: "neutral",
children: "For Development"
}
},
{
title: "SendGrid",
href: "/architectural-modules/notification/sendgrid",
badge: {
variant: "green",
children: "For Production"
}
}
]}
/>

---

Expand Down
2 changes: 1 addition & 1 deletion www/apps/resources/app/architectural-modules/page.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChildDocs, CardList } from "docs-ui"
import { CardList } from "docs-ui"

export const metadata = {
title: `Architectural Modules`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChildDocs } from "docs-ui"
import { CardList } from "docs-ui"

export const metadata = {
title: `Workflow Engine Modules`,
Expand All @@ -10,4 +10,23 @@ Workflow engine modules handle tracking and recording the transactions and statu

Medusa uses the In-Memory Workflow Engine Module by default. For production purposes, it's recommended to use the Redis Engine Module instead.

<ChildDocs type="item" hideItems={["Guides"]} onlyTopLevel={true} />
<CardList
items={[
{
title: "In-Memory",
href: "/architectural-modules/workflow-engine/in-memory",
badge: {
variant: "neutral",
children: "For Development"
}
},
{
title: "Redis",
href: "/architectural-modules/workflow-engine/redis",
badge: {
variant: "green",
children: "For Production"
}
}
]}
/>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ This document explains how the Inventory Module is used within the Medusa applic

When a product variant is created and its `manage_inventory` property's value is `true`, the Medusa application creates an inventory item associated with that product variant.

<Note title="Tip">

This flow is implemented within the [createProductVariantsWorkflow](/references/medusa-workflows/createProductVariantsWorkflow)

</Note>

![A diagram showcasing how the Inventory Module is used in the product variant creation form](https://res.cloudinary.com/dza7lstvk/image/upload/v1709661511/Medusa%20Resources/inventory-product-create_khz2hk.jpg)

---
Expand All @@ -18,6 +24,12 @@ When a product variant is created and its `manage_inventory` property's value is

When a product variant with `manage_inventory` set to `true` is added to cart, the Medusa application checks whether there's sufficient stocked quantity. If not, an error is thrown and the product variant won't be added to the cart.

<Note title="Tip">

This flow is implemented within the [addToCartWorkflow](/references/medusa-workflows/addToCartWorkflow)

</Note>

![A diagram showcasing how the Inventory Module is used in the add to cart flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1709711645/Medusa%20Resources/inventory-cart-flow_achwq9.jpg)

---
Expand All @@ -26,6 +38,12 @@ When a product variant with `manage_inventory` set to `true` is added to cart, t

When an order is placed, the Medusa application creates a reservation item for each product variant with `manage_inventory` set to `true`.

<Note title="Tip">

This flow is implemented within the [completeCartWorkflow](/references/medusa-workflows/completeCartWorkflow)

</Note>

![A diagram showcasing how the Inventory Module is used in the order placed flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1709712005/Medusa%20Resources/inventory-order-placed_qdxqdn.jpg)

---
Expand All @@ -38,6 +56,12 @@ When an item in an order is fulfilled and the associated variant has its `manage
- Resets the `reserved_quantity` to `0`.
- Deletes the associated reservation item.

<Note title="Tip">

This flow is implemented within the [createOrderFulfillmentWorkflow](/references/medusa-workflows/createOrderFulfillmentWorkflow)

</Note>

![A diagram showcasing how the Inventory Module is used in the order fulfillment flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1709712390/Medusa%20Resources/inventory-order-fulfillment_o9wdxh.jpg)

---
Expand All @@ -46,6 +70,12 @@ When an item in an order is fulfilled and the associated variant has its `manage

When an item in an order is returned and the associated variant has its `manage_inventory` property set to `true`, the Medusa application increments the `stocked_quantity` of the inventory item's level with the returned quantity.

<Note title="Tip">

This flow is implemented within the [confirmReturnReceiveWorkflow](/references/medusa-workflows/confirmReturnReceiveWorkflow)

</Note>

![A diagram showcasing how the Inventory Module is used in the order return flow](https://res.cloudinary.com/dza7lstvk/image/upload/v1709712457/Medusa%20Resources/inventory-order-return_ihftyk.jpg)

### Dismissed Returned Items
Expand Down
Loading

0 comments on commit a0e944a

Please sign in to comment.