|
1
|
export const metadata = { |
|
2
|
title: `${pageNumber} Build Custom Features`, |
|
3
|
} |
|
4
|
|
|
5
|
# {metadata.title} |
|
6
|
|
|
7
|
In the upcoming chapters, you'll follow step-by-step guides to build custom features in Medusa. These guides gradually introduce Medusa's concepts to help you understand what they are and how to use them. |
|
8
|
|
|
9
|
## Interactive Learning with Claude Code |
|
10
|
|
|
11
|
If you use Claude Code, you can learn the same concepts explained in the upcoming chapters through an interactive learning experience. |
|
12
|
|
|
13
|
Install the `learn-medusa` plugin to use the interactive learning experience: |
|
14
|
|
|
15
|
```bash |
|
16
|
claude # start claude code |
|
17
|
/plugin marketplace add medusajs/medusa-agent-skills |
|
18
|
/plugin install learn-medusa@medusa |
|
19
|
``` |
|
20
|
|
|
21
|
Then, start the learning experience with this prompt: |
|
22
|
|
|
23
|
```bash title="Claude Code Prompt" |
|
24
|
I want to learn Medusa. |
|
25
|
``` |
|
26
|
|
|
27
|
<Note title="Tip"> |
|
28
|
|
|
29
|
You can also run the skill using the `/learn-medusa:learning-medusa` command in Claude Code. |
|
30
|
|
|
31
|
</Note> |
|
32
|
|
|
33
|
This starts the interactive learning experience where you'll learn Medusa concepts step-by-step by building a brands feature, similar to the next chapters. You will: |
|
34
|
|
|
35
|
1. Create a Brand Module with API routes to manage brands. |
|
36
|
2. [Link brands to products to associate products with brands](../extend-features/page.mdx). |
|
37
|
3. [Customize the Medusa Admin dashboard to allow admin users to manage brands](../customize-admin/page.mdx). |
|
38
|
|
|
39
|
By the end, you'll have a solid understanding of Medusa's architecture and how to build custom features. |
|
40
|
|
|
41
|
--- |
|
42
|
|
|
43
|
## Tutorial Summary |
|
44
|
|
|
45
|
By following the guides in the upcoming chapters, you'll add brands to the Medusa application and associate them with products. |
|
46
|
|
|
47
|
To build a custom feature in Medusa, you need three main [Framework](../../fundamentals/framework/page.mdx) tools: |
|
48
|
|
|
49
|
- [Module](../../fundamentals/modules/page.mdx): a package with commerce logic for a single domain. It defines new tables to add to the database, and a class of methods to manage these tables. |
|
50
|
- [Workflow](../../fundamentals/workflows/page.mdx): a tool to perform an operation comprising multiple steps with built-in rollback and retry mechanisms. |
|
51
|
- [API route](../../fundamentals/api-routes/page.mdx): a REST endpoint that exposes commerce features to clients, such as the admin dashboard or a storefront. The API route executes a workflow that implements the commerce feature using modules. |
|
52
|
|
|
53
|
 |
|
54
|
|
|
55
|
--- |
|
56
|
|
|
57
|
## Next Chapters: Brand Module Example |
|
58
|
|
|
59
|
The next chapters will guide you to: |
|
60
|
|
|
61
|
1. Build a Brand Module that creates a `Brand` data model and provides data-management features. |
|
62
|
2. Add a workflow to create a brand. |
|
63
|
3. Expose an API route that allows admin users to create a brand using the workflow. |