@mercurjs/docs 2.3.0-canary.0 → 2.3.0-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/content/home.mdx +107 -0
  2. package/content/learn/architecture.mdx +168 -83
  3. package/content/learn/introduction.mdx +161 -56
  4. package/content/learn/migration-to-2-0.mdx +187 -0
  5. package/content/learn/why-mercur.mdx +91 -0
  6. package/content/platform/attribute/concepts/attribute-types.mdx +59 -0
  7. package/content/platform/attribute/concepts/global-vs-inline.mdx +50 -0
  8. package/content/platform/attribute/concepts/variant-axes.mdx +61 -0
  9. package/content/platform/attribute/guides/attach-attributes-to-a-product.mdx +69 -0
  10. package/content/platform/attribute/guides/create-a-variant-axis.mdx +83 -0
  11. package/content/platform/attribute/guides/create-an-attribute.mdx +81 -0
  12. package/content/platform/attribute/overview.mdx +87 -0
  13. package/content/platform/attribute/reference/data-models.mdx +56 -0
  14. package/content/platform/attribute/reference/events.mdx +41 -0
  15. package/content/platform/attribute/reference/links.mdx +45 -0
  16. package/content/platform/attribute/reference/service.mdx +49 -0
  17. package/content/platform/attribute/reference/workflows.mdx +45 -0
  18. package/content/platform/catalog/concepts/master-products.mdx +54 -0
  19. package/content/platform/catalog/concepts/product-seller-allowlist.mdx +48 -0
  20. package/content/platform/catalog/concepts/status-lifecycle.mdx +58 -0
  21. package/content/platform/catalog/concepts/variants-categories-collections.mdx +49 -0
  22. package/content/platform/catalog/guides/allowlist-stores.mdx +59 -0
  23. package/content/platform/catalog/guides/create-a-master-product.mdx +70 -0
  24. package/content/platform/catalog/guides/publish-or-reject-a-product.mdx +79 -0
  25. package/content/platform/catalog/overview.mdx +90 -0
  26. package/content/platform/catalog/reference/data-models.mdx +66 -0
  27. package/content/platform/catalog/reference/events.mdx +41 -0
  28. package/content/platform/catalog/reference/links.mdx +44 -0
  29. package/content/platform/catalog/reference/service.mdx +52 -0
  30. package/content/platform/catalog/reference/workflows.mdx +40 -0
  31. package/content/platform/commission/concepts/order-commission-lines.mdx +65 -0
  32. package/content/platform/commission/concepts/rule-matching.mdx +86 -0
  33. package/content/platform/commission/concepts/rules-and-rates.mdx +84 -0
  34. package/content/platform/commission/guides/batch-update-rules.mdx +58 -0
  35. package/content/platform/commission/guides/create-a-rate.mdx +72 -0
  36. package/content/platform/commission/guides/refresh-order-commission-lines.mdx +55 -0
  37. package/content/platform/commission/overview.mdx +86 -0
  38. package/content/platform/commission/reference/data-models.mdx +75 -0
  39. package/content/platform/commission/reference/events.mdx +58 -0
  40. package/content/platform/commission/reference/links.mdx +45 -0
  41. package/content/platform/commission/reference/service.mdx +51 -0
  42. package/content/platform/commission/reference/workflows.mdx +40 -0
  43. package/content/platform/offer/concepts/pricing-and-inventory.mdx +72 -0
  44. package/content/platform/offer/concepts/shipping.mdx +48 -0
  45. package/content/platform/offer/concepts/what-is-an-offer.mdx +65 -0
  46. package/content/platform/offer/guides/bulk-create-offers.mdx +84 -0
  47. package/content/platform/offer/guides/create-an-offer.mdx +83 -0
  48. package/content/platform/offer/guides/manage-offer-inventory.mdx +53 -0
  49. package/content/platform/offer/overview.mdx +84 -0
  50. package/content/platform/offer/reference/data-models.mdx +56 -0
  51. package/content/platform/offer/reference/events.mdx +39 -0
  52. package/content/platform/offer/reference/links.mdx +60 -0
  53. package/content/platform/offer/reference/service.mdx +53 -0
  54. package/content/platform/offer/reference/workflows.mdx +38 -0
  55. package/content/platform/order-group/concepts/computed-totals.mdx +59 -0
  56. package/content/platform/order-group/concepts/order-splitting.mdx +61 -0
  57. package/content/platform/order-group/concepts/the-order-group.mdx +64 -0
  58. package/content/platform/order-group/guides/list-order-groups.mdx +67 -0
  59. package/content/platform/order-group/guides/retrieve-an-order-group.mdx +63 -0
  60. package/content/platform/order-group/guides/split-a-cart.mdx +58 -0
  61. package/content/platform/order-group/overview.mdx +83 -0
  62. package/content/platform/order-group/reference/data-models.mdx +40 -0
  63. package/content/platform/order-group/reference/events.mdx +37 -0
  64. package/content/platform/order-group/reference/links.mdx +45 -0
  65. package/content/platform/order-group/reference/service.mdx +50 -0
  66. package/content/platform/order-group/reference/workflows.mdx +39 -0
  67. package/content/platform/payout/concepts/account-lifecycle.mdx +75 -0
  68. package/content/platform/payout/concepts/accounts-and-onboarding.mdx +70 -0
  69. package/content/platform/payout/concepts/payout-pipeline.mdx +99 -0
  70. package/content/platform/payout/guides/create-a-payout-account.mdx +59 -0
  71. package/content/platform/payout/guides/process-a-provider-webhook.mdx +74 -0
  72. package/content/platform/payout/guides/start-provider-onboarding.mdx +50 -0
  73. package/content/platform/payout/overview.mdx +86 -0
  74. package/content/platform/payout/reference/data-models.mdx +61 -0
  75. package/content/platform/payout/reference/events.mdx +48 -0
  76. package/content/platform/payout/reference/links.mdx +36 -0
  77. package/content/platform/payout/reference/service.mdx +53 -0
  78. package/content/platform/payout/reference/workflows.mdx +32 -0
  79. package/content/platform/product-edit/concepts/change-actions.mdx +66 -0
  80. package/content/platform/product-edit/concepts/change-pipeline.mdx +69 -0
  81. package/content/platform/product-edit/concepts/status-and-auto-confirm.mdx +66 -0
  82. package/content/platform/product-edit/guides/confirm-or-decline-a-change.mdx +76 -0
  83. package/content/platform/product-edit/guides/edit-a-product.mdx +74 -0
  84. package/content/platform/product-edit/guides/request-a-revision.mdx +54 -0
  85. package/content/platform/product-edit/overview.mdx +85 -0
  86. package/content/platform/product-edit/reference/data-models.mdx +65 -0
  87. package/content/platform/product-edit/reference/events.mdx +47 -0
  88. package/content/platform/product-edit/reference/links.mdx +39 -0
  89. package/content/platform/product-edit/reference/service.mdx +43 -0
  90. package/content/platform/product-edit/reference/workflows.mdx +49 -0
  91. package/content/platform/review/concepts/product-vs-seller-reviews.mdx +63 -0
  92. package/content/platform/review/concepts/ratings-and-moderation.mdx +64 -0
  93. package/content/platform/review/concepts/the-review-model.mdx +56 -0
  94. package/content/platform/review/guides/compute-aggregate-ratings.mdx +57 -0
  95. package/content/platform/review/guides/create-a-review.mdx +55 -0
  96. package/content/platform/review/guides/moderate-a-review.mdx +58 -0
  97. package/content/platform/review/guides/respond-to-a-review.mdx +61 -0
  98. package/content/platform/review/overview.mdx +87 -0
  99. package/content/platform/review/reference/data-models.mdx +36 -0
  100. package/content/platform/review/reference/events.mdx +61 -0
  101. package/content/platform/review/reference/links.mdx +43 -0
  102. package/content/platform/review/reference/service.mdx +54 -0
  103. package/content/platform/review/reference/workflows.mdx +31 -0
  104. package/content/platform/store/concepts/lifecycle.mdx +62 -0
  105. package/content/platform/store/concepts/store-entity.mdx +53 -0
  106. package/content/platform/store/concepts/team.mdx +50 -0
  107. package/content/platform/store/guides/create-a-store.mdx +55 -0
  108. package/content/platform/store/guides/manage-the-team.mdx +55 -0
  109. package/content/platform/store/guides/moderate-a-store.mdx +59 -0
  110. package/content/platform/store/overview.mdx +86 -0
  111. package/content/platform/store/reference/data-models.mdx +89 -0
  112. package/content/platform/store/reference/events.mdx +43 -0
  113. package/content/platform/store/reference/links.mdx +71 -0
  114. package/content/platform/store/reference/service.mdx +51 -0
  115. package/content/platform/store/reference/workflows.mdx +35 -0
  116. package/content/references/api/admin/commission-rates/create-commission-rate.mdx +1 -1
  117. package/content/references/api/admin/commission-rates/list-commission-rates.mdx +2 -2
  118. package/content/references/api/admin/commission-rates/update-commission-rate.mdx +1 -1
  119. package/content/references/api/admin/offers/batch-create-offers.mdx +3 -3
  120. package/content/references/api/admin/order-groups/list-order-groups.mdx +1 -1
  121. package/content/references/api/admin/product-attributes/create-attribute-value.mdx +2 -2
  122. package/content/references/api/admin/product-attributes/create-product-attribute.mdx +1 -1
  123. package/content/references/api/admin/product-attributes/update-product-attribute.mdx +1 -1
  124. package/content/references/api/admin/product-changes/confirm-product-change.mdx +1 -1
  125. package/content/references/api/admin/products/batch-product-attributes.mdx +1 -1
  126. package/content/references/api/admin/products/create-product.mdx +1 -1
  127. package/content/references/api/admin/products/preview-product.mdx +1 -1
  128. package/content/references/api/admin.mdx +4 -5
  129. package/content/references/api/conventions.mdx +9 -7
  130. package/content/references/api/store/carts/add-line-item.mdx +1 -1
  131. package/content/references/api/store/offers/list-offers.mdx +1 -1
  132. package/content/references/api/store/order-groups/list-order-groups.mdx +1 -1
  133. package/content/references/api/store.mdx +4 -13
  134. package/content/references/api/vendor/members/accept-member-invite.mdx +1 -1
  135. package/content/references/api/vendor/offers/batch-create-offers.mdx +4 -0
  136. package/content/references/api/vendor/offers/batch-offer-inventory-items.mdx +2 -0
  137. package/content/references/api/vendor/offers/create-offer.mdx +13 -1
  138. package/content/references/api/vendor/offers/list-offers.mdx +4 -0
  139. package/content/references/api/vendor/offers/retrieve-offer.mdx +4 -0
  140. package/content/references/api/vendor/offers/update-offer.mdx +12 -0
  141. package/content/references/api/vendor/payout-accounts/create-onboarding.mdx +1 -1
  142. package/content/references/api/vendor/products/batch-product-attributes.mdx +1 -1
  143. package/content/references/api/vendor/products/create-product-variant.mdx +1 -1
  144. package/content/references/api/vendor/products/create-product.mdx +1 -1
  145. package/content/references/api/vendor/products/delete-product.mdx +1 -1
  146. package/content/references/api/vendor/products/update-product.mdx +1 -1
  147. package/content/references/api/vendor/sellers/create-seller.mdx +2 -2
  148. package/content/references/api/vendor/sellers/list-sellers.mdx +1 -1
  149. package/content/references/api/vendor.mdx +6 -5
  150. package/content/references/configuration.mdx +16 -33
  151. package/content/references/overview.mdx +34 -52
  152. package/content/references/panel-extensions/create-page.mdx +194 -0
  153. package/content/references/panel-extensions/custom-fields.mdx +256 -0
  154. package/content/references/panel-extensions/overview.mdx +102 -0
  155. package/content/references/panel-extensions/widgets.mdx +212 -0
  156. package/content/resources/ai/mcp.mdx +2 -2
  157. package/content/resources/ai/overview.mdx +21 -16
  158. package/content/resources/ai/skills.mdx +67 -0
  159. package/content/resources/best-practices/api-routes.mdx +55 -43
  160. package/content/resources/best-practices/custom-fields.mdx +116 -92
  161. package/content/resources/best-practices/frontend.mdx +62 -50
  162. package/content/resources/best-practices/module-links.mdx +48 -34
  163. package/content/resources/best-practices/modules.mdx +53 -27
  164. package/content/resources/best-practices/overview.mdx +45 -17
  165. package/content/resources/best-practices/subscribers-and-jobs.mdx +37 -24
  166. package/content/resources/best-practices/types.mdx +38 -23
  167. package/content/resources/best-practices/workflows.mdx +33 -21
  168. package/content/resources/customization/custom-fields.mdx +15 -15
  169. package/content/resources/customization/extend-a-workflow.mdx +7 -4
  170. package/content/resources/customization/extending-panels.mdx +55 -52
  171. package/content/resources/deployment/medusa-cloud.mdx +21 -20
  172. package/content/resources/deployment/self-host.mdx +123 -0
  173. package/content/resources/integrations/overview.mdx +38 -0
  174. package/content/resources/integrations/stripe-connect.mdx +39 -38
  175. package/content/resources/tutorials/add-a-block.mdx +25 -18
  176. package/content/resources/tutorials/add-a-widget.mdx +32 -23
  177. package/content/resources/tutorials/add-order-detail-button.mdx +33 -20
  178. package/content/resources/tutorials/attributes-and-variant-axes.mdx +28 -27
  179. package/content/resources/tutorials/build-a-block.mdx +26 -15
  180. package/content/resources/tutorials/custom-api-route.mdx +32 -20
  181. package/content/resources/tutorials/custom-panel-page.mdx +21 -12
  182. package/content/resources/tutorials/customize-navigation.mdx +30 -23
  183. package/content/resources/tutorials/extend-forms-and-tables.mdx +36 -28
  184. package/content/resources/tutorials/extend-onboarding.mdx +38 -35
  185. package/content/resources/tutorials/master-products-and-offers.mdx +28 -23
  186. package/content/telemetry.mdx +3 -3
  187. package/content/user-guide/admin/attributes/how-tos/create-an-attribute.mdx +64 -0
  188. package/content/user-guide/admin/attributes/how-tos/manage-possible-values.mdx +40 -0
  189. package/content/user-guide/admin/attributes/overview.mdx +22 -0
  190. package/content/user-guide/admin/commissions/how-tos/create-a-commission-rule.mdx +63 -0
  191. package/content/user-guide/admin/commissions/how-tos/edit-the-global-commission.mdx +48 -0
  192. package/content/user-guide/admin/commissions/how-tos/manage-a-commission-rule.mdx +45 -0
  193. package/content/user-guide/admin/commissions/overview.mdx +25 -0
  194. package/content/user-guide/admin/overview.mdx +20 -12
  195. package/content/user-guide/admin/product-requests/how-tos/review-a-new-product.mdx +58 -0
  196. package/content/user-guide/admin/product-requests/how-tos/review-a-product-edit.mdx +48 -0
  197. package/content/user-guide/admin/product-requests/overview.mdx +25 -0
  198. package/content/user-guide/vendor/offers/how-tos/create-an-offer.mdx +59 -0
  199. package/content/user-guide/vendor/offers/how-tos/update-prices-and-stock.mdx +40 -0
  200. package/content/user-guide/vendor/offers/overview.mdx +22 -0
  201. package/content/user-guide/vendor/onboarding.mdx +79 -0
  202. package/content/user-guide/vendor/orders/how-tos/fulfill-an-order.mdx +49 -0
  203. package/content/user-guide/vendor/orders/how-tos/mark-an-order-as-delivered.mdx +33 -0
  204. package/content/user-guide/vendor/orders/how-tos/process-a-return.mdx +42 -0
  205. package/content/user-guide/vendor/orders/how-tos/refund-an-order.mdx +38 -0
  206. package/content/user-guide/vendor/orders/how-tos/ship-an-order.mdx +40 -0
  207. package/content/user-guide/vendor/orders/overview.mdx +31 -0
  208. package/content/user-guide/vendor/overview.mdx +23 -12
  209. package/content/user-guide/vendor/products/how-tos/edit-a-product.mdx +44 -0
  210. package/content/user-guide/vendor/products/how-tos/submit-a-product.mdx +63 -0
  211. package/content/user-guide/vendor/products/overview.mdx +22 -0
  212. package/llms.txt +176 -142
  213. package/package.json +1 -1
  214. package/content/learn/concepts.mdx +0 -84
  215. package/content/learn/installation.mdx +0 -117
  216. package/content/learn/mirakl-alternative.mdx +0 -86
  217. package/content/migration/from-1-x-to-2-0.mdx +0 -152
  218. package/content/migration/from-2-0-to-2-1.mdx +0 -105
  219. package/content/migration/overview.mdx +0 -58
  220. package/content/references/api/store/search/search.mdx +0 -136
  221. package/content/references/modules/commission.mdx +0 -106
  222. package/content/references/modules/custom-fields.mdx +0 -45
  223. package/content/references/modules/media.mdx +0 -55
  224. package/content/references/modules/offer.mdx +0 -64
  225. package/content/references/modules/payout.mdx +0 -121
  226. package/content/references/modules/product-attribute.mdx +0 -111
  227. package/content/references/modules/product-edit.mdx +0 -80
  228. package/content/references/modules/search.mdx +0 -112
  229. package/content/references/modules/seller.mdx +0 -175
  230. package/content/references/panel-extension-api.mdx +0 -337
  231. package/content/references/workflows/cart/add-seller-shipping-method-to-cart.mdx +0 -48
  232. package/content/references/workflows/cart/complete-cart-with-split-orders.mdx +0 -36
  233. package/content/references/workflows/cart/list-seller-shipping-options-for-cart.mdx +0 -39
  234. package/content/references/workflows/cart/update-cart-seller-promotions.mdx +0 -42
  235. package/content/references/workflows/commission/batch-commission-rules.mdx +0 -49
  236. package/content/references/workflows/commission/create-commission-rates.mdx +0 -41
  237. package/content/references/workflows/commission/delete-commission-rates.mdx +0 -34
  238. package/content/references/workflows/commission/refresh-order-commission-lines.mdx +0 -30
  239. package/content/references/workflows/commission/update-commission-rates.mdx +0 -35
  240. package/content/references/workflows/media/set-category-images.mdx +0 -41
  241. package/content/references/workflows/media/set-collection-images.mdx +0 -41
  242. package/content/references/workflows/member/accept-member-invite.mdx +0 -33
  243. package/content/references/workflows/member/add-seller-member.mdx +0 -30
  244. package/content/references/workflows/member/create-member-invites.mdx +0 -34
  245. package/content/references/workflows/member/delete-member-invite.mdx +0 -24
  246. package/content/references/workflows/member/remove-seller-member.mdx +0 -28
  247. package/content/references/workflows/member/resend-member-invite.mdx +0 -28
  248. package/content/references/workflows/member/update-member-role.mdx +0 -28
  249. package/content/references/workflows/member/update-member.mdx +0 -35
  250. package/content/references/workflows/offer/batch-offer-inventory-items.mdx +0 -62
  251. package/content/references/workflows/offer/create-offers.mdx +0 -65
  252. package/content/references/workflows/offer/delete-offers.mdx +0 -35
  253. package/content/references/workflows/offer/update-offers.mdx +0 -53
  254. package/content/references/workflows/order/cancel-order-fulfillment.mdx +0 -34
  255. package/content/references/workflows/order/confirm-claim-request.mdx +0 -25
  256. package/content/references/workflows/order/confirm-exchange-request.mdx +0 -25
  257. package/content/references/workflows/order/confirm-order-edit-request.mdx +0 -25
  258. package/content/references/workflows/order/confirm-return-receive.mdx +0 -25
  259. package/content/references/workflows/order/create-order-fulfillment.mdx +0 -45
  260. package/content/references/workflows/order-group/get-order-group-detail.mdx +0 -29
  261. package/content/references/workflows/order-group/get-order-groups-list.mdx +0 -38
  262. package/content/references/workflows/overview.mdx +0 -72
  263. package/content/references/workflows/payout/create-onboarding.mdx +0 -36
  264. package/content/references/workflows/payout/create-payout-account.mdx +0 -33
  265. package/content/references/workflows/payout/create-payout.mdx +0 -30
  266. package/content/references/workflows/payout/process-payout-for-webhook.mdx +0 -34
  267. package/content/references/workflows/product/confirm-products.mdx +0 -48
  268. package/content/references/workflows/product/create-products.mdx +0 -63
  269. package/content/references/workflows/product/link-sellers-to-product-category.mdx +0 -40
  270. package/content/references/workflows/product/link-sellers-to-product.mdx +0 -40
  271. package/content/references/workflows/product/reject-product.mdx +0 -48
  272. package/content/references/workflows/product/request-product-change.mdx +0 -48
  273. package/content/references/workflows/product-attribute/add-product-attributes-to-product.mdx +0 -49
  274. package/content/references/workflows/product-attribute/create-and-link-product-attributes-to-product.mdx +0 -46
  275. package/content/references/workflows/product-attribute/create-product-attribute-values.mdx +0 -43
  276. package/content/references/workflows/product-attribute/create-product-attributes.mdx +0 -56
  277. package/content/references/workflows/product-attribute/delete-product-attribute-values.mdx +0 -30
  278. package/content/references/workflows/product-attribute/delete-product-attributes.mdx +0 -30
  279. package/content/references/workflows/product-attribute/remove-product-attributes-from-product.mdx +0 -29
  280. package/content/references/workflows/product-attribute/update-product-attribute-values.mdx +0 -44
  281. package/content/references/workflows/product-attribute/update-product-attributes-on-product.mdx +0 -41
  282. package/content/references/workflows/product-attribute/update-product-attributes.mdx +0 -48
  283. package/content/references/workflows/product-attribute/upsert-product-attribute-values.mdx +0 -43
  284. package/content/references/workflows/product-edit/auto-confirm-product-change.mdx +0 -39
  285. package/content/references/workflows/product-edit/cancel-product-change.mdx +0 -49
  286. package/content/references/workflows/product-edit/confirm-product-change.mdx +0 -57
  287. package/content/references/workflows/product-edit/create-product-change.mdx +0 -72
  288. package/content/references/workflows/product-edit/reject-product-change.mdx +0 -54
  289. package/content/references/workflows/product-edit/stage-product-change.mdx +0 -75
  290. package/content/references/workflows/seller/approve-seller.mdx +0 -36
  291. package/content/references/workflows/seller/create-seller-account.mdx +0 -59
  292. package/content/references/workflows/seller/create-seller-defaults.mdx +0 -22
  293. package/content/references/workflows/seller/create-sellers.mdx +0 -65
  294. package/content/references/workflows/seller/delete-seller-professional-details.mdx +0 -37
  295. package/content/references/workflows/seller/delete-sellers.mdx +0 -24
  296. package/content/references/workflows/seller/invite-seller.mdx +0 -28
  297. package/content/references/workflows/seller/suspend-seller.mdx +0 -37
  298. package/content/references/workflows/seller/terminate-seller.mdx +0 -37
  299. package/content/references/workflows/seller/unsuspend-seller.mdx +0 -36
  300. package/content/references/workflows/seller/unterminate-seller.mdx +0 -36
  301. package/content/references/workflows/seller/update-seller-address.mdx +0 -55
  302. package/content/references/workflows/seller/update-seller-payment-details.mdx +0 -52
  303. package/content/references/workflows/seller/update-seller-professional-details.mdx +0 -48
  304. package/content/references/workflows/seller/update-sellers.mdx +0 -57
  305. package/content/resources/ai/llms.mdx +0 -74
  306. package/content/resources/integrations/notifications.mdx +0 -39
  307. package/content/resources/integrations/search.mdx +0 -122
  308. package/content/resources/tutorials/configure-commissions.mdx +0 -127
  309. package/content/resources/tutorials/first-marketplace.mdx +0 -45
  310. package/content/resources/tutorials/handle-product-requests.mdx +0 -80
  311. package/content/resources/tutorials/import-export-products.mdx +0 -96
  312. package/content/resources/tutorials/seller-payouts-stripe.mdx +0 -89
  313. package/content/resources/tutorials/store-setup-checklist.mdx +0 -214
  314. package/content/tools/api-client.mdx +0 -155
  315. package/content/tools/cli.mdx +0 -196
  316. package/content/tools/dashboard-sdk.mdx +0 -35
@@ -0,0 +1,107 @@
1
+ ---
2
+ title: "Mercur Documentation"
3
+ sidebarTitle: "Home"
4
+ description: "The open-source enterprise marketplace platform built on Medusa."
5
+ ---
6
+
7
+ Mercur is the open-source enterprise marketplace platform built on Medusa. It adds
8
+ sellers, offers, commissions, order splitting, and payouts on top of Medusa's
9
+ commerce engine, with role-based access and an auditable change pipeline, on
10
+ infrastructure you own.
11
+
12
+ <video
13
+ playsInline
14
+ controls
15
+ className="w-full aspect-video"
16
+ src="/images/admin-showcase.mp4"
17
+ />
18
+
19
+ ## Get started
20
+
21
+ <CardGroup cols={2}>
22
+ <Card title="Overview" icon="book-open" href="/learn/introduction">
23
+ Install Mercur, tour the panels, and watch a multi-vendor order flow.
24
+ </Card>
25
+ <Card title="Why Mercur" icon="lightbulb" href="/learn/why-mercur">
26
+ Governance, ownership, and composability without a closed platform.
27
+ </Card>
28
+ <Card title="Architecture" icon="sitemap" href="/learn/architecture">
29
+ How Mercur layers the marketplace domain on Medusa.
30
+ </Card>
31
+ <Card title="Build with AI" icon="robot" href="/resources/ai/overview">
32
+ Version-matched docs, agent skills, and the MCP server.
33
+ </Card>
34
+ </CardGroup>
35
+
36
+ ## Explore the platform
37
+
38
+ Each marketplace capability is its own module, with concepts, server guides, and a
39
+ data-model reference.
40
+
41
+ <CardGroup cols={3}>
42
+ <Card title="Store" icon="store" href="/platform/store/overview">
43
+ Govern who sells, with role-based access and an account lifecycle.
44
+ </Card>
45
+ <Card title="Catalog" icon="layer-group" href="/platform/catalog/overview">
46
+ One shared master catalog that every store sells against.
47
+ </Card>
48
+ <Card title="Offer" icon="tag" href="/platform/offer/overview">
49
+ A seller's listing against a master product, with its own price and stock.
50
+ </Card>
51
+ <Card title="Attribute" icon="sliders" href="/platform/attribute/overview">
52
+ A typed attribute catalog that also drives variant axes.
53
+ </Card>
54
+ <Card title="Product Edit" icon="clipboard-check" href="/platform/product-edit/overview">
55
+ The auditable change pipeline behind every catalog edit.
56
+ </Card>
57
+ <Card title="Order Group" icon="diagram-project" href="/platform/order-group/overview">
58
+ How a single cart splits into per-seller orders.
59
+ </Card>
60
+ <Card title="Commission" icon="percent" href="/platform/commission/overview">
61
+ Policy-based rules and per-order commission lines.
62
+ </Card>
63
+ <Card title="Payout" icon="wallet" href="/platform/payout/overview">
64
+ Split settlement and provider-driven payouts.
65
+ </Card>
66
+ <Card title="Review" icon="star" href="/platform/review/overview">
67
+ Product and seller reviews with moderation.
68
+ </Card>
69
+ </CardGroup>
70
+
71
+ ## Build
72
+
73
+ <CardGroup cols={2}>
74
+ <Card title="How-Tos" icon="wrench" href="/resources/best-practices/overview">
75
+ Extend the server and both panels the Mercur way.
76
+ </Card>
77
+ <Card title="Integrations" icon="plug" href="/resources/integrations/overview">
78
+ Stripe Connect and installable blocks.
79
+ </Card>
80
+ <Card title="Self-host" icon="server" href="/resources/deployment/self-host">
81
+ Deploy Mercur on your own infrastructure.
82
+ </Card>
83
+ <Card title="Blocks" icon="cube" href="/resources/tutorials/add-a-block">
84
+ Install features as source code you own.
85
+ </Card>
86
+ </CardGroup>
87
+
88
+ ## API reference
89
+
90
+ Fully typed routes for every audience. Start with the
91
+ [API conventions](/references/api/conventions) for authentication, seller scoping,
92
+ and field selection.
93
+
94
+ <CardGroup cols={2}>
95
+ <Card title="Admin API" icon="shield-halved" href="/references/api/admin">
96
+ Operator routes under <code>/admin/*</code>.
97
+ </Card>
98
+ <Card title="Vendor API" icon="store" href="/references/api/vendor">
99
+ Seller-scoped routes under <code>/vendor/*</code>.
100
+ </Card>
101
+ <Card title="Store API" icon="bag-shopping" href="/references/api/store">
102
+ Storefront routes under <code>/store/*</code>.
103
+ </Card>
104
+ <Card title="Panel extensions" icon="puzzle-piece" href="/references/panel-extensions/overview">
105
+ Widgets, custom fields, and custom pages.
106
+ </Card>
107
+ </CardGroup>
@@ -1,15 +1,26 @@
1
1
  ---
2
- title: "Overview"
3
- description: "How Mercur is built architecture, technology stack, and how the pieces fit together."
2
+ title: "Architecture"
3
+ description: "How the Mercur enterprise marketplace platform is built: its layers, building blocks, and how the pieces fit together."
4
4
  ---
5
5
 
6
- Mercur is a marketplace platform built on top of [MedusaJS](https://medusajs.com), an open-source headless commerce framework. Rather than being a standalone application, Mercur extends Medusa with marketplace-specific logic — sellers, commissions, order splitting, payouts — while Medusa handles the foundational commerce layer.
6
+ Mercur is the open-source enterprise marketplace platform, built on
7
+ [Medusa](https://medusajs.com). It is composable, API-first, and AI-native, and
8
+ it runs on infrastructure you own.
7
9
 
8
- This page explains how the system is structured and how its components interact.
10
+ Mercur is not a standalone application, and it is not something you assemble from
11
+ scratch. Medusa provides the commerce engine, such as products, pricing, carts,
12
+ orders, payments, and fulfillment. Mercur adds the marketplace layer on top:
13
+ sellers, commissions, order splitting, payouts, and a governed change pipeline,
14
+ along with an admin panel and a vendor portal. Operators run the marketplace with
15
+ role-based access control and an auditable change history, on a codebase they own
16
+ outright.
9
17
 
10
- ## Architecture
18
+ This page explains how the platform is structured and how its parts fit together.
11
19
 
12
- Mercur follows a layered architecture where each layer has a distinct responsibility:
20
+ ## High-level architecture
21
+
22
+ Mercur is layered. Each layer owns one responsibility and talks only to the layer
23
+ beneath it, so you can reason about, extend, or replace any layer on its own.
13
24
 
14
25
  ```mermaid
15
26
  graph TD
@@ -47,50 +58,132 @@ graph TD
47
58
 
48
59
  ### Commerce layer
49
60
 
50
- Medusa provides the core commerce engine products, pricing, carts, orders, payments, fulfillment, promotions, and inventory. Mercur does not replace any of this. Instead, it builds on top using Medusa's extension model: custom modules, links, workflows, and API routes.
61
+ Medusa provides the core commerce engine: products, pricing, carts, orders,
62
+ payments, fulfillment, promotions, and inventory. Mercur does not replace any of
63
+ it. Mercur builds on top through Medusa's extension model, using custom modules,
64
+ links, workflows, and API routes. This is the one place the word framework
65
+ applies. Medusa is the commerce framework, and Mercur is the platform you run on
66
+ it.
51
67
 
52
68
  ### Marketplace layer
53
69
 
54
- This is where Mercur's code lives. It introduces marketplace modules — **Seller**, **Commission**, **Offer**, **Payout**, **Product Attribute**, and **Product Edit**, among others — along with workflows that coordinate marketplace-specific operations like order splitting, product approvals, and commission calculation. Links connect these modules to Medusa's core entities (products, orders, customers) without modifying the original models.
70
+ This is where Mercur's own code lives, packaged as the `@mercurjs/core` plugin. It
71
+ adds marketplace modules such as Seller, Commission, Offer, Payout, Product
72
+ Attribute, and Product Edit, plus the workflows that coordinate marketplace
73
+ operations like order splitting, product approvals, and commission calculation.
74
+ Links connect these modules to Medusa's core entities without modifying the
75
+ original models.
55
76
 
56
77
  ### API layer
57
78
 
58
- Mercur exposes three sets of HTTP endpoints:
79
+ Mercur exposes three sets of HTTP endpoints, one per audience.
80
+
81
+ | API | Path | Purpose |
82
+ | ---------- | ----------- | -------------------------------------------------------------------------- |
83
+ | **Admin** | `/admin/*` | Platform administration: manage sellers, configure commission rates, view payouts. |
84
+ | **Vendor** | `/vendor/*` | Seller operations: manage products, orders, fulfillment, shipping, inventory, payouts. |
85
+ | **Store** | `/store/*` | Storefront: browse sellers, manage carts, check out with order splitting. |
86
+
87
+ Each route is composed of a request handler, middleware, query configuration, and
88
+ Zod validators. The middleware is where access control lives, so every vendor
89
+ request is scoped to its own seller's data before the handler runs. See the
90
+ [API conventions](/references/api/conventions) for authentication and scoping.
91
+
92
+ ### Panels and clients
93
+
94
+ Three interfaces consume the APIs.
95
+
96
+ - **Admin Panel:** a React application on Medusa UI. Operators approve sellers, set commission rates, and monitor payouts across the whole marketplace.
97
+ - **Vendor Portal:** a React application for sellers to manage products, orders, fulfillment, and payouts, scoped to their own store.
98
+ - **Storefront:** the customer-facing application. Build it with any frontend that consumes the Store API.
99
+
100
+ Both panels talk to the API through `@mercurjs/client`, a fully typed fetch
101
+ wrapper generated from the real route definitions, so requests and responses stay
102
+ in sync with the backend.
103
+
104
+ ## Building blocks of the marketplace layer
105
+
106
+ The marketplace layer is assembled from four Medusa-native primitives. Together
107
+ they keep the platform composable: each piece is small, explicit, and replaceable.
108
+
109
+ ### Modules
110
+
111
+ A module encapsulates the data models and business logic for one domain, such as
112
+ Seller or Commission. Each module is self-contained, with its own models, service,
113
+ and migrations. Modules never reference each other directly. They communicate
114
+ through links and workflows, which keeps domains decoupled.
115
+ [Learn about modules](/resources/best-practices/modules).
116
+
117
+ ### Links
118
+
119
+ A link defines a relationship between a Mercur module and a Medusa core entity
120
+ without modifying either model. For example, the product-seller link connects a
121
+ Medusa `Product` to a Mercur `Seller` and acts as the allowlist of who may sell
122
+ what. Dozens of links wire the marketplace layer into the commerce layer.
123
+ [Learn about module links](/resources/best-practices/module-links).
124
+
125
+ ### Workflows
126
+
127
+ A workflow orchestrates a multi-step operation that spans modules. Workflows
128
+ support compensation, which rolls back automatically on failure, and hooks, which
129
+ are the extension points you inject custom logic into. The central one is
130
+ `completeCartWithSplitOrdersWorkflow`, which validates a cart, splits it by
131
+ seller, creates an order for each, allocates payment, and calculates commissions.
132
+ [Learn about workflows](/resources/best-practices/workflows).
133
+
134
+ ### Subscribers and events
135
+
136
+ Workflows emit events. Subscribers listen and run asynchronous side effects, such
137
+ as sending notifications, calling webhooks, or transferring payouts. This keeps
138
+ the core workflows focused while the platform reacts to change.
139
+ [Learn about subscribers and jobs](/resources/best-practices/subscribers-and-jobs).
140
+
141
+ ## Enterprise governance by design
142
+
143
+ Governance lives in the architecture, not in a bolt-on. The same primitives that
144
+ make the platform composable also make it governable.
59
145
 
60
- | API | Path | Purpose |
61
- |-----|------|---------|
62
- | **Admin** | `/admin/*` | Platform administration manage sellers, configure commission rates, view payouts |
63
- | **Vendor** | `/vendor/*` | Seller operations manage products, orders, fulfillment, shipping, inventory, payouts |
64
- | **Store** | `/store/*` | Storefront browse sellers, manage carts, checkout with order splitting |
146
+ - **Role-based access control.** `withMercur()` registers a roles module, so vendor requests are scoped to their own seller by default. Operators and sellers each see only what their role permits.
147
+ - **An auditable change pipeline.** Every product edit is captured as an immutable `ProductChange` record: who changed what, and who approved it. Low-risk edits auto-confirm, and the rest wait for operator review.
148
+ - **Financial accuracy.** All commission arithmetic uses BigNumber with arbitrary precision, so split payments and payouts stay exact to the cent.
149
+ - **A governed surface for AI agents.** The typed client, exposed workflows, and `llms.txt` give AI agents structured contracts to build against, inside the same role and review guardrails as human users. Agents extend the platform. They do not bypass its governance.
150
+ - **You own the deployment.** Mercur is MIT-licensed and runs on infrastructure you control. Blocks ship as source code, so you own every line, with no hosted vendor in the request path and no commission on gross merchandise value.
65
151
 
66
- Each API route is composed of a request handler, middleware, query configuration, and Zod validators.
67
152
 
68
- ### Frontend layer
153
+ ## How a multi-vendor order flows
69
154
 
70
- Three interfaces consume the APIs:
155
+ A single customer cart can hold items from many sellers. Order splitting is where
156
+ the marketplace, commerce, commission, and payout layers work together.
71
157
 
72
- - **Admin Panel** Built with React and Medusa UI components. Operators use it to manage the marketplace: approve sellers, set commission rates, handle disputes.
73
- - **Vendor Portal** A React application for sellers to manage their products, orders, fulfillment, and payouts. Uses file-based routing via the Dashboard SDK.
74
- - **Storefront** Customer-facing application. Can be built with any frontend technology that consumes the Store API.
158
+ 1. **Customer adds items** from multiple sellers to one cart (Store API).
159
+ 2. **Cart completion** triggers the split-order workflow (marketplace layer).
160
+ 3. Items are **grouped by seller**, and a separate order is created for each (commerce and marketplace layers).
161
+ 4. **Commission lines** are calculated per order from the matching rates (Commission module).
162
+ 5. **Payment is split** proportionally across the seller orders (commerce layer).
163
+ 6. Each seller's order is **credited to its payout account** after commission (Payout module).
164
+ 7. **Events are emitted**, triggering notifications, webhook calls, and other side effects (subscribers).
165
+ 8. Sellers **manage their orders** through the Vendor Portal (Vendor API).
166
+ 9. The operator **monitors everything** through the Admin Panel (Admin API).
75
167
 
76
168
  ## Technology stack
77
169
 
78
- | Layer | Technology |
79
- |-------|-----------|
80
- | Runtime | Node.js 20+, TypeScript |
81
- | Framework | MedusaJS v2 |
82
- | Database | PostgreSQL |
83
- | Frontend | React 18, React Router, Vite |
84
- | Data fetching | TanStack React Query |
85
- | UI components | Medusa UI, Radix UI |
86
- | Form handling | React Hook Form, Zod |
87
- | Tables | TanStack React Table |
88
- | Build | Turborepo (monorepo), Bun (package manager), tsup |
89
- | Internationalization | i18next |
170
+ | Layer | Technology |
171
+ | -------------------- | --------------------------------------------------- |
172
+ | Runtime | Node.js 20+, TypeScript |
173
+ | Commerce framework | Medusa v2 |
174
+ | Database | PostgreSQL |
175
+ | Frontend | React 18, React Router, Vite |
176
+ | Data fetching | TanStack React Query |
177
+ | UI components | Medusa UI, Radix UI |
178
+ | Form handling | React Hook Form, Zod |
179
+ | Tables | TanStack React Table |
180
+ | Build | Turborepo (monorepo), Bun (package manager), tsup |
181
+ | Internationalization | i18next |
90
182
 
91
- ## Core plugin
183
+ ## Core plugin layout
92
184
 
93
- The core plugin (`@mercurjs/core`) is the main package that contains all marketplace logic. It's structured as a standard MedusaJS plugin:
185
+ `@mercurjs/core` is the package that holds all marketplace logic. It is structured
186
+ as a standard Medusa plugin.
94
187
 
95
188
  ```
96
189
  core/src/
@@ -101,10 +194,10 @@ core/src/
101
194
  │ ├── payout/ # Payout accounts, onboarding, payouts
102
195
  │ ├── product-attribute/ # Typed attribute catalog and values
103
196
  │ ├── product-edit/ # Product change requests and audit trail
104
- │ └── ... # Media, custom fields, search
197
+ │ └── ... # Media, custom fields, and more
105
198
  ├── links/ # Relationships between modules
106
199
  ├── workflows/ # Multi-step business processes
107
- │ ├── seller/ # Seller CRUD workflows
200
+ │ ├── seller/ # Seller lifecycle workflows
108
201
  │ ├── cart/ # Cart completion with order splitting
109
202
  │ ├── commission/ # Commission rate and line management
110
203
  │ ├── payout/ # Payout processing and crediting
@@ -112,7 +205,7 @@ core/src/
112
205
  │ ├── product/ # Product approval and seller linking
113
206
  │ ├── product-edit/ # Change-request lifecycle
114
207
  │ ├── order-group/ # Order group operations
115
- │ └── ... # Attributes, shipping, inventory, promotions, etc.
208
+ │ └── ... # Attributes, shipping, inventory, promotions
116
209
  ├── api/ # HTTP route handlers
117
210
  │ ├── admin/ # Admin API routes
118
211
  │ ├── vendor/ # Vendor API routes
@@ -123,51 +216,26 @@ core/src/
123
216
  └── jobs/ # Scheduled background tasks
124
217
  ```
125
218
 
126
- ### Modules
127
-
128
- Modules encapsulate data models and business logic for a specific domain. Each module is self-contained with its own models, service, migrations, and repositories. Modules don't reference each other directly — they communicate through links and workflows.
129
-
130
- ### Links
131
-
132
- Links define relationships between Mercur modules and Medusa core entities. For example, the `product-seller-link` connects a Medusa `Product` to a Mercur `Seller` without modifying either model. Dozens of links wire the marketplace layer into the commerce layer — connecting sellers to their scoped resources (orders, customers, shipping, inventory, promotions), offers to products, variants, prices, and line items, order groups to carts and orders, and attributes to Medusa's native product options.
133
-
134
- ### Workflows
135
-
136
- Workflows orchestrate multi-step operations that span multiple modules. They support compensation (automatic rollback on failure) and hooks (extension points for custom logic). The most significant workflow is `completeCartWithSplitOrdersWorkflow`, which handles the entire checkout process — validating items, splitting by seller, creating orders, allocating payments, and calculating commissions.
137
-
138
- ### Subscribers and events
139
-
140
- Subscribers listen for events emitted by workflows and trigger asynchronous side effects — sending notifications, updating external systems, or processing webhooks. This keeps the core workflows focused on their primary job while allowing the system to react to changes.
141
-
142
- ## How data flows
219
+ ## Distribution: blocks you own
143
220
 
144
- A typical customer purchase flows through the system like this:
221
+ Mercur ships features as blocks, not as an opaque dependency. The CLI copies
222
+ source code directly into your project, so a block is a self-contained piece of
223
+ functionality: a module, a workflow, an API route, or a UI extension.
145
224
 
146
- 1. **Customer adds items** from multiple sellers to their cart (Store API)
147
- 2. **Cart completion** triggers the split order workflow (Marketplace Layer)
148
- 3. Items are **grouped by seller**, and a separate order is created for each (Commerce + Marketplace Layer)
149
- 4. **Commission lines** are calculated for each order based on matching rates (Commission Module)
150
- 5. **Payment is split** proportionally across seller orders (Commerce Layer)
151
- 6. Each seller's order is **credited to their payout account** after commission deduction (Payout Module)
152
- 7. **Events are emitted** — triggering notifications, webhook calls, and other side effects (Subscribers)
153
- 8. Sellers **manage their orders** through the Vendor Portal (Vendor API)
154
- 9. The admin **monitors everything** through the Admin Panel (Admin API)
225
+ This is what code ownership means in practice.
155
226
 
156
- ## Block-based distribution
227
+ - **You own every line** of code in your project.
228
+ - **You can modify any block** to fit your business requirements.
229
+ - **There are no hidden abstractions** or version conflicts.
230
+ - **Updates are explicit.** You diff against the registry and apply the changes you want.
157
231
 
158
- Mercur uses a **block-based architecture** for distribution. Instead of installing an opaque package, the CLI copies source code directly into your project. Each block is a self-contained piece of functionality — a module, a workflow, an API route, or a UI extension.
159
-
160
- This means:
161
- - You own every line of code in your project
162
- - You can modify any block to fit your business requirements
163
- - There are no hidden abstractions or version conflicts
164
- - Updates are explicit — you diff and apply changes from the registry
165
-
166
- The CLI (`@mercurjs/cli@latest`) manages this process: scaffolding projects, installing blocks, searching the registry, and comparing local changes against upstream versions.
232
+ The CLI (`@mercurjs/cli@latest`) scaffolds projects, installs blocks, searches the
233
+ registry, and compares local changes against upstream.
167
234
 
168
235
  ## Workflow example
169
236
 
170
- Here is a simplified example of how a Mercur workflow is structured. Workflows coordinate multi-step operations with automatic rollback on failure:
237
+ Workflows coordinate multi-step operations with automatic rollback on failure.
238
+ Here is a simplified example.
171
239
 
172
240
  ```typescript
173
241
  import {
@@ -197,7 +265,7 @@ const createProductForSellerWorkflow = createWorkflow(
197
265
  (input: { seller_id: string }) => {
198
266
  const seller = validateSellerStep({ seller_id: input.seller_id })
199
267
 
200
- // Additional steps: create product, link to seller, etc.
268
+ // Additional steps: create product, link to seller, and so on.
201
269
 
202
270
  return new WorkflowResponse({ seller })
203
271
  }
@@ -206,10 +274,27 @@ const createProductForSellerWorkflow = createWorkflow(
206
274
 
207
275
  ## Design principles
208
276
 
209
- **Modular over monolithic** Each marketplace feature is a separate module that can be installed, modified, or replaced independently. You don't need to use all of Mercur to benefit from it.
210
-
211
- **Explicit over implicit** Relationships between modules are defined through links, not hidden in service code. Workflows make multi-step operations visible and debuggable. API routes are file-based and predictable.
212
-
213
- **Extensible over configurable** Rather than exposing hundreds of configuration options, Mercur provides extension points. Workflows have hooks. Providers are pluggable. Models can be extended through Medusa's framework. When configuration isn't enough, you modify the source code directly.
214
-
215
- **Commerce-aware** Mercur doesn't reinvent commerce. It delegates products, pricing, orders, payments, and fulfillment to Medusa, and focuses exclusively on the marketplace logic that multi-vendor systems need.
277
+ These principles explain why the architecture looks the way it does.
278
+
279
+ - **Enterprise is the noun, composable is the how.** Mercur is a marketplace platform first. Composability, open source, and AI-nativeness are how it becomes a better enterprise choice than a closed platform, not a step down from one.
280
+ - **Modular over monolithic.** Each marketplace feature is a separate module you can install, modify, or replace on its own. You do not need all of Mercur to benefit from it.
281
+ - **Explicit over implicit.** Relationships are declared through links, not buried in service code. Workflows make multi-step operations visible and debuggable. API routes are file-based and predictable.
282
+ - **Extensible over configurable.** Instead of hundreds of config flags, Mercur gives you extension points. Workflows have hooks, providers are pluggable, and models extend through Medusa. When configuration is not enough, you change the source you own.
283
+ - **Commerce-aware.** Mercur does not reinvent commerce. It delegates products, pricing, orders, payments, and fulfillment to Medusa and focuses on the marketplace logic that multi-vendor systems need.
284
+
285
+ ## Next steps
286
+
287
+ <CardGroup cols={2}>
288
+ <Card title="Platform modules" href="/platform/store/overview">
289
+ Data models, workflows, and events for each marketplace domain.
290
+ </Card>
291
+ <Card title="Blocks" href="/learn/blocks">
292
+ How features ship as source code you own, not an opaque dependency.
293
+ </Card>
294
+ <Card title="API reference" href="/references/api/conventions">
295
+ Authentication, seller scoping, and the Admin, Vendor, and Store APIs.
296
+ </Card>
297
+ <Card title="Panel extensions" href="/references/panel-extensions/overview">
298
+ Extend the admin and vendor panels without forking them.
299
+ </Card>
300
+ </CardGroup>