The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.
TypeScript b2b-marketplacecomposable-commerceecommerceenterpriseheadless-commercemarketplacemedusamedusajsmulti-vendortypescript
docs: fix routing refs and CLI commands in v2 docs (#786)
Viktor Holikd66a5cf25e98
diff --git a/apps/docs/v2/developer-guide/extending-panels.mdx b/apps/docs/v2/developer-guide/extending-panels.mdxindex 04a6660f0..89f5c752f 100644--- a/apps/docs/v2/developer-guide/extending-panels.mdx+++ b/apps/docs/v2/developer-guide/extending-panels.mdx@@ -44,9 +44,9 @@ Available options:## Adding pages-Create a `page.tsx` file inside `src/pages/` and export a default React component. The route is determined by the file path.+Create a `page.tsx` file inside `src/routes/` and export a default React component. The route is determined by the file path.-```tsx src/pages/reviews/page.tsx+```tsx src/routes/reviews/page.tsximport { Star } from "@medusajs/icons"import type { RouteConfig } from "@mercurjs/dashboard-sdk"@@ -84,13 +84,13 @@ File paths map to URL routes automatically:| File path | Route | Description ||-----------|-------|-------------|-| `src/pages/page.tsx` | `/` | Root page |-| `src/pages/reviews/page.tsx` | `/reviews` | Static segment |-| `src/pages/reviews/[id]/page.tsx` | `/reviews/:id` | Dynamic segment |-| `src/pages/reviews/[[id]]/page.tsx` | `/reviews/:id?` | Optional dynamic segment |-| `src/pages/search/[*].tsx` | `/search/*` | Catch-all |-| `src/pages/(settings)/page.tsx` | Route grouping | Groups routes without adding a URL segment |-| `src/pages/dashboard/@sidebar/page.tsx` | Parallel route | Renders alongside parent |+| `src/routes/page.tsx` | `/` | Root page |+| `src/routes/reviews/page.tsx` | `/reviews` | Static segment |+| `src/routes/reviews/[id]/page.tsx` | `/reviews/:id` | Dynamic segment |+| `src/routes/reviews/[[id]]/page.tsx` | `/reviews/:id?` | Optional dynamic segment |+| `src/routes/search/[*].tsx` | `/search/*` | Catch-all |+| `src/routes/(settings)/page.tsx` | Route grouping | Groups routes without adding a URL segment |+| `src/routes/dashboard/@sidebar/page.tsx` | Parallel route | Renders alongside parent |## Navigation@@ -101,14 +101,14 @@ Sidebar items are generated from pages that export a `config` with a `label`.Use `rank` to control the order. Lower values appear higher:```tsx-// src/pages/orders/page.tsx+// src/routes/orders/page.tsxexport const config: RouteConfig = {label: "Orders",icon: ShoppingCart,rank: 1,}-// src/pages/products/page.tsx+// src/routes/products/page.tsxexport const config: RouteConfig = {label: "Products",icon: Tag,@@ -120,7 +120,7 @@ export const config: RouteConfig = {Use `nested` to group pages under a parent:-```tsx src/pages/settings/shipping/page.tsx+```tsx src/routes/settings/shipping/page.tsxexport const config: RouteConfig = {label: "Shipping",nested: "/settings",@@ -201,7 +201,7 @@ export default {**2. Reference the namespace in your page config**-```tsx src/pages/reviews/page.tsx+```tsx src/routes/reviews/page.tsxexport const config: RouteConfig = {label: "reviews.title",icon: Star,diff --git a/apps/docs/v2/getting-started/introduction.mdx b/apps/docs/v2/getting-started/introduction.mdxindex cb9f104df..dccd3bf95 100644--- a/apps/docs/v2/getting-started/introduction.mdx+++ b/apps/docs/v2/getting-started/introduction.mdx@@ -41,11 +41,11 @@ Most AI coding tools generate loose snippets that you have to wire together yourHere's what that looks like in practice:-- **Adding features via CLI** — An AI agent can run `mercurjs add reviews` to install a complete review system — data models, API routes, workflows, and UI — in one command. No guessing at file structure or imports. The CLI handles wiring, just like Astro's `astro add` command.+- **Adding features via CLI** — An AI agent can run `npx @mercurjs/cli@latest add reviews` to install a complete review system — data models, API routes, workflows, and UI — in one command. No guessing at file structure or imports. The CLI handles wiring automatically.- **Extending workflows without rebuilding them** — Need custom logic when an order is placed? AI can hook into the existing `complete-cart-with-split-orders` workflow and inject a step — without rewriting the entire cart flow. Medusa's workflow hooks make this safe and predictable.-- **Generating typed integrations** — AI reads the generated route types from `mercurjs codegen` and produces API calls that are correct by construction. No hallucinated endpoints, no wrong payloads — the types are the source of truth.-- **Building UI pages** — AI can scaffold an admin or vendor page by creating a file in `src/pages/`. The dashboard SDK picks it up automatically through file-based routing. No manual route registration, no config files to update.-- **Modifying blocks it can diff** — AI can compare local code against the registry with `mercurjs diff`, understand what changed, and make targeted modifications instead of blind overwrites.+- **Generating typed integrations** — AI reads the generated route types from `npx @mercurjs/cli@latest codegen` and produces API calls that are correct by construction. No hallucinated endpoints, no wrong payloads — the types are the source of truth.+- **Building UI pages** — AI can scaffold an admin or vendor page by creating a file in `src/routes/`. The dashboard SDK picks it up automatically through file-based routing. No manual route registration, no config files to update.+- **Modifying blocks it can diff** — AI can compare local code against the registry with `npx @mercurjs/cli@latest diff`, understand what changed, and make targeted modifications instead of blind overwrites.### Why this mattersdiff --git a/apps/docs/v2/welcome.mdx b/apps/docs/v2/welcome.mdxindex e1bc26c2a..04e36fbee 100644--- a/apps/docs/v2/welcome.mdx+++ b/apps/docs/v2/welcome.mdx@@ -9,9 +9,6 @@ mode: "custom"<div className="text-center mt-12 mb-16"><h1 className="text-5xl font-bold tracking-tight mb-4">Mercur v2.0 is here</h1><p className="text-xl text-gray-500 dark:text-gray-400 max-w-2xl mx-auto">- Mercur isn't just a marketplace framework. It's a structured platform designed for both developers and AI to extend safely.- </p>- <p className="text-lg text-gray-400 dark:text-gray-500 max-w-2xl mx-auto mt-4">Most tools use AI to generate snippets. Mercur lets AI work at the system level — composing APIs, modifying workflows, extending UI, and evolving your marketplace architecture.</p><div className="mt-8 flex gap-4 justify-center">