@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
@@ -3,37 +3,37 @@ title: "Custom Fields"
3
3
  description: "Extend any Medusa entity with additional fields without modifying core code."
4
4
  ---
5
5
 
6
- Custom Fields let you attach extra data to any existing Medusa entity products, customers, orders, and more — through configuration alone. No migrations to write, no models to define. The module handles table creation and schema updates automatically when you run `db:migrate`.
6
+ Custom Fields let you attach extra data to any existing Medusa entity, such as products, customers, and orders, through configuration alone. No migrations to write, no models to define. The module handles table creation and schema updates automatically when you run `db:migrate`.
7
7
 
8
8
  <Info>
9
- **Where this sits in the stack.** Custom Fields is a Mercur module (`@mercurjs/core/modules/custom-fields`) layered on top of Medusa's standard module-link system it generates the side table, the link, and the schema for you. It's the lightest way to add data to an entity.
9
+ **Where this sits in the stack.** Custom Fields is a Mercur module (`@mercurjs/core/modules/custom-fields`) layered on top of Medusa's standard module-link system. It generates the side table, the link, and the schema for you. It's the lightest way to add data to an entity.
10
10
  </Info>
11
11
 
12
12
  <Note>
13
- **This is the *data* layer not the panel UI.** This module *stores* extra data. The panel-side `defineCustomFieldsConfig` helper (see [Extend forms and tables](/rc/resources/tutorials/extend-forms-and-tables)) *renders* fields into the built-in forms, sections, and tables. They share a name but solve different halves of the problem: use this module for storage and queryability, and the panel helper to expose the values to admins and vendors.
13
+ **This is the *data* layer, not the panel UI.** This module *stores* extra data. The panel-side `defineCustomFieldsConfig` helper (see [Extend forms and tables](/rc/resources/tutorials/extend-forms-and-tables)) *renders* fields into the built-in forms, sections, and tables. They share a name but solve different halves of the problem: use this module for storage and queryability, and the panel helper to expose the values to admins and vendors.
14
14
  </Note>
15
15
 
16
16
  ## When to use Custom Fields
17
17
 
18
18
  <Tip>
19
- **Use Custom Fields when** the data is a plain property of an existing entity it belongs to exactly one record, has no lifecycle of its own, and you mostly read it alongside its parent. Typical cases:
19
+ **Use Custom Fields when** the data is a plain property of an existing entity. It belongs to exactly one record, has no lifecycle of its own, and you mostly read it alongside its parent. Typical cases:
20
20
 
21
21
  - A `brand`, `warranty_months`, or `is_featured` flag on a product
22
22
  - A `company_name` or loyalty `tier` on a customer
23
23
  - An internal `source` or `priority` tag on an order
24
24
 
25
- You get a typed column, a default value, and queryability through `query.graph` for the cost of one config entry and a `db:migrate`.
25
+ You get a typed column, a default value, and queryability through `query.graph`, for the cost of one config entry and a `db:migrate`.
26
26
  </Tip>
27
27
 
28
28
  <Warning>
29
29
  **Build a custom Medusa module instead when** the data outgrows "extra columns":
30
30
 
31
- - It has its **own lifecycle** created, updated, and deleted independently of the parent (e.g. reviews, support tickets)
31
+ - It has its **own lifecycle**, created, updated, and deleted independently of the parent (e.g. reviews, support tickets)
32
32
  - It has **relations** to more than one entity, or many records per parent
33
- - It carries **business logic** validation rules, state transitions, workflows
33
+ - It carries **business logic**, such as validation rules, state transitions, and workflows
34
34
  - You need **its own API routes** and permissions around it
35
35
 
36
- Custom Fields is strictly one row per parent entity. Forcing a one-to-many or stateful concept into a JSON field works until it doesn't model it as a module (or check whether a [block](/rc/learn/blocks) already ships it).
36
+ Custom Fields is strictly one row per parent entity. Forcing a one-to-many or stateful concept into a JSON field works until it doesn't. Model it as a module (or check whether a [block](/rc/learn/blocks) already ships it).
37
37
  </Warning>
38
38
 
39
39
  ## How it works
@@ -77,7 +77,7 @@ The Custom Fields module creates a separate table for each entity you extend (e.
77
77
  ```
78
78
 
79
79
  <Warning>
80
- The key in `customFields` (e.g. `Product`, `Customer`) must match the entity name as registered in Medusa's joiner configuration a mismatched name fails at link resolution, not at config load, so double-check spelling and casing.
80
+ The key in `customFields` (e.g. `Product`, `Customer`) must match the entity name as registered in Medusa's joiner configuration. A mismatched name fails at link resolution, not at config load, so double-check spelling and casing.
81
81
  </Warning>
82
82
  </Step>
83
83
  <Step title="Run migrations">
@@ -121,7 +121,7 @@ The Custom Fields module creates a separate table for each entity you extend (e.
121
121
  | -------------- | ---------- | ------- | ------------------------------------------------ |
122
122
  | `nullable` | `boolean` | `true` | Whether the field can be null |
123
123
  | `defaultValue` | `any` | `null` | Default value for the field |
124
- | `enum` | `string[]` | | Required for `enum` type. List of allowed values |
124
+ | `enum` | `string[]` | None | Required for `enum` type. List of allowed values |
125
125
 
126
126
  ## Using the service directly
127
127
 
@@ -157,20 +157,20 @@ import {
157
157
  } from "@mercurjs/core/workflows";
158
158
  ```
159
159
 
160
- - **`upsertCustomFieldsStep`** Takes `{ alias, data }` where `alias` is the entity name (e.g. `"product"`) and `data` contains the entity ID and field values.
161
- - **`deleteCustomFieldsStep`** Takes `{ alias, ids }` to soft-delete custom field records by their IDs.
160
+ - **`upsertCustomFieldsStep`:** takes `{ alias, data }` where `alias` is the entity name (e.g. `"product"`) and `data` contains the entity ID and field values.
161
+ - **`deleteCustomFieldsStep`:** takes `{ alias, ids }` to soft-delete custom field records by their IDs.
162
162
 
163
163
  ## FAQ
164
164
 
165
165
  <AccordionGroup>
166
166
  <Accordion title="Can I add or change fields after the first migration?">
167
- Yes edit the `customFields` config and run `db:migrate` again; the module updates the side table's schema. Removing a field from config stops exposing it; treat destructive column changes with the same care as any schema migration.
167
+ Yes. Edit the `customFields` config and run `db:migrate` again; the module updates the side table's schema. Removing a field from config stops exposing it; treat destructive column changes with the same care as any schema migration.
168
168
  </Accordion>
169
169
  <Accordion title="How do vendors or admins edit these values from the panels?">
170
- Through your own UI: add a page or a [panel custom field](/rc/resources/customization/extending-panels#custom-fields) and call an API route that uses the service's `upsert` or compose `upsertCustomFieldsStep` into a workflow behind a [custom route](/rc/resources/tutorials/custom-api-route).
170
+ Through your own UI: add a page or a [panel custom field](/rc/resources/customization/extending-panels#custom-fields) and call an API route that uses the service's `upsert`, or compose `upsertCustomFieldsStep` into a workflow behind a [custom route](/rc/resources/tutorials/custom-api-route).
171
171
  </Accordion>
172
172
  <Accordion title="Can one entity have multiple custom-field records?">
173
- No the side table has a unique constraint on the parent ID, enforcing one-to-one. If you need many records per parent, that's a custom module, not custom fields.
173
+ No. The side table has a unique constraint on the parent ID, enforcing one-to-one. If you need many records per parent, that's a custom module, not custom fields.
174
174
  </Accordion>
175
175
  </AccordionGroup>
176
176
 
@@ -1,6 +1,7 @@
1
1
  ---
2
- title: "Extend a workflow"
3
- description: "Inject custom logic into an existing Mercur workflow through hooks — without rewriting it."
2
+ title: "How to Extend a Workflow"
3
+ sidebarTitle: "Extend a Workflow"
4
+ description: "Inject custom logic into an existing Mercur workflow through hooks, without rewriting it."
4
5
  ---
5
6
 
6
7
  <Note>
@@ -8,12 +9,14 @@ description: "Inject custom logic into an existing Mercur workflow through hooks
8
9
  </Note>
9
10
 
10
11
  <Info>
11
- **Workflows are Medusa's extension model Mercur keeps it.** Unlike the panels (where Mercur ships [its own customization framework](/rc/resources/customization/extending-panels)), backend logic follows Medusa conventions unchanged: Mercur's workflows expose hooks you inject steps into, with the same compensation/rollback semantics as any Medusa workflow. Skills learned in plain Medusa transfer here one-to-one.
12
+ **Workflows are Medusa's extension model, and Mercur keeps it.** Unlike the panels (where Mercur ships [its own customization framework](/rc/resources/customization/extending-panels)), backend logic follows Medusa conventions unchanged: Mercur's workflows expose hooks you inject steps into, with the same compensation/rollback semantics as any Medusa workflow. Skills learned in plain Medusa transfer here one-to-one.
12
13
  </Info>
13
14
 
15
+ You extend a Mercur workflow by injecting your own step into a hook it exposes, so your logic runs inside the existing flow instead of a fork of it.
16
+
14
17
  ## Why hooks
15
18
 
16
- Extend behavior without forking or rewriting the workflow.
19
+ Hooks let you add behavior without forking or rewriting the workflow.
17
20
 
18
21
  <Steps>
19
22
  <Step title="Pick the target hook">
@@ -1,47 +1,50 @@
1
1
  ---
2
- title: "Extending Panels"
3
- description: "Add pages, inject widgets, customize navigation, and extend forms and tables in the admin and vendor panels."
2
+ title: "How to Extend the Panels"
3
+ sidebarTitle: "Extend the Panels"
4
+ description: "Add pages, widgets, navigation overrides, and form and table fields to the admin and vendor panels without forking."
4
5
  ---
5
6
 
6
- Both the admin panel and vendor portal use the same SDK (`@mercurjs/dashboard-sdk`). Customization is **file-based and convention-driven** — you add pages, widgets, and field extensions by dropping files under `src/`, and configure navigation through a single file. Nothing is registered by hand; the SDK crawls your `src/` at build time and wires everything in.
7
+ Both the admin panel and the vendor portal run on the same SDK, `@mercurjs/dashboard-sdk`. You customize them by dropping files under `src/`.
8
+
9
+ Customization is file-based and convention-driven. You add pages, widgets, and field extensions by placing files under `src/`, and you shape navigation through a single file. Nothing is registered by hand. The SDK crawls your `src/` at build time and wires everything in.
7
10
 
8
11
  <Info>
9
- **Coming from Medusa?** The extension model is deliberately Medusa-shaped. The helpers you know `defineWidgetConfig`, `defineRouteConfig`, `defineCustomFieldsConfig`, `createFormHelper` all exist here, re-exported from `@mercurjs/dashboard-sdk` (without Medusa's `unstable_` prefix). What's different: Mercur ships **two** panels (admin *and* vendor) from one framework, so a file only ever targets the panel it lives in (there is no `surface` field), and widget zones carry a `before | after` placement suffix on the zone id. Everything is additive by default your contribution augments the built-in page instead of replacing it.
12
+ **Coming from Medusa?** The extension model is deliberately Medusa-shaped. The helpers you know, such as `defineWidgetConfig`, `defineRouteConfig`, `defineCustomFieldsConfig`, and `createFormHelper`, all exist here, re-exported from `@mercurjs/dashboard-sdk` (without Medusa's `unstable_` prefix). Two things differ. Mercur ships two panels (admin and vendor) from one framework, so a file only ever targets the panel it lives in (there is no `surface` field), and widget zones carry a `before | after` placement suffix on the zone id. Everything is additive by default: your contribution augments the built-in page instead of replacing it.
10
13
  </Info>
11
14
 
12
15
  ## The extension mechanisms
13
16
 
14
- Every panel customization is **additive** you augment a built-in page without owning it. One concern per file, discovered by the build-time crawl:
17
+ Every panel customization is additive. You augment a built-in page without owning it. Each file handles one concern and is discovered by the build-time crawl:
15
18
 
16
- - **Widgets** inject a React component at a named zone on a built-in page (`defineWidgetConfig`).
17
- - **Navigation** reorder, hide, relabel, or re-parent built-in sidebar items (`defineNavigationConfig`).
18
- - **Custom fields** add validated fields to built-in forms, replace/remove/add fields in detail sections, and add columns to list tables (`defineCustomFieldsConfig` + `createFormHelper`).
19
- - **Pages** add a brand-new screen with a drop-in `page.tsx` route.
19
+ - **Widgets:** inject a React component at a named zone on a built-in page (`defineWidgetConfig`).
20
+ - **Navigation:** reorder, hide, relabel, or re-parent built-in sidebar items (`defineNavigationConfig`).
21
+ - **Custom fields:** add validated fields to built-in forms, replace, remove, or add fields in detail sections, and add columns to list tables (`defineCustomFieldsConfig` plus `createFormHelper`).
22
+ - **Pages:** add a brand-new screen with a drop-in `page.tsx` route.
20
23
 
21
24
  <Note>
22
- Additive tools leave the rest of the built-in page data fetching, filters, pagination, i18n — completely intact. A widget, a nav override, or a custom field changes only the spot you target.
25
+ Additive tools leave the rest of the built-in page completely intact, including data fetching, filters, pagination, and i18n. A widget, a nav override, or a custom field changes only the spot you target.
23
26
  </Note>
24
27
 
25
- ## Choosing your extension mechanism
28
+ ## Choose your extension mechanism
26
29
 
27
- Rule of thumb: **injecting UI into an existing page? Use a widget. Adding data to a form or section? Use a custom field. Reshaping the sidebar? Use the navigation file. Adding a whole new screen? Drop in a route.**
30
+ Use this rule of thumb. Injecting UI into an existing page? Use a widget. Adding data to a form or section? Use a custom field. Reshaping the sidebar? Use the navigation file. Adding a whole new screen? Drop in a route.
28
31
 
29
32
  | You want to… | Use | Why it's the right tool |
30
33
  |--------------|-----|------------------------|
31
- | Show a banner, panel, or CTA on a built-in page | A **widget** (`defineWidgetConfig`) | Renders at a named zone; the rest of the page is untouched see [Add a widget](/rc/resources/tutorials/add-a-widget) |
32
- | Add a field to a built-in form, or add/replace/remove a field in a detail section | A **custom field** (`defineCustomFieldsConfig`) | Validated field wired into the existing form/section see [Extend forms and tables](/rc/resources/tutorials/extend-forms-and-tables) |
33
- | Add or override a column on a built-in list table | The `list` block of a **custom field** file | Model-scoped column extension see [Extend forms and tables](/rc/resources/tutorials/extend-forms-and-tables) |
34
- | Reorder / hide / relabel / re-parent sidebar items | The **navigation** file (`defineNavigationConfig`) | One host-owned `_navigation.ts` see [Customize navigation](/rc/resources/tutorials/customize-navigation) |
35
- | Add a new screen or feature | A drop-in `page.tsx` route | New URL, auto-registered, sidebar entry via `config` see [Add a page](/rc/resources/tutorials/custom-panel-page) |
36
- | Reuse a feature across projects | A [block](/rc/learn/blocks) | Ships API + admin + vendor files installable with `mercurjs add` |
34
+ | Show a banner, panel, or CTA on a built-in page | A **widget** (`defineWidgetConfig`) | Renders at a named zone; the rest of the page is untouched. See [Add a widget](/rc/resources/tutorials/add-a-widget) |
35
+ | Add a field to a built-in form, or add, replace, or remove a field in a detail section | A **custom field** (`defineCustomFieldsConfig`) | Validated field wired into the existing form or section. See [Extend forms and tables](/rc/resources/tutorials/extend-forms-and-tables) |
36
+ | Add or override a column on a built-in list table | The `list` block of a **custom field** file | Model-scoped column extension. See [Extend forms and tables](/rc/resources/tutorials/extend-forms-and-tables) |
37
+ | Reorder, hide, relabel, or re-parent sidebar items | The **navigation** file (`defineNavigationConfig`) | One host-owned `_navigation.ts`. See [Customize navigation](/rc/resources/tutorials/customize-navigation) |
38
+ | Add a new screen or feature | A drop-in `page.tsx` route | New URL, auto-registered, sidebar entry via `config`. See [Add a page](/rc/resources/tutorials/custom-panel-page) |
39
+ | Reuse a feature across projects | A [block](/rc/learn/blocks) | Ships API, admin, and vendor files installable with `mercurjs add` |
37
40
 
38
41
  ## Set up
39
42
 
40
- All configuration lives in the panel app's Vite config there is no separate `mercur.config.ts`.
43
+ All configuration lives in the panel app's Vite config. There is no separate `mercur.config.ts`.
41
44
 
42
45
  <Steps>
43
46
  <Step title="Register the plugin">
44
- Add `mercurDashboardPlugin` to the panel app's `vite.config.ts`. The only required option is `medusaConfigPath` the plugin reads panel paths and ports from your API's Medusa config:
47
+ Add `mercurDashboardPlugin` to the panel app's `vite.config.ts`. The only required option is `medusaConfigPath`. The plugin reads panel paths and ports from your API's Medusa config.
45
48
 
46
49
  ```typescript vite.config.ts
47
50
  import { defineConfig } from 'vite'
@@ -63,16 +66,16 @@ All configuration lives in the panel app's Vite config — there is no separate
63
66
  Projects created with `create-mercur-app` ship with this already wired for both panels.
64
67
  </Step>
65
68
  <Step title="Pass environment values explicitly">
66
- The plugin doesn't read `.env` itself load environment variables in `vite.config.ts` (e.g. with Vite's `loadEnv`) and pass them into the plugin options, as the starter template does with `backendUrl`.
69
+ The plugin doesn't read `.env` itself. Load environment variables in `vite.config.ts` (for example with Vite's `loadEnv`) and pass them into the plugin options, as the starter template does with `backendUrl`.
67
70
  </Step>
68
71
  <Step title="Register typed extension targets (once per panel)">
69
- Widgets, navigation, and custom fields target **typed ids** (zone ids, nav item ids, model field ids) that each panel package generates from its own built-in pages and ships as `@mercurjs/{admin,vendor}/extension-targets`. Register them once so the ids resolve in every extension file, with a single ambient reference in your app's `src`:
72
+ Widgets, navigation, and custom fields target typed ids (zone ids, nav item ids, model field ids) that each panel package generates from its own built-in pages and ships as `@mercurjs/{admin,vendor}/extension-targets`. Register them once so the ids resolve in every extension file, with a single ambient reference in your app's `src`.
70
73
 
71
74
  ```typescript apps/vendor/src/extension-targets.d.ts
72
75
  /// <reference types="@mercurjs/vendor/extension-targets" />
73
76
  ```
74
77
 
75
- (For the admin app, reference `@mercurjs/admin/extension-targets`.) With this file present, a typo in a zone, model, field, or nav id fails `tsc` instead of silently doing nothing at runtime. `create-mercur-app` ships this file already.
78
+ For the admin app, reference `@mercurjs/admin/extension-targets` instead. With this file present, a typo in a zone, model, field, or nav id fails `tsc` instead of silently doing nothing at runtime. `create-mercur-app` ships this file already.
76
79
  </Step>
77
80
  <Step title="Restart after config changes">
78
81
  Options are applied at build time through virtual modules. Adding or removing routes, widgets, and custom-field files hot-reloads automatically, but changes to the plugin options (in `vite.config.ts`) require a dev-server restart.
@@ -94,7 +97,7 @@ All configuration lives in the panel app's Vite config — there is no separate
94
97
 
95
98
  ## Widgets
96
99
 
97
- Inject a React component at a named zone on a built-in page. Drop a file under `src/widgets/`, export the component as the default and a `config` built with `defineWidgetConfig`:
100
+ A widget injects a React component at a named zone on a built-in page. Drop a file under `src/widgets/`, export the component as the default and a `config` built with `defineWidgetConfig`.
98
101
 
99
102
  ```tsx src/widgets/product-list-banner.tsx
100
103
  import { defineWidgetConfig } from "@mercurjs/dashboard-sdk"
@@ -115,9 +118,9 @@ export default function ProductListBanner() {
115
118
  }
116
119
  ```
117
120
 
118
- The zone id is `<domain>.<view>.<placement>`. The placement is the last segment:
121
+ The zone id reads `<domain>.<view>.<placement>`. The placement is the last segment:
119
122
 
120
- - `before` / `after` stack your widget before or after the built-in content (multiple widgets stack in registration order).
123
+ - `before` / `after`: stack your widget before or after the built-in content. Multiple widgets stack in registration order.
121
124
 
122
125
  Zones mounted today (**vendor portal**):
123
126
 
@@ -126,11 +129,11 @@ Zones mounted today (**vendor portal**):
126
129
  | `product.list.before` / `.after` | Vendor product list page |
127
130
  | `login.logo.*` / `login.before.*` / `login.after.*` | The public login screen (rendered before authentication) |
128
131
 
129
- The full set of valid zones is typed as `WidgetZoneId` and generated into each panel's `extension-targets.d.ts` your editor autocompletes them, and an unknown zone fails `tsc`. Walk through it end to end in [Add a widget](/rc/resources/tutorials/add-a-widget).
132
+ The full set of valid zones is typed as `WidgetZoneId` and generated into each panel's `extension-targets.d.ts`. Your editor autocompletes them, and an unknown zone fails `tsc`. Walk through it end to end in [Add a widget](/rc/resources/tutorials/add-a-widget).
130
133
 
131
134
  ## Navigation
132
135
 
133
- Custom drop-in routes place their own sidebar item via `defineRouteConfig` (see [Add a page](#add-a-page)). To reshape the **built-in** sidebar items, author a single host-owned file, `src/_navigation.ts`:
136
+ Custom drop-in routes place their own sidebar item via `defineRouteConfig` (see [Add a page](#add-a-page)). To reshape the built-in sidebar items, author a single host-owned file, `src/_navigation.ts`.
134
137
 
135
138
  ```ts src/_navigation.ts
136
139
  import { defineNavigationConfig } from "@mercurjs/dashboard-sdk"
@@ -146,15 +149,15 @@ export default defineNavigationConfig({
146
149
  })
147
150
  ```
148
151
 
149
- - `id` targets any built-in item top-level routes *or* nested children by its stable id, typed as `NavItemId`.
150
- - `rank` orders an item within its parent; `hidden` removes it from the sidebar; `label` / `icon` relabel it; `nested` re-parents it (`nested: null` promotes to top level, typed against `NavParentId`).
151
- - Navigation is a **single host-owned file** installed blocks cannot reorder the sidebar, so it stays one source of truth. It does not change custom routes, which still place themselves via `defineRouteConfig`.
152
+ - `id` targets any built-in item, top-level routes or nested children, by its stable id, typed as `NavItemId`.
153
+ - `rank` orders an item within its parent, `hidden` removes it from the sidebar, `label` and `icon` relabel it, and `nested` re-parents it (`nested: null` promotes to top level, typed against `NavParentId`).
154
+ - Navigation is a single host-owned file. Installed blocks cannot reorder the sidebar, so it stays one source of truth. It does not change custom routes, which still place themselves via `defineRouteConfig`.
152
155
 
153
156
  Walk through it in [Customize navigation](/rc/resources/tutorials/customize-navigation).
154
157
 
155
158
  ## Custom fields
156
159
 
157
- Add validated fields to a model's built-in create/edit forms, replace/remove/add fields in its detail sections, and add columns to its list table all from one model-scoped file. Drop `src/custom-fields/<model>.tsx` and default-export a `defineCustomFieldsConfig`:
160
+ A custom field adds validated fields to a model's built-in create and edit forms, replaces, removes, or adds fields in its detail sections, and adds columns to its list table, all from one model-scoped file. Drop `src/custom-fields/<model>.tsx` and default-export a `defineCustomFieldsConfig`.
158
161
 
159
162
  ```tsx src/custom-fields/product.tsx
160
163
  import { defineCustomFieldsConfig } from "@mercurjs/dashboard-sdk"
@@ -198,22 +201,22 @@ export default defineCustomFieldsConfig({
198
201
  })
199
202
  ```
200
203
 
201
- - `forms[]` adds validated fields to a form `zone` (`create` / `edit` / `organize` / ). Input type and validation come from a Zod schema via `createFormHelper`; fields render through the standard `Form.Field` chain and participate in the existing submit + validation flow.
202
- - `displays[]` targets detail-page sections: keyed by field `id`, an entry **adds** a read-only row (unknown id), **replaces** a built-in field's render (matching id + `component`), or **removes** it (matching id + `component: null`).
203
- - `list` extends the model's list table: add/override columns by id, hide via `viewDefaults.columnVisibility`, reorder via `viewDefaults.columnOrder`.
204
- - Everything is typed against the panel-generated `CustomFieldsRegistry` valid `model`, `zone`, and built-in field ids autocomplete; an invalid target fails `tsc`.
204
+ - `forms[]` adds validated fields to a form `zone` (`create`, `edit`, `organize`, and so on). Input type and validation come from a Zod schema via `createFormHelper`. Fields render through the standard `Form.Field` chain and participate in the existing submit and validation flow.
205
+ - `displays[]` targets detail-page sections, keyed by field `id`. An entry **adds** a read-only row (unknown id), **replaces** a built-in field's render (matching id plus `component`), or **removes** it (matching id plus `component: null`).
206
+ - `list` extends the model's list table: add or override columns by id, hide via `viewDefaults.columnVisibility`, reorder via `viewDefaults.columnOrder`.
207
+ - Everything is typed against the panel-generated `CustomFieldsRegistry`. Valid `model`, `zone`, and built-in field ids autocomplete, and an invalid target fails `tsc`.
205
208
 
206
209
  <Warning>
207
- **Panel custom fields vs. the Custom Fields module.** `defineCustomFieldsConfig` (this section) is a **UI** surface it renders, validates, and displays fields in the panels. It does not create database columns. To *store* extra data on an entity, use the backend [Custom Fields module](/rc/resources/customization/custom-fields), or wire your own API route/workflow. In the MVP, panel custom fields for `product` are submitted under `additional_data` and persisted onto the product's `metadata`.
210
+ **Panel custom fields vs. the Custom Fields module.** `defineCustomFieldsConfig` (this section) is a UI surface. It renders, validates, and displays fields in the panels. It does not create database columns. To store extra data on an entity, use the backend [Custom Fields module](/rc/resources/customization/custom-fields), or wire your own API route or workflow. In the MVP, panel custom fields for `product` are submitted under `additional_data` and persisted onto the product's `metadata`.
208
211
  </Warning>
209
212
 
210
- Full walkthrough (forms, sections, list columns): [Extend forms and tables](/rc/resources/tutorials/extend-forms-and-tables).
213
+ For the full walkthrough (forms, sections, and list columns), see [Extend forms and tables](/rc/resources/tutorials/extend-forms-and-tables).
211
214
 
212
215
  ## Add a page
213
216
 
214
217
  <Steps>
215
218
  <Step title="Create the route file">
216
- Create a `page.tsx` inside `src/routes/` and export a default React component. The route is determined by the file path:
219
+ Create a `page.tsx` inside `src/routes/` and export a default React component. The route is determined by the file path.
217
220
 
218
221
  ```tsx src/routes/reviews/page.tsx
219
222
  import { Star } from "@medusajs/icons"
@@ -231,13 +234,13 @@ Full walkthrough (forms, sections, list columns): [Extend forms and tables](/rc/
231
234
  ```
232
235
  </Step>
233
236
  <Step title="Add the config export for navigation">
234
- A sidebar item is generated only when the page exports a `config` with a `label`. Pages without one are still routed they just don't appear in the menu.
237
+ A sidebar item is generated only when the page exports a `config` with a `label`. Pages without one are still routed. They just don't appear in the menu.
235
238
 
236
239
  | Property | Type | Description |
237
240
  |----------|------|-------------|
238
241
  | `label` | `string` | **Required.** Text shown in the sidebar menu |
239
- | `icon` | `ComponentType` | Icon component (e.g. from `@medusajs/icons`) |
240
- | `rank` | `number` | Sort order lower numbers appear first |
242
+ | `icon` | `ComponentType` | Icon component (for example from `@medusajs/icons`) |
243
+ | `rank` | `number` | Sort order (lower numbers appear first) |
241
244
  | `nested` | `string` | Parent path for nested menu items |
242
245
  | `translationNs` | `string` | i18n namespace for the label |
243
246
  | `public` | `boolean` | If `true`, the route is accessible without authentication |
@@ -245,17 +248,17 @@ Full walkthrough (forms, sections, list columns): [Extend forms and tables](/rc/
245
248
  Route files may also export a `loader` (React Router data loader) and `handle` (route metadata) alongside the default component.
246
249
  </Step>
247
250
  <Step title="Open it in the running panel">
248
- Start the dev server the SDK picks the file up automatically. This example creates a `/reviews` route with a "Reviews" sidebar item. No route registration, no configuration file.
251
+ Start the dev server. The SDK picks the file up automatically. This example creates a `/reviews` route with a "Reviews" sidebar item. No route registration, no configuration file.
249
252
  </Step>
250
253
  </Steps>
251
254
 
252
255
  <Info>
253
- **Matching paths replace, new paths append.** If your route's path matches a built-in page (e.g. `src/routes/products/page.tsx` `/products`), your page **replaces** the built-in one. Any other path is added alongside the built-in routes. Delete the file and the built-in page returns. To change *part* of a built-in page without owning it, prefer a widget or a custom field.
256
+ **Matching paths replace, new paths append.** If your route's path matches a built-in page (for example `src/routes/products/page.tsx` maps to `/products`), your page **replaces** the built-in one. Any other path is added alongside the built-in routes. Delete the file and the built-in page returns. To change part of a built-in page without owning it, prefer a widget or a custom field.
254
257
  </Info>
255
258
 
256
259
  ### Routing conventions
257
260
 
258
- File paths map to URL routes automatically:
261
+ File paths map to URL routes automatically.
259
262
 
260
263
  | File path | Route | Description |
261
264
  |-----------|-------|-------------|
@@ -269,7 +272,7 @@ File paths map to URL routes automatically:
269
272
 
270
273
  ## Branding
271
274
 
272
- Set `name` and `logo` in the plugin options to customize the sidebar header:
275
+ Set `name` and `logo` in the plugin options to customize the sidebar header.
273
276
 
274
277
  ```typescript vite.config.ts
275
278
  mercurDashboardPlugin({
@@ -329,22 +332,22 @@ mercurDashboardPlugin({
329
332
  Yes. `defineWidgetConfig` is re-exported from `@mercurjs/dashboard-sdk` and drives file-based widgets under `src/widgets/`. The difference from Medusa is the `before | after` placement suffix on the zone id and that each panel ships its own typed zone set. See [Add a widget](/rc/resources/tutorials/add-a-widget).
330
333
  </Accordion>
331
334
  <Accordion title="How do I add a field to a built-in form or detail page?">
332
- Use `defineCustomFieldsConfig` in `src/custom-fields/<model>.tsx` `forms[]` adds validated fields to create/edit forms, and `displays[]` adds/replaces/removes fields in detail sections. See [Extend forms and tables](/rc/resources/tutorials/extend-forms-and-tables).
335
+ Use `defineCustomFieldsConfig` in `src/custom-fields/<model>.tsx`. `forms[]` adds validated fields to create and edit forms, and `displays[]` adds, replaces, or removes fields in detail sections. See [Extend forms and tables](/rc/resources/tutorials/extend-forms-and-tables).
333
336
  </Accordion>
334
337
  <Accordion title="How do I change just one part of a built-in page?">
335
- For a spot inside the page (a banner, an extra field, a column), use a [widget](#widgets) or a [custom field](#custom-fields) the rest of the page keeps all its behavior.
338
+ For a spot inside the page (a banner, an extra field, a column), use a [widget](#widgets) or a [custom field](#custom-fields). The rest of the page keeps all its behavior.
336
339
  </Accordion>
337
340
  <Accordion title="Why doesn't my page show up in the sidebar?">
338
- A sidebar item is only generated when the route file exports a `config` object with a `label`. Also check that the file is named exactly `page.tsx` (or `.ts`/`.jsx`/`.js`) under `src/routes/` and has a **default** export files without one are skipped entirely.
341
+ A sidebar item is only generated when the route file exports a `config` object with a `label`. Also check that the file is named exactly `page.tsx` (or `.ts`/`.jsx`/`.js`) under `src/routes/` and has a **default** export. Files without one are skipped entirely.
339
342
  </Accordion>
340
343
  <Accordion title="Why does my widget / custom field / nav override not type-check?">
341
- Make sure the panel's typed targets are registered a single `src/extension-targets.d.ts` with `/// <reference types="@mercurjs/vendor/extension-targets" />` (or the admin equivalent). Without it, zone/model/nav ids aren't known to TypeScript. `create-mercur-app` ships this file.
344
+ Make sure the panel's typed targets are registered with a single `src/extension-targets.d.ts` containing `/// <reference types="@mercurjs/vendor/extension-targets" />` (or the admin equivalent). Without it, zone, model, and nav ids aren't known to TypeScript. `create-mercur-app` ships this file.
342
345
  </Accordion>
343
346
  <Accordion title="Is there a mercur.config.ts file?">
344
- No all panel configuration is passed inline to `mercurDashboardPlugin()` in `vite.config.ts`. If you've seen references to a separate config file, they're outdated.
347
+ No. All panel configuration is passed inline to `mercurDashboardPlugin()` in `vite.config.ts`. If you've seen references to a separate config file, they're outdated.
345
348
  </Accordion>
346
349
  <Accordion title="Does this apply to both the admin panel and the vendor portal?">
347
- Both panels use the same SDK and conventions, and a file only targets the panel it lives in. Which built-in zones, models, and nav ids exist differs per panel (each ships its own `extension-targets.d.ts`). Today the widget zones and product custom fields are mounted in the **vendor** portal; navigation overrides work in both.
350
+ Both panels use the same SDK and conventions, and a file only targets the panel it lives in. Which built-in zones, models, and nav ids exist differs per panel (each ships its own `extension-targets.d.ts`). Today the widget zones and product custom fields are mounted in the **vendor** portal, and navigation overrides work in both.
348
351
  </Accordion>
349
352
  </AccordionGroup>
350
353
 
@@ -1,6 +1,7 @@
1
1
  ---
2
- title: "Medusa Cloud deployment"
3
- description: "Deploy Mercur — backend, admin panel, and vendor panel — on Medusa Cloud."
2
+ title: "Medusa Cloud"
3
+ sidebarTitle: "Medusa Cloud"
4
+ description: "Deploy the Mercur backend, admin panel, and vendor panel on Medusa Cloud."
4
5
  ---
5
6
 
6
7
  ## Introduction
@@ -12,8 +13,8 @@ Head to the [Medusa Cloud signup page](https://cloud.medusajs.com/signup) to get
12
13
  <Info>
13
14
  A single Medusa Cloud deployment serves everything: the backend API, the
14
15
  **admin panel** at `/dashboard`, and the **vendor panel** at `/seller`. The
15
- panels are built together with the backend and served from the same origin
16
- no separate hosting is needed.
16
+ panels are built together with the backend and served from the same origin.
17
+ No separate hosting is needed.
17
18
  </Info>
18
19
 
19
20
  ## How it works
@@ -22,21 +23,21 @@ The `basic` template wires this up out of the box:
22
23
 
23
24
  - During `build`, the API package builds both panels and bundles their production
24
25
  output into the Medusa build artifact (`.medusa/server/dashboards/<name>`), so hosts
25
- that deploy only the artifact like Medusa Cloud carry the panels with it
26
+ that deploy only the artifact, like Medusa Cloud, carry the panels with it
26
27
  (`packages/api/scripts/bundle-dashboards.mjs`).
27
28
  - At runtime, the `admin-ui` and `vendor-ui` modules detect the bundled builds and
28
29
  serve them statically at their configured paths (`/dashboard`, `/seller`).
29
30
  - The panels bake the backend URL at build time from the `MERCUR_BACKEND_URL`
30
31
  environment variable. Because they are served from the backend's own origin, all
31
- API calls are same-origin no cross-site cookie or CORS gymnastics.
32
+ API calls are same-origin. No cross-site cookie or CORS gymnastics.
32
33
 
33
34
  Medusa Cloud builds the monorepo with `NODE_ENV=production`. In that mode the build
34
35
  **fails fast** when `MERCUR_BACKEND_URL` is missing instead of shipping panels that
35
- silently point at `http://localhost:9000` so make sure to set it as described below.
36
+ silently point at `http://localhost:9000`. Make sure to set it as described below.
36
37
 
37
38
  ## Prerequisites
38
39
 
39
- - A Mercur project created with [`@mercurjs/cli`](/rc/learn/installation) and pushed to a GitHub repository
40
+ - A Mercur project created with [`@mercurjs/cli`](/learn/introduction) and pushed to a GitHub repository
40
41
  - A [Medusa Cloud](https://cloud.medusajs.com) account with the GitHub app authorized
41
42
  - API keys for any third-party services you plan to use (Stripe, Resend, Algolia, etc.)
42
43
 
@@ -54,13 +55,13 @@ silently point at `http://localhost:9000` — so make sure to set it as describe
54
55
  <Step title="Configure the project">
55
56
  On the **Configure** step, fill in:
56
57
 
57
- - **Project name** and **Custom subdomain**. The subdomain determines your backend URL (`https://<subdomain>.medusajs.app`) you will reference it in the environment variables below.
58
+ - **Project name** and **Custom subdomain**. The subdomain determines your backend URL (`https://<subdomain>.medusajs.app`). You will reference it in the environment variables below.
58
59
  - **Region** closest to your users.
59
60
  - **Medusa root directory**: `/packages/api`.
60
- - **Initial user** the first admin email and password.
61
+ - **Initial user:** the first admin email and password.
61
62
 
62
- Leave **Storefront root directory** empty the Mercur basic template doesn't ship a storefront.
63
- ![Configure project name, region, Medusa root directory](/images/v2/cloud_3.png)
63
+ Leave **Storefront root directory** empty. The Mercur basic template doesn't ship a storefront.
64
+ ![Configure project: name, region, Medusa root directory](/images/v2/cloud_3.png)
64
65
  </Step>
65
66
  <Step title="Set environment variables">
66
67
  Scroll down to **Environment variables** and add the **Backend Environment Variables** below. Medusa Cloud provisions the database, Redis, and file storage automatically, so you don't need to set those.
@@ -70,11 +71,11 @@ silently point at `http://localhost:9000` — so make sure to set it as describe
70
71
 
71
72
  ```bash
72
73
  # Panels (build-time): the deployed backend origin, baked into the admin and
73
- # vendor panels. Enable the **Build** toggle for this variable the panels
74
+ # vendor panels. Enable the **Build** toggle for this variable. The panels
74
75
  # read it while they are being built, not at runtime.
75
76
  MERCUR_BACKEND_URL=https://<your-subdomain>.medusajs.app
76
77
 
77
- # CORS the panels are served from the backend's own origin, so it is enough
78
+ # CORS: the panels are served from the backend's own origin, so it is enough
78
79
  # to list that origin (plus your storefront URL in STORE_CORS, if you have one)
79
80
  STORE_CORS=https://<your-subdomain>.medusajs.app
80
81
  ADMIN_CORS=https://<your-subdomain>.medusajs.app
@@ -119,7 +120,7 @@ silently point at `http://localhost:9000` — so make sure to set it as describe
119
120
  </Step>
120
121
  </Steps>
121
122
 
122
- You can change these variables later from the project's environment settings, and switch the deployment branch at any time. Medusa Cloud will automatically pull and rebuild your environment whenever a new commit is pushed to the selected branch. Remember that `MERCUR_BACKEND_URL` is baked into the panels at build time changing it requires a redeploy.
123
+ You can change these variables later from the project's environment settings, and switch the deployment branch at any time. Medusa Cloud will automatically pull and rebuild your environment whenever a new commit is pushed to the selected branch. Remember that `MERCUR_BACKEND_URL` is baked into the panels at build time. Changing it requires a redeploy.
123
124
 
124
125
  ## After deployment
125
126
 
@@ -131,7 +132,7 @@ Once the build succeeds, everything is served from `https://<your-subdomain>.med
131
132
  | Admin panel | `https://<your-subdomain>.medusajs.app/dashboard` |
132
133
  | Vendor panel | `https://<your-subdomain>.medusajs.app/seller` |
133
134
 
134
- Open the admin panel and sign in with the **Initial user** you configured in the setup step. If a panel shows a "Dashboard not built" page, the bundling step did not run check the deployment's build logs for output from `bundle-dashboards`.
135
+ Open the admin panel and sign in with the **Initial user** you configured in the setup step. If a panel shows a "Dashboard not built" page, the bundling step did not run. Check the deployment's build logs for output from `bundle-dashboards`.
135
136
 
136
137
  <Tip>
137
138
  Prefer hosting the panels separately (for example on Vercel or Netlify)? That
@@ -144,14 +145,14 @@ Open the admin panel and sign in with the **Initial user** you configured in the
144
145
  ## FAQ
145
146
 
146
147
  <AccordionGroup>
147
- <Accordion title="A panel shows a 'Dashboard not built' page what went wrong?">
148
+ <Accordion title="A panel shows a 'Dashboard not built' page. What went wrong?">
148
149
  The bundling step didn't run during the build. Check the deployment's build logs for output from `bundle-dashboards`; the most common cause is a build that failed earlier (often a missing `MERCUR_BACKEND_URL` with the Build toggle off).
149
150
  </Accordion>
150
151
  <Accordion title="I changed MERCUR_BACKEND_URL but the panels still call the old URL">
151
152
  The backend URL is **baked into the panels at build time**, not read at runtime. After changing the variable, trigger a redeploy so the panels rebuild with the new value.
152
153
  </Accordion>
153
154
  <Accordion title="Do I need to configure a database or Redis?">
154
- No Medusa Cloud provisions Postgres, Redis, and file storage automatically and injects their connection variables. Only set the variables listed in the setup step.
155
+ No. Medusa Cloud provisions Postgres, Redis, and file storage automatically and injects their connection variables. Only set the variables listed in the setup step.
155
156
  </Accordion>
156
157
  </AccordionGroup>
157
158
 
@@ -161,7 +162,7 @@ Open the admin panel and sign in with the **Initial user** you configured in the
161
162
  <Card title="Stripe Connect" href="/rc/resources/integrations/stripe-connect">
162
163
  Wire payments and payouts on the deployed environment.
163
164
  </Card>
164
- <Card title="Build your first marketplace" href="/rc/resources/tutorials/first-marketplace">
165
- Run the end-to-end flow against your new deployment.
165
+ <Card title="Overview" href="/learn/introduction">
166
+ Set up Mercur and run a marketplace.
166
167
  </Card>
167
168
  </CardGroup>