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: rewrite landing and introduction with AI-native narrative (#785)
Viktor Holik43136fb50874
diff --git a/apps/docs/v2/getting-started/introduction.mdx b/apps/docs/v2/getting-started/introduction.mdxindex 9935d0019..cb9f104df 100644--- a/apps/docs/v2/getting-started/introduction.mdx+++ b/apps/docs/v2/getting-started/introduction.mdx@@ -30,3 +30,34 @@ Unlike traditional plugins, Mercur uses a **block-based** approach. Blocks are c### Full extensibility and ownershipMercur is fully open-core and MIT-licensed. There are no transaction fees, no commercial lock-in, and no constraints on how your marketplace must behave. You own the entire codebase and can host it anywhere.++## Building with AI++Mercur is designed so AI agents can build and extend your marketplace safely — not by generating code from scratch, but by working within structured guardrails.++### How AI works with Mercur++Most AI coding tools generate loose snippets that you have to wire together yourself. Mercur gives AI something better to work with: a system with clear boundaries, typed contracts, and composable units.++Here'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.+- **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.++### Why this matters++Traditional commerce platforms give AI no structure to reason about. The result is generated code that looks plausible but breaks in production — wrong API shapes, missing relationships, incompatible data models.++Mercur solves this with:++- **Typed API Client** — API specifications shared between server and client. AI reads real types, not documentation that may be outdated.+- **Block Registry** — Features are discrete, well-defined units. AI can inspect what a block contains before installing it and verify the result after.+- **Monorepo** — Backend, admin, vendor, and shared packages live in one workspace. AI has full context without jumping between repositories.+- **Core Workflows** — Cart, orders, pricing, and vendor logic are exposed as structured steps. AI extends them through hooks rather than patching source code.+- **Dashboard SDK** — File-based routing and virtual modules mean AI adds pages and components by creating files in the right place. The SDK handles registration.+- **Marketplace Payments** — Payout providers follow a pluggable interface. AI can implement a new provider by conforming to the contract, not by reverse-engineering Stripe integration code.++The result: AI agents can compose real marketplace systems — not just write code, but add capabilities, extend business logic, and evolve your architecture with guardrails that prevent mistakes.diff --git a/apps/docs/v2/welcome.mdx b/apps/docs/v2/welcome.mdxindex 984c26a5b..e1bc26c2a 100644--- a/apps/docs/v2/welcome.mdx+++ b/apps/docs/v2/welcome.mdx@@ -1,48 +1,77 @@----title: "Build with Mercur"+title: "Mercur v2.0 is here"sidebarTitle: "Introduction"-description: "Open source marketplace platform with full code ownership."+description: "A structured marketplace platform designed for both developers and AI to extend safely."mode: "custom"---<div className="max-w-5xl mx-auto px-6 py-16"><div className="text-center mt-12 mb-16">- <h1 className="text-5xl font-bold tracking-tight mb-4">Build with Mercur</h1>+ <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">- Open source marketplace platform with a modular, block-based architecture. Install only the pieces you need — full code ownership, no black-box dependencies.+ 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"><a href="/v2/getting-started/installation" className="inline-flex items-center px-5 py-2.5 rounded-lg bg-black dark:bg-white text-white dark:text-black font-medium text-sm hover:opacity-90 transition-opacity no-underline">Get Started</a>- <a href="/v2/getting-started/introduction" className="inline-flex items-center px-5 py-2.5 rounded-lg border border-gray-200 dark:border-gray-700 font-medium text-sm hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors no-underline">- Documentation+ <a href="https://github.com/mercurjs/mercur/releases/tag/v2.0.0" className="inline-flex items-center px-5 py-2.5 rounded-lg border border-gray-200 dark:border-gray-700 font-medium text-sm hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors no-underline">+ Release Notes</a></div></div>+ <div className="mb-16">+ <h2 className="text-2xl font-semibold mb-2">AI-native by design</h2>+ <p className="text-gray-500 dark:text-gray-400 mb-6">Mercur 2.0 provides clear, predictable patterns that AI can reason about.</p>+ <div className="grid grid-cols-1 sm:grid-cols-2 gap-4">+ <div className="p-5 rounded-xl border border-gray-200 dark:border-gray-800">+ <h3 className="font-semibold text-base mb-2">Typed API Client</h3>+ <p className="text-sm text-gray-500 dark:text-gray-400 m-0">API specifications are shared between the server and the client. AI can read types and generate correct integrations without guessing.</p>+ </div>+ <div className="p-5 rounded-xl border border-gray-200 dark:border-gray-800">+ <h3 className="font-semibold text-base mb-2">Block Registry with CLI</h3>+ <p className="text-sm text-gray-500 dark:text-gray-400 m-0">Like shadcn/ui, but for your backend. Features are modular blocks that can be added, updated, and diffed. The CLI is native for AI agents — they can safely add, extend, and modify your system with structured building units.</p>+ </div>+ <div className="p-5 rounded-xl border border-gray-200 dark:border-gray-800">+ <h3 className="font-semibold text-base mb-2">Monorepo Setup</h3>+ <p className="text-sm text-gray-500 dark:text-gray-400 m-0">Everything lives in one consistent system. AI has full context across backend, admin, vendor, and shared packages.</p>+ </div>+ <div className="p-5 rounded-xl border border-gray-200 dark:border-gray-800">+ <h3 className="font-semibold text-base mb-2">Programmable Workflows</h3>+ <p className="text-sm text-gray-500 dark:text-gray-400 m-0">Cart, orders, pricing, and vendors are exposed as structured logic that can be extended, replaced, or hooked into. AI can modify steps, inject logic, and adapt them to new business models.</p>+ </div>+ <div className="p-5 rounded-xl border border-gray-200 dark:border-gray-800">+ <h3 className="font-semibold text-base mb-2">Extensible Panels</h3>+ <p className="text-sm text-gray-500 dark:text-gray-400 m-0">Admin and vendor panels are extended through file-based routing and a block registry — add custom pages, replace entire pages, or swap out components, all wired in automatically by the dashboard SDK.</p>+ </div>+ <div className="p-5 rounded-xl border border-gray-200 dark:border-gray-800">+ <h3 className="font-semibold text-base mb-2">Marketplace Payments</h3>+ <p className="text-sm text-gray-500 dark:text-gray-400 m-0">Native marketplace payments with pluggable payout providers. Stripe Connect out of the box — swap or extend providers as your marketplace evolves.</p>+ </div>+ </div>+ <div className="mt-4 p-5 rounded-xl border border-gray-200 dark:border-gray-800">+ <h3 className="font-semibold text-base mb-2">Built on Medusa.js</h3>+ <p className="text-sm text-gray-500 dark:text-gray-400 m-0">A structured commerce framework with modules, workflows, links, and subscribers as first-class building blocks. This gives AI context, not chaos — so it can safely modify real systems instead of guessing.</p>+ </div>+ </div>+<div className="mb-16"><h2 className="text-2xl font-semibold mb-6">Resources</h2><div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4"><a href="/v2/getting-started/introduction" className="block p-5 rounded-xl border border-gray-200 dark:border-gray-800 hover:border-gray-300 dark:hover:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-900 transition-all no-underline">- <div className="flex items-center gap-3 mb-2">- <span className="text-lg">📖</span>- <h3 className="font-semibold text-base m-0">Documentation</h3>- </div>+ <h3 className="font-semibold text-base mb-2">Documentation</h3><p className="text-sm text-gray-500 dark:text-gray-400 m-0">Guides on setup, configuration, and extending your marketplace.</p></a><a href="https://github.com/mercurjs/mercur" className="block p-5 rounded-xl border border-gray-200 dark:border-gray-800 hover:border-gray-300 dark:hover:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-900 transition-all no-underline">- <div className="flex items-center gap-3 mb-2">- <span className="text-lg">🧩</span>- <h3 className="font-semibold text-base m-0">GitHub</h3>- </div>+ <h3 className="font-semibold text-base mb-2">GitHub</h3><p className="text-sm text-gray-500 dark:text-gray-400 m-0">Source code, examples, and community contributions.</p></a><a href="https://discord.gg/hnZBzc4NJU" className="block p-5 rounded-xl border border-gray-200 dark:border-gray-800 hover:border-gray-300 dark:hover:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-900 transition-all no-underline">- <div className="flex items-center gap-3 mb-2">- <span className="text-lg">💬</span>- <h3 className="font-semibold text-base m-0">Discord</h3>- </div>+ <h3 className="font-semibold text-base mb-2">Discord</h3><p className="text-sm text-gray-500 dark:text-gray-400 m-0">Join the community for help, discussions, and updates.</p></a></div>