1 # Book app (`docs.medusajs.com`)
2
3 The main documentation app: the docs homepage (`/`), the "Learn" guides
4 (`/learn`), and the get-started page (`/start`). It is also the app that hosts
5 the **What's New** section shown on the homepage for the whole docs site.
6
7 ## What's New section — keep this updated
8
9 > **Whenever a new feature, release, or notable guide ships anywhere in the
10 > docs (this app, `resources`, `cloud`, `ui`, `user-guide`, or the API
11 > reference), add an entry to the What's New list.**
12
13 - **Data**: `components/Homepage/WhatsNewSection/data.ts` — the single static
14 list. This is the only file to edit when announcing something.
15 - **UI**: `components/Homepage/WhatsNewSection/index.tsx` (server, sorts and
16 slices) and `components/Homepage/WhatsNewSection/Row/index.tsx` (client,
17 renders one row and owns the coming-soon modal). Neither needs a change when
18 adding an entry.
19
20 Each entry is:
21
22 ```ts
23 // shipped
24 {
25 title: "Agentic deployments", // short, sentence case, no trailing period
26 date: "2026-09-12", // ISO YYYY-MM-DD, the date it shipped
27 link: "https://docs.medusajs.com/cloud/...", // docs page for the feature
28 tag: "Medusa Cloud", // area label shown as a pill
29 }
30
31 // coming soon
32 {
33 title: "Medusa Search",
34 tag: "Medusa Cloud",
35 comingSoon: true, // no date, no link — the row is not clickable
36 }
37
38 // early access
39 {
40 title: "Medusa MCP",
41 tag: "Medusa Cloud",
42 earlyAccess: true, // no date, has a link to its docs page
43 link: "https://docs.medusajs.com/cloud/medusa-mcp",
44 }
45 ```
46
47 The type is a union, so TypeScript enforces this: a `comingSoon: true` entry
48 cannot carry a `date` or `link`, an `earlyAccess: true` entry must have a `link`
49 but no `date`, and a shipped entry must have both.
50
51 Rules:
52
53 - **Coming-soon entries always render first**, then early-access entries,
54 followed by shipped entries **sorted by `date` descending**; the first `MAX_WHATS_NEW_ITEMS` (currently
55 **4**) are shown. Add new entries anywhere in the array — order in the file
56 only matters between two coming-soon entries.
57 - A coming-soon row is highlighted (`bg-medusa-bg-highlight`) and shows a
58 `[SOON]` label where the date goes. Instead of linking, it opens a modal with
59 the newsletter form so visitors can be notified when the feature ships.
60 - An early-access row is highlighted like a coming-soon row and shows an
61 `[EARLY ACCESS]` label where the date goes, but it links to its docs page.
62 - When a coming-soon or early-access feature ships, **convert the entry in
63 place**: drop `comingSoon` / `earlyAccess` and add its `date` and `link`.
64 - **Do not delete old entries** to make room; the slice handles it. Prune only
65 when a linked page is removed.
66 - `link` must point at a real, already-published docs page. Use an absolute
67 `https://docs.medusajs.com/...` URL for pages outside this app, and a relative
68 path (e.g. `/learn/installation`) for pages inside it.
69 - `tag` should reuse an existing label where one fits — currently `Medusa Cloud`
70 and `Guide`. Other reasonable labels: `Medusa OS`, `Admin`, `Storefront`.
71 - Keep `title` under ~48 characters so the row does not wrap on desktop.
72
73 ## Homepage structure
74
75 `app/page.tsx` composes the homepage from the section components in
76 `components/Homepage/*`, with `<HomepageSectionsSeparator />` between sections.
77 Current order: Top → Start Prompt → Bloom → **What's New** → Links → Framework →
78 Code Tabs → Recipes → Commerce Modules → Footer.
79
80 Section conventions:
81
82 - Static content lives in a plain array/object at the top of the component (or a
83 sibling `data.ts` when it is meant to be edited often, as with What's New).
84 - Style with `clsx` and the `medusa-*` Tailwind tokens
85 (`text-medusa-fg-base`, `border-medusa-border-base`,
86 `bg-medusa-tag-neutral-bg`, ...) — never raw hex or `rgb()` values. The token
87 set is defined in `www/packages/tailwind/base.tailwind.config.js` and covers
88 light and dark themes.
89 - Reuse `docs-ui` primitives (`HeadlineTags`, `ShadedBlock`, ...) instead of
90 re-implementing them.
91 - Sections are server components; they are rendered inside a fixed
92 `xl:max-w-[1026px]` column, so lay out with `w-full` plus fractional widths.
93
94 ## Conventions
95
96 - No semicolons, double quotes, 2-space indent (Prettier).
97 - Components live in `components/<Name>/index.tsx`.
98 - Docs content is MDX under `app/learn/` and `app/start/`. Load the
99 `writing-docs` skill before editing any MDX.