main
Book app (docs.medusajs.com)
The main documentation app: the docs homepage (/), the "Learn" guides
(/learn), and the get-started page (/start). It is also the app that hosts
the What's New section shown on the homepage for the whole docs site.
What's New section — keep this updated
Whenever a new feature, release, or notable guide ships anywhere in the docs (this app,
resources,cloud,ui,user-guide, or the API reference), add an entry to the What's New list.
- Data:
components/Homepage/WhatsNewSection/data.ts— the single static list. This is the only file to edit when announcing something. - UI:
components/Homepage/WhatsNewSection/index.tsx(server, sorts and slices) andcomponents/Homepage/WhatsNewSection/Row/index.tsx(client, renders one row and owns the coming-soon modal). Neither needs a change when adding an entry.
Each entry is:
// shipped
{
title: "Agentic deployments", // short, sentence case, no trailing period
date: "2026-09-12", // ISO YYYY-MM-DD, the date it shipped
link: "https://docs.medusajs.com/cloud/...", // docs page for the feature
tag: "Medusa Cloud", // area label shown as a pill
}
// coming soon
{
title: "Medusa Search",
tag: "Medusa Cloud",
comingSoon: true, // no date, no link — the row is not clickable
}
// early access
{
title: "Medusa MCP",
tag: "Medusa Cloud",
earlyAccess: true, // no date, has a link to its docs page
link: "https://docs.medusajs.com/cloud/medusa-mcp",
}
The type is a union, so TypeScript enforces this: a comingSoon: true entry
cannot carry a date or link, an earlyAccess: true entry must have a link
but no date, and a shipped entry must have both.
Rules:
- Coming-soon entries always render first, then early-access entries,
followed by shipped entries sorted by
datedescending; the firstMAX_WHATS_NEW_ITEMS(currently 4) are shown. Add new entries anywhere in the array — order in the file only matters between two coming-soon entries. - A coming-soon row is highlighted (
bg-medusa-bg-highlight) and shows a[SOON]label where the date goes. Instead of linking, it opens a modal with the newsletter form so visitors can be notified when the feature ships. - An early-access row is highlighted like a coming-soon row and shows an
[EARLY ACCESS]label where the date goes, but it links to its docs page. - When a coming-soon or early-access feature ships, convert the entry in
place: drop
comingSoon/earlyAccessand add itsdateandlink. - Do not delete old entries to make room; the slice handles it. Prune only when a linked page is removed.
linkmust point at a real, already-published docs page. Use an absolutehttps://docs.medusajs.com/...URL for pages outside this app, and a relative path (e.g./learn/installation) for pages inside it.tagshould reuse an existing label where one fits — currentlyMedusa CloudandGuide. Other reasonable labels:Medusa OS,Admin,Storefront.- Keep
titleunder ~48 characters so the row does not wrap on desktop.
Homepage structure
app/page.tsx composes the homepage from the section components in
components/Homepage/*, with <HomepageSectionsSeparator /> between sections.
Current order: Top → Start Prompt → Bloom → What's New → Links → Framework →
Code Tabs → Recipes → Commerce Modules → Footer.
Section conventions:
- Static content lives in a plain array/object at the top of the component (or a
sibling
data.tswhen it is meant to be edited often, as with What's New). - Style with
clsxand themedusa-*Tailwind tokens (text-medusa-fg-base,border-medusa-border-base,bg-medusa-tag-neutral-bg, ...) — never raw hex orrgb()values. The token set is defined inwww/packages/tailwind/base.tailwind.config.jsand covers light and dark themes. - Reuse
docs-uiprimitives (HeadlineTags,ShadedBlock, ...) instead of re-implementing them. - Sections are server components; they are rendered inside a fixed
xl:max-w-[1026px]column, so lay out withw-fullplus fractional widths.
Conventions
- No semicolons, double quotes, 2-space indent (Prettier).
- Components live in
components/<Name>/index.tsx. - Docs content is MDX under
app/learn/andapp/start/. Load thewriting-docsskill before editing any MDX.