@mercurjs/docs 2.2.1 → 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
@@ -1,71 +1,176 @@
1
1
  ---
2
- title: "Introduction"
3
- description: "Mercur is an open-source marketplace platform built on MedusaJS with a block-based architecture."
2
+ title: "Overview"
3
+ description: "Set up Mercur, tour the operator and seller panels, and see how a multi-vendor order flows."
4
4
  ---
5
5
 
6
- Mercur is an open-core **marketplace platform** built on top of the [Medusa Framework](https://medusajs.com). It follows a block-based architecture — install only the modules, workflows, API routes, and UI extensions you need directly into your project. No black-box dependencies, full code ownership.
7
-
8
6
  ## What is Mercur
9
7
 
10
- Medusa provides the underlying commerce engine — products, pricing, carts, orders, fulfillment, and events — while Mercur builds the marketplace domain layer on top of it.
11
-
12
- On top of Medusa's core, Mercur introduces marketplace entities and workflows such as sellers, onboarding, product requests, commissions, reviews, return escalations, order splitting, vendor payouts, and dedicated Admin, Vendor, and Storefront APIs.
13
-
14
- It comes with three optional interfaces:
15
-
16
- - an **Admin Panel** for marketplace operators
17
- - a **Vendor Portal** for seller teams
18
- - a **Storefront** ready for marketplace scenarios
19
-
20
- ## Why Mercur
21
-
22
- ### Built on a modern stack
23
-
24
- Mercur runs on a modern TypeScript backend powered by the Medusa framework, giving you a proven foundation for products, carts, orders, promotions, and payments. It integrates with technologies like Resend (notifications), Algolia (search), and Stripe Connect (payouts) — all replaceable when needed.
25
-
26
- ### Block-based architecture
27
-
28
- Unlike traditional plugins, Mercur uses a **block-based** approach. Blocks are copied directly into your project via the CLI, giving you full ownership and the ability to modify any piece of code without forking.
29
-
30
- ### Full extensibility and ownership
31
-
32
- Mercur 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.
33
-
34
- ## Building with AI
35
-
36
- 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.
37
-
38
- ### How AI works with Mercur
39
-
40
- 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.
8
+ Mercur is the open-source enterprise marketplace platform built on Medusa. Medusa
9
+ provides the commerce engine (products, pricing, carts, orders, fulfillment, and
10
+ payments), and Mercur adds the marketplace layer on top: sellers and their teams,
11
+ onboarding, the catalog change pipeline, commissions, order splitting, and vendor
12
+ payouts.
41
13
 
42
- Here's what that looks like in practice:
14
+ It gives a marketplace operator real governance: role-based access control, an
15
+ auditable change pipeline, and per-seller settlement, while staying composable,
16
+ API-first, and fully code-owned. You run it on your own infrastructure.
43
17
 
44
- - **Adding features via CLI** — An AI agent can run `bunx @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.
45
- - **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.
46
- - **Generating typed integrations** — AI reads the generated route types from `bunx @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.
47
- - **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.
48
- - **Modifying blocks it can diff** — AI can compare local code against the registry with `bunx @mercurjs/cli@latest diff`, understand what changed, and make targeted modifications instead of blind overwrites.
18
+ ## Requirements
49
19
 
50
- ### Connect your AI tools
20
+ - [Node.js v20+](https://nodejs.org/en/download) (LTS)
21
+ - [Bun v1.3+](https://bun.sh) (recommended package manager)
22
+ - [Git](https://git-scm.com/downloads)
23
+ - PostgreSQL v14+
51
24
 
52
- To start building with AI, connect your environment to Mercur's knowledge base:
25
+ <Tip>
26
+ The quickest way to run PostgreSQL locally is with Docker:
53
27
 
54
- - **[Building with AI](/rc/resources/ai/overview)** — How Mercur bundles version-matched docs into your project so agents build from accurate APIs, not stale training data
55
- - **[LLMs](/rc/resources/ai/llms)** Feed the full Mercur documentation to any LLM via `llms.txt`
56
- - **[MCP Server](/rc/resources/ai/mcp)** — Let your AI tool search Mercur docs in real time (Cursor, VS Code, Claude, Claude Code)
28
+ ```bash
29
+ docker run -d --name mercur-postgres \
30
+ -e POSTGRES_PASSWORD=postgres \
31
+ -p 5432:5432 postgres:16
32
+ ```
33
+ </Tip>
57
34
 
58
- ### Why this matters
35
+ ## Create a project
59
36
 
60
- 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.
37
+ Create a new project with the CLI. It downloads a template, installs
38
+ dependencies, creates and migrates the database, seeds data, and starts the dev
39
+ server.
61
40
 
62
- Mercur solves this with:
41
+ ```bash
42
+ bun create mercur-app@latest
43
+ ```
63
44
 
64
- - **Typed API Client** API specifications shared between server and client. AI reads real types, not documentation that may be outdated.
65
- - **Block Registry** — Features are discrete, well-defined units. AI can inspect what a block contains before installing it and verify the result after.
66
- - **Monorepo** — Backend, admin, vendor, and shared packages live in one workspace. AI has full context without jumping between repositories.
67
- - **Core Workflows** — Cart, orders, pricing, and vendor logic are exposed as structured steps. AI extends them through hooks rather than patching source code.
68
- - **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.
69
- - **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.
45
+ The CLI prompts for a project name and a template (`basic` or `plugin`), then
46
+ handles the rest. Useful flags:
70
47
 
71
- 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.
48
+ | Flag | Description |
49
+ | --- | --- |
50
+ | `--template <template>` | Template to use (`basic` or `plugin`) |
51
+ | `--db-connection-string <string>` | Full PostgreSQL connection string |
52
+ | `--no-deps` | Skip dependency installation |
53
+ | `--skip-db` | Skip database setup |
54
+
55
+ ## Open your marketplace
56
+
57
+ Once the dev server is running, the surfaces are available at:
58
+
59
+ | Surface | URL |
60
+ | --- | --- |
61
+ | API | `http://localhost:9000` |
62
+ | Admin Panel | `http://localhost:9000/dashboard` |
63
+ | Vendor Panel | `http://localhost:9000/seller` |
64
+
65
+ You don't need to create any accounts to start. When the CLI finishes, it opens
66
+ the admin invite page at `http://localhost:9000/dashboard/invite` with a token
67
+ already filled in for `admin@mercur-test.com`. Set a password there and you are
68
+ signed in as the operator.
69
+
70
+ The seed also creates three approved demo sellers, so you can sign in to the
71
+ Vendor Panel right away. There is no registration or approval step to go through.
72
+
73
+ | Seller | Email | Password |
74
+ | --- | --- | --- |
75
+ | Sole Society | `seller@mercur.dev` | `supersecret` |
76
+ | Kickz Corner | `kickz@mercur.dev` | `supersecret` |
77
+ | Trailhead Outfitters | `trailhead@mercur.dev` | `supersecret` |
78
+
79
+ To add a brand-new store instead, open the Vendor Panel and register at
80
+ `http://localhost:9000/seller/register`, then complete the onboarding wizard. The
81
+ new seller appears in the Admin Panel's approval queue.
82
+
83
+ Restart the dev server any time from your project directory:
84
+
85
+ ```bash
86
+ cd <your-project-name>
87
+ bun dev
88
+ ```
89
+
90
+ <img src="/images/admin-orders-order-groups.png" alt="Admin Panel Orders list showing order groups, each spanning one or more stores" />
91
+
92
+ ## Tour the platform
93
+
94
+ A Mercur project ships three role-based surfaces, one per audience. Each is backed
95
+ by the same marketplace modules and governed by role-based access.
96
+
97
+ ### Admin Panel
98
+
99
+ The operator dashboard at `/dashboard`. This is where you run the marketplace.
100
+
101
+ - **Govern sellers:** approve, suspend, or terminate stores, and manage their members and roles.
102
+ - **Review catalog changes:** every seller edit lands in an approval queue as an attributed, immutable change you confirm or decline.
103
+ - **Set the economics:** configure commission rules across products, categories, and sellers.
104
+ - **Watch the money:** see orders across every seller and monitor payouts marketplace-wide.
105
+
106
+ <video
107
+ autoPlay
108
+ muted
109
+ loop
110
+ playsInline
111
+ controls
112
+ className="w-full aspect-video"
113
+ src="/images/platform-walkthrough.mp4"
114
+ />
115
+
116
+ ### Vendor Panel
117
+
118
+ The seller portal at `/seller`, scoped so a seller only ever sees its own store.
119
+
120
+ - **List products:** create offers against the shared catalog with a seller's own SKU, price, inventory, and shipping.
121
+ - **Fulfill orders:** view, fulfill, and refund orders, and handle returns.
122
+ - **Get paid:** complete provider onboarding and track payouts.
123
+ - **Run a team:** invite members and assign roles.
124
+
125
+ <video
126
+ autoPlay
127
+ muted
128
+ loop
129
+ playsInline
130
+ controls
131
+ className="w-full aspect-video"
132
+ src="/images/seller-walkthrough.mp4"
133
+ />
134
+
135
+ ### Store API
136
+
137
+ The storefront API under `/store/*` that your customer-facing frontend talks to.
138
+ It exposes marketplace discovery (sellers and offers) and a cart that can span
139
+ multiple sellers, then splits it into per-seller orders at checkout.
140
+
141
+ ## How a multi-vendor order flows
142
+
143
+ The clearest way to see what the platform does is to follow one order from cart to
144
+ payout. A single customer cart can hold items from several sellers.
145
+
146
+ <Steps>
147
+ <Step title="One cart, many sellers">
148
+ A customer adds offers from different sellers to a single cart through the Store API.
149
+ </Step>
150
+ <Step title="Checkout splits the cart">
151
+ Completing the cart runs the split-order workflow. Items are grouped by seller, and a separate order is created for each, all linked under one order group with a shared display id.
152
+ </Step>
153
+ <Step title="Commissions are calculated">
154
+ For each order, Mercur resolves the matching commission rule and records the commission lines. All arithmetic uses arbitrary precision, so totals stay exact.
155
+ </Step>
156
+ <Step title="Each seller is settled">
157
+ Payment is split across the per-seller orders, and each seller's earnings settle to their connected account through the payout provider, minus commission.
158
+ </Step>
159
+ </Steps>
160
+
161
+ The operator sees the whole order group; each seller sees only its slice. Every
162
+ step is governed by the same roles and recorded for audit.
163
+
164
+ ## Next steps
165
+
166
+ <CardGroup cols={2}>
167
+ <Card title="Architecture" icon="sitemap" href="/learn/architecture">
168
+ How Mercur layers the marketplace domain on Medusa.
169
+ </Card>
170
+ <Card title="Platform" icon="cubes" href="/platform/store/overview">
171
+ Every marketplace capability, with its data models and workflows.
172
+ </Card>
173
+ <Card title="Build with AI" icon="robot" href="/resources/ai/overview">
174
+ Bundled docs, agent skills, and the MCP server.
175
+ </Card>
176
+ </CardGroup>
@@ -0,0 +1,187 @@
1
+ ---
2
+ title: "Migration to 2.0"
3
+ sidebarTitle: "Migration to 2.0"
4
+ description: "Port an existing Mercur 1.x project to 2.x, the latest release."
5
+ ---
6
+
7
+ > A step-by-step guide to porting an existing Mercur 1.x project to 2.x, the latest release.
8
+
9
+ Mercur 2.0 replaces the monolithic plugin architecture (`@mercurjs/b2c-core`) with a block-based model (`@mercurjs/core` plus registry blocks). This guide is about porting your existing 1.x code to a 2.x project. For setting up a fresh project instead, see [Installation](/learn/introduction), which already uses the latest names.
10
+
11
+ ## Before you start
12
+
13
+ Most users do not need to migrate much. Core and the official registry blocks cover most standard marketplace functionality, and the admin and vendor panels ship 34+ pages out of the box. You only need to port your own custom modules, workflows, routes, and any domain-specific dashboard pages that core does not already provide.
14
+
15
+ Here is what replaced what between 1.x and 2.x:
16
+
17
+ | 1.x | 2.x |
18
+ |-----|-----|
19
+ | `@mercurjs/b2c-core` (monolithic) | `@mercurjs/core`, all core modules built in |
20
+ | `@mercurjs/commission` (separate) | Built into core |
21
+ | `@mercurjs/algolia`, reviews, requests | Registry blocks (`mercurjs add ...`) |
22
+ | `@medusajs/admin-vite-plugin` | `@mercurjs/dashboard-sdk` (virtual modules) |
23
+ | `@medusajs/js-sdk` (manual hooks) | `@mercurjs/client` (generated typed client) |
24
+ | Custom admin and vendor pages | `@mercurjs/admin` and `@mercurjs/vendor`, complete panels out of the box |
25
+ | `apps/backend/` | `packages/api/` |
26
+ | `src/routes/` (admin) | `src/pages/` (file-based routing) |
27
+ | Yarn plus Turbo | bun (recommended) |
28
+
29
+ The MedusaJS v2 foundation (modules, workflows, links, subscribers, API routes), the data model patterns (MikroORM, service layer), and your environment variables (`DATABASE_URL`, CORS, secrets) are all unchanged.
30
+
31
+ <Note>
32
+ **Using a version older than 1.4.0?** Your admin panel code lives inside the backend repo, not a separate app. When scanning for custom admin code to port, look there instead of `apps/admin/`. Everything else in this guide applies identically.
33
+ </Note>
34
+
35
+ ## Step 1: Start from a fresh 2.x project
36
+
37
+ Set up a working 2.x project first (see [Installation](/learn/introduction)), then port your 1.x code into it. Do not upgrade the old project in place.
38
+
39
+ ## Step 2: Map your packages
40
+
41
+ Replace 1.x packages with their 2.x equivalents:
42
+
43
+ | 1.x package | 2.x equivalent |
44
+ |-------------|----------------|
45
+ | `@mercurjs/b2c-core` | `@mercurjs/core` |
46
+ | `@mercurjs/commission` | Built into core |
47
+ | `@mercurjs/algolia` | Block: `mercurjs add algolia` |
48
+ | `@mercurjs/resend` | No 2.x equivalent, port manually |
49
+ | `@mercurjs/payment-stripe-connect` | No 2.x equivalent, port manually |
50
+ | `@mercurjs/stripe-tax-provider` | No 2.x equivalent, port manually |
51
+ | `@medusajs/admin-vite-plugin` | `@mercurjs/dashboard-sdk` |
52
+ | `@medusajs/js-sdk` | `@mercurjs/client` |
53
+
54
+ Several features that were separate packages in 1.x are now installed as registry blocks. Install these instead of porting their 1.x package code:
55
+
56
+ `reviews`, `requests`, `wishlist`, `team-management`, `algolia`, `vendor-notifications`, `vendor-chat`, `product-import-export`.
57
+
58
+ The `seller`, `payout`, and `commission` modules are built into core, so there is nothing to port for those.
59
+
60
+ ## Step 3: Map your directories
61
+
62
+ | 1.x | 2.x |
63
+ |-----|-----|
64
+ | `apps/backend/src/*` | `packages/api/src/*` |
65
+ | `apps/admin/src/routes/` | `apps/admin/src/pages/` |
66
+ | `apps/vendor/src/routes/` | `apps/vendor/src/pages/` |
67
+
68
+ ## Step 4: Port custom backend code
69
+
70
+ Copy each kind of custom code into `packages/api/src/` and update imports from `@mercurjs/b2c-core` to `@mercurjs/core`.
71
+
72
+ - **Modules**: copy to `packages/api/src/modules/` and register them in `medusa-config.ts`.
73
+ - **Workflows**: copy to `packages/api/src/workflows/<entity>/`. Do not create barrel `index.ts` files, as they conflict with block installation.
74
+ - **API routes**: copy to `packages/api/src/api/`. Type both generics so codegen can read them, then run `bunx @mercurjs/cli@latest codegen`.
75
+
76
+ ```typescript
77
+ export const GET = async (
78
+ req: AuthenticatedMedusaRequest<BodyType>,
79
+ res: MedusaResponse<ResponseType>
80
+ ) => { ... }
81
+ ```
82
+
83
+ - **Links and subscribers**: copy to `packages/api/src/links/` and `src/subscribers/`. Do not duplicate links that core already provides (seller to product, seller to order, and so on).
84
+ - **Custom providers**: copy to `packages/api/src/providers/`, then make two required changes:
85
+
86
+ ```typescript
87
+ // medusa-config.ts must use the ./src/ prefix
88
+ resolve: './src/providers/my-provider'
89
+
90
+ // provider index.ts must import from framework/utils
91
+ import { Modules, ModuleProvider } from "@medusajs/framework/utils"
92
+ ```
93
+
94
+ ## Step 5: Port custom dashboard code
95
+
96
+ Only needed if you have custom pages that core admin and vendor do not cover. Update imports and move pages from `src/routes/` to `src/pages/` with a `export default`.
97
+
98
+ | Old import | New import |
99
+ |-----------|------------|
100
+ | `@medusajs/js-sdk` | `@mercurjs/client` |
101
+ | `@custom-types/*` | `@mercurjs/types` |
102
+ | `@hooks/*`, `@components/*`, `@lib/*` | Keep local, or `@mercurjs/dashboard-shared` if the symbol exists there |
103
+
104
+ ## Step 6: Rename Order Set to Order Group
105
+
106
+ The 1.x `OrderSet` entity is renamed to `OrderGroup` in 2.x. This is a breaking change that affects database tables, API endpoints, workflow names, event names, and types.
107
+
108
+ | Aspect | 1.x | 2.x |
109
+ |--------|-----|-----|
110
+ | Entity and table | `order_set` | `order_group` |
111
+ | ID prefix | `os_` | `og_` |
112
+ | API endpoints | `/admin/order-sets`, `/store/order-set` | `/admin/order-groups`, `/store/order-groups` |
113
+ | Workflows | `getFormattedOrderSetListWorkflow` | `getOrderGroupsListWorkflow`, `getOrderGroupDetailWorkflow` |
114
+ | Events | `OrderSetWorkflowEvents` | `OrderGroupWorkflowEvents` |
115
+ | Types | `OrderSetDTO` | `OrderGroupDTO` (from `@mercurjs/types`) |
116
+
117
+ Two fields were removed from the group:
118
+
119
+ - **`payment_collection_id`**: payment collections are now linked at the individual order level. Query the linked orders to get the payment collection.
120
+ - **`sales_channel_id`**: the sales channel is stored on each individual order.
121
+
122
+ Two fields are now computed at query time rather than stored: **`seller_count`** (distinct sellers across linked orders) and **`total`** (sum of order totals).
123
+
124
+ To migrate:
125
+
126
+ 1. Update imports: `OrderSetDTO` to `OrderGroupDTO` (from `@mercurjs/types`).
127
+ 2. Update API calls: `/order-sets` to `/order-groups`.
128
+ 3. Update workflow references: `getFormattedOrderSetListWorkflow` to `getOrderGroupsListWorkflow`.
129
+ 4. Update event listeners: `OrderSetWorkflowEvents` to `OrderGroupWorkflowEvents`.
130
+ 5. If you read `payment_collection_id` or `sales_channel_id` from the order set, read them from the individual orders instead (via the `order_group_order` link).
131
+
132
+ See [Order Group](/platform/order-group/overview) for the full 2.x data model and API reference.
133
+
134
+ ## Step 7: Upgrade to the latest release
135
+
136
+ After 2.0, the Medusa plugin was renamed from `@mercurjs/core-plugin` to `@mercurjs/core`. The package contents are the same. If you started from a current 2.x install, you are already on the new name and can skip this step.
137
+
138
+ ### Swap the dependency
139
+
140
+ ```bash
141
+ bun remove @mercurjs/core-plugin
142
+ bun add @mercurjs/core
143
+ ```
144
+
145
+ ### Replace the name in config and source
146
+
147
+ In `packages/api/medusa-config.ts` and anywhere under `packages/api/src/**`, replace every occurrence of `@mercurjs/core-plugin` with `@mercurjs/core`. A repo-wide find-and-replace is safe. This applies to `resolve` values and imports alike:
148
+
149
+ ```ts
150
+ // before
151
+ resolve: "@mercurjs/core-plugin/modules/seller"
152
+ import { createSellerWorkflow } from "@mercurjs/core-plugin/workflows"
153
+
154
+ // after
155
+ resolve: "@mercurjs/core/modules/seller"
156
+ import { createSellerWorkflow } from "@mercurjs/core/workflows"
157
+ ```
158
+
159
+ The same applies to `@mercurjs/core-plugin/modules/<module>`, `/workflows`, `/links`, and `/api`. Installed registry blocks live under `packages/api/src/`, so the same find-and-replace covers them.
160
+
161
+ ### Reinstall, migrate, and rebuild
162
+
163
+ ```bash
164
+ bun install
165
+ bun run medusa db:migrate
166
+ bun run build
167
+ ```
168
+
169
+ The database migrations are non-destructive. If TypeScript still reports `@mercurjs/core-plugin`, you missed an import: re-run the find-and-replace.
170
+
171
+ ## Known limitations
172
+
173
+ These areas do not currently have full 1.x parity and require manual migration for now:
174
+
175
+ - **`TaxCode`**: no 2.x equivalent today. Port the old logic manually if your project depends on it.
176
+ - **`SecondaryCategory`**: no 2.x equivalent, and none is planned. Port the old logic manually if your project depends on it.
177
+
178
+ ## Next steps
179
+
180
+ <CardGroup cols={2}>
181
+ <Card title="Installation" href="/learn/introduction">
182
+ Set up a fresh 2.x project to port your code into.
183
+ </Card>
184
+ <Card title="Order Group" href="/platform/order-group/overview">
185
+ The full 2.x data model that replaced Order Set.
186
+ </Card>
187
+ </CardGroup>
@@ -0,0 +1,91 @@
1
+ ---
2
+ title: "Why Mercur"
3
+ description: "Why teams choose Mercur to run an enterprise marketplace: governance, ownership, and composability without a closed platform."
4
+ ---
5
+
6
+ The enterprise marketplace platform for teams that need governance, ownership, and
7
+ control, not a closed SaaS.
8
+
9
+ Mercur runs a multi-vendor marketplace on infrastructure you own. It gives an
10
+ operator the governance a marketplace needs (role-based access, an auditable
11
+ change pipeline, and per-seller settlement) while staying composable, API-first,
12
+ and AI-native. You get the control of an enterprise platform without the closed
13
+ code or a commission on gross merchandise value.
14
+
15
+ ## Governance, built in
16
+
17
+ A marketplace operator has to control who sells, what they change, and how money
18
+ moves. Mercur builds that into the platform instead of bolting it on.
19
+
20
+ - **Role-based access control:** members belong to stores with roles resolved per store, and every vendor request is scoped to its own seller. Access to one store never leaks into another.
21
+ - **Auditable change pipeline:** every catalog edit is an immutable, attributed change with an approval queue, so you always know who changed what and who approved it.
22
+ - **Per-seller settlement:** policy-based commissions, order splitting, and provider-driven payouts settle each seller independently and to the cent.
23
+
24
+ ## You own the platform
25
+
26
+ - **Own the code:** blocks ship as source you copy into your project. There are no black-box dependencies, and you can modify any line.
27
+ - **Own the deployment:** self-host on your own cloud, on-premise, or a private network, with no hosted vendor in the request path.
28
+ - **No lock-in:** Mercur is MIT-licensed, with no transaction fees and no commission on gross merchandise value.
29
+
30
+ ## Composable, not monolithic
31
+
32
+ Closed platforms give you a fixed feature set behind a console. Mercur gives you
33
+ primitives.
34
+
35
+ - Install only the modules, workflows, and UI extensions you need.
36
+ - Extend core flows through hooks and the typed client, not by patching source.
37
+ - Replace any layer, such as search, notifications, or payouts, with your own.
38
+
39
+ Composable is not a step down from enterprise. It is how you make the platform fit
40
+ your business instead of the other way around.
41
+
42
+ ## AI-native, enterprise-governed
43
+
44
+ Mercur is built so AI agents extend your marketplace within guardrails. Typed
45
+ contracts, build gates, and version-matched docs mean an agent's change is correct
46
+ by construction or it fails to compile. Agents work inside the same roles and
47
+ review pipeline as people. They extend the platform, they do not bypass its
48
+ governance.
49
+
50
+ ## Built on Medusa
51
+
52
+ Mercur runs on the Medusa commerce engine, so products, pricing, carts, orders,
53
+ and payments are proven, maintained infrastructure. You inherit Medusa's maturity
54
+ and extension model, and Mercur adds only the marketplace layer on top.
55
+
56
+ ## Mercur vs closed marketplace platforms
57
+
58
+ Closed platforms such as Mirakl, VTEX, or Spryker deliver marketplace governance,
59
+ but behind proprietary code, a fixed runtime, and a commission on your GMV. Mercur
60
+ gives you the same operator governance with the opposite trade-offs.
61
+
62
+ | | Closed platform | Mercur |
63
+ | --- | --- | --- |
64
+ | Code | Proprietary and opaque | Open source, you own it |
65
+ | Hosting | Vendor-hosted | Self-hosted on your infrastructure |
66
+ | Extensibility | Configuration only | Composable modules and workflows |
67
+ | AI | Not agent-native | AI-native and governed |
68
+ | Pricing | Commission on GMV | No GMV fees, MIT-licensed |
69
+
70
+ ## Who it's for
71
+
72
+ Mercur fits teams that need to run a real multi-vendor marketplace with operator
73
+ governance, but want to own the code and the infrastructure rather than rent a
74
+ closed platform.
75
+
76
+ ## Next steps
77
+
78
+ <CardGroup cols={2}>
79
+ <Card title="Overview" icon="rocket" href="/learn/introduction">
80
+ Set up Mercur and run a marketplace locally.
81
+ </Card>
82
+ <Card title="Architecture" icon="sitemap" href="/learn/architecture">
83
+ How Mercur layers the marketplace domain on Medusa.
84
+ </Card>
85
+ <Card title="Platform" icon="cubes" href="/platform/store/overview">
86
+ Every marketplace capability, with its data models and workflows.
87
+ </Card>
88
+ <Card title="Build with AI" icon="robot" href="/resources/ai/overview">
89
+ Bundled docs, agent skills, and the MCP server.
90
+ </Card>
91
+ </CardGroup>
@@ -0,0 +1,59 @@
1
+ ---
2
+ title: "Attribute types"
3
+ sidebarTitle: "Attribute types"
4
+ description: "The five attribute types and the values they hold."
5
+ ---
6
+
7
+ In this document, you'll learn about the attribute record, its five types, and
8
+ the values attached to it.
9
+
10
+ ## Product attribute
11
+
12
+ An attribute is a typed field in the shared catalog, represented by the
13
+ `ProductAttribute` data model (table `product_attribute`, id prefix `pattr`).
14
+ Each attribute carries a `name`, an optional `handle`, a `rank` for ordering, and
15
+ a `type` that decides how its values are validated and rendered.
16
+
17
+ ```ts
18
+ const { result } = await createProductAttributesWorkflow(container).run({
19
+ input: {
20
+ attributes: [
21
+ {
22
+ name: "Material",
23
+ type: "single_select",
24
+ values: [{ name: "Cotton" }, { name: "Wool" }],
25
+ },
26
+ ],
27
+ },
28
+ })
29
+ ```
30
+
31
+ The `type` field is one of the `AttributeType` enum values:
32
+
33
+ | Type | Value | Holds |
34
+ | --- | --- | --- |
35
+ | Single select | `single_select` | One choice from a fixed list of values |
36
+ | Multi select | `multi_select` | Several choices from a fixed list of values |
37
+ | Text | `text` | A free-form string |
38
+ | Unit | `unit` | A numeric measurement (e.g. weight, capacity) |
39
+ | Toggle | `toggle` | A boolean, backed by seeded `true` / `false` values |
40
+
41
+ ## Product attribute value
42
+
43
+ The choices for select-style attributes are `ProductAttributeValue` records
44
+ (table `product_attribute_value`, id prefix `pattrval`). Each value belongs to
45
+ one attribute (`attribute_id`), has its own `name`, `handle`, and `rank`, and is
46
+ deleted along with its parent attribute.
47
+
48
+ <Note>
49
+ `single_select` and `multi_select` attributes hold a list of predefined
50
+ `ProductAttributeValue` records. `text` and `unit` create a value on the fly
51
+ from the entered content when attached to a product. `toggle` is seeded with
52
+ its `true` / `false` values and never creates new ones.
53
+ </Note>
54
+
55
+ <Tip>
56
+ Use `is_required` to enforce that a product must carry a value for the
57
+ attribute, and `is_active` to retire an attribute from new use without deleting
58
+ its history.
59
+ </Tip>
@@ -0,0 +1,50 @@
1
+ ---
2
+ title: "Global vs inline & filtering"
3
+ sidebarTitle: "Global vs inline"
4
+ description: "Catalog-wide attributes, product-scoped attributes, and storefront filtering."
5
+ ---
6
+
7
+ In this document, you'll learn the difference between global and inline
8
+ attributes and how an attribute becomes a storefront filter.
9
+
10
+ ## Scope
11
+
12
+ Every `ProductAttribute` is either **global** or **inline**, decided by its
13
+ `product_id` field:
14
+
15
+ | Scope | `product_id` | Meaning |
16
+ | --- | --- | --- |
17
+ | Global | `null` | A catalog entry, reusable across any product, listed in the operator's attribute catalog |
18
+ | Inline | set | A one-off attribute scoped to a single product, created from that product's form and hidden from the global catalog |
19
+
20
+ ```ts
21
+ // Global: reusable across the catalog
22
+ { name: "Material", type: "single_select", values: [{ name: "Cotton" }] }
23
+
24
+ // Inline: scoped to one product, created as it's attached
25
+ { title: "Gift wrap", type: "toggle", product_id: "prod_123" }
26
+ ```
27
+
28
+ A global attribute is defined once and attached to many products. An inline
29
+ attribute is created in the same step it is attached and only ever describes that
30
+ one product. It is useful for the occasional one-off field that doesn't belong in
31
+ the shared vocabulary.
32
+
33
+ <Note>
34
+ Attributes describe products in the **shared master catalog**. They are never
35
+ owned by a store. A seller sells against a master product through an offer, and
36
+ the product's attributes come from the catalog, not from the seller.
37
+ </Note>
38
+
39
+ ## Filtering
40
+
41
+ An attribute with `is_filterable` set to `true` is exposed as a storefront
42
+ filter, letting shoppers narrow the catalog by its values. Leave it `false` for
43
+ descriptive-only attributes that shouldn't appear as facets.
44
+
45
+ <Tip>
46
+ Filtering pairs naturally with variant axes: a filterable `multi_select` axis
47
+ like Color both generates variants and lets shoppers filter by them. A
48
+ descriptive `text` attribute like Care instructions is usually left
49
+ non-filterable.
50
+ </Tip>