The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.
TypeScript b2b-marketplacecomposable-commerceecommerceenterpriseheadless-commercemarketplacemedusamedusajsmulti-vendortypescript
<svg xmlns="http://www.w3.org/2000/svg" width="1040" height="1090" viewBox="0 0 1040 1090" font-family="JetBrains Mono, SF Mono, SFMono-Regular, Menlo, Consolas, Liberation Mono, monospace" role="img" aria-label="Mercur's architecture: the admin and vendor panels, a storefront, and your services call the backend through @mercurjs/client. The backend exposes /admin, /vendor, and /store and runs marketplace modules from @mercurjs/core beside Medusa's commerce modules and your own code, over PostgreSQL, Redis, and providers.">
<title>Mercur's architecture: the admin and vendor panels, a storefront, and your services call the backend through @mercurjs/client. The backend exposes /admin, /vendor, and /store and runs marketplace modules from @mercurjs/core beside Medusa's commerce modules and your own code, over PostgreSQL, Redis, and providers.</title>
<defs><filter id="sh" x="-30%" y="-30%" width="160%" height="170%"><feDropShadow dx="0" dy="18" stdDeviation="22" flood-color="#18181b" flood-opacity="0.07"/></filter><filter id="gr" x="0" y="0" width="100%" height="100%"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="2" seed="7" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0"/><feComponentTransfer><feFuncA type="table" tableValues="0 1"/></feComponentTransfer><feComposite in2="SourceGraphic" operator="in"/></filter><pattern id="dt" width="11" height="11" patternUnits="userSpaceOnUse"><rect x="4.5" y="4.5" width="1.6" height="1.6" fill="#d9d9de"/></pattern><clipPath id="c1"><rect x="0" y="0" width="222" height="132"/></clipPath><clipPath id="c2"><rect x="0" y="0" width="222" height="132"/></clipPath><clipPath id="c3"><rect x="0" y="0" width="222" height="132"/></clipPath><clipPath id="c4"><rect x="0" y="0" width="222" height="132"/></clipPath><clipPath id="c5"><rect x="0" y="0" width="960" height="64"/></clipPath><clipPath id="c6"><rect x="0" y="0" width="960" height="532"/></clipPath><clipPath id="c7"><rect x="0" y="0" width="304" height="112"/></clipPath><clipPath id="c8"><rect x="0" y="0" width="304" height="112"/></clipPath><clipPath id="c9"><rect x="0" y="0" width="304" height="112"/></clipPath></defs>
<rect x="88.5" y="-87.5" width="87" height="87" fill="none" stroke="#ececef" stroke-width="1"/><rect x="176" y="-88" width="88" height="88" fill="url(#dt)"/><rect x="264" y="-88" width="88" height="88" fill="#e4e4e7"/><rect x="264" y="-88" width="88" height="88" fill="#71717a" opacity="0.22" filter="url(#gr)"/><rect x="968" y="0" width="88" height="88" fill="url(#dt)"/><rect x="0" y="88" width="88" height="88" fill="#e4e4e7"/><rect x="0" y="88" width="88" height="88" fill="#71717a" opacity="0.22" filter="url(#gr)"/><rect x="352" y="88" width="88" height="88" fill="url(#dt)"/><rect x="616" y="88" width="88" height="88" fill="#e4e4e7"/><rect x="616" y="88" width="88" height="88" fill="#71717a" opacity="0.22" filter="url(#gr)"/><rect x="968" y="88" width="88" height="88" fill="url(#dt)"/><rect x="-88" y="176" width="88" height="88" fill="url(#dt)"/><rect x="176.5" y="352.5" width="87" height="87" fill="none" stroke="#ececef" stroke-width="1"/><rect x="264.5" y="352.5" width="87" height="87" fill="none" stroke="#ececef" stroke-width="1"/><rect x="-88" y="440" width="88" height="88" fill="url(#dt)"/><rect x="704.5" y="440.5" width="87" height="87" fill="none" stroke="#ececef" stroke-width="1"/><rect x="-88" y="528" width="88" height="88" fill="url(#dt)"/><rect x="264" y="528" width="88" height="88" fill="url(#dt)"/><rect x="352" y="528" width="88" height="88" fill="#e4e4e7"/><rect x="352" y="528" width="88" height="88" fill="#71717a" opacity="0.22" filter="url(#gr)"/><rect x="0" y="616" width="88" height="88" fill="url(#dt)"/><rect x="88" y="616" width="88" height="88" fill="#e4e4e7"/><rect x="88" y="616" width="88" height="88" fill="#71717a" opacity="0.22" filter="url(#gr)"/><rect x="704" y="704" width="88" height="88" fill="url(#dt)"/><rect x="968.5" y="704.5" width="87" height="87" fill="none" stroke="#ececef" stroke-width="1"/><rect x="440" y="968" width="88" height="88" fill="#e4e4e7"/><rect x="440" y="968" width="88" height="88" fill="#71717a" opacity="0.22" filter="url(#gr)"/><rect x="968" y="968" width="88" height="88" fill="url(#dt)"/><rect x="88.5" y="1056.5" width="87" height="87" fill="none" stroke="#ececef" stroke-width="1"/><rect x="264.5" y="1056.5" width="87" height="87" fill="none" stroke="#ececef" stroke-width="1"/><rect x="792" y="1056" width="88" height="88" fill="#e4e4e7"/><rect x="792" y="1056" width="88" height="88" fill="#71717a" opacity="0.22" filter="url(#gr)"/><rect x="352" y="1144" width="88" height="88" fill="#e4e4e7"/><rect x="352" y="1144" width="88" height="88" fill="#71717a" opacity="0.22" filter="url(#gr)"/><rect x="528.5" y="1144.5" width="87" height="87" fill="none" stroke="#ececef" stroke-width="1"/><rect x="704.5" y="1144.5" width="87" height="87" fill="none" stroke="#ececef" stroke-width="1"/><rect x="40" y="48" width="222" height="132" fill="#ffffff" filter="url(#sh)"/><rect x="40" y="48" width="222" height="132" fill="#ffffff"/><g transform="translate(40 48)"><g clip-path="url(#c1)"><rect x="20" y="25" width="10" height="10" fill="#18181b"/><text x="42" y="36.3" font-size="18" fill="#18181b" font-weight="500">Admin</text><line x1="0" y1="60" x2="222" y2="60" stroke="#e4e4e7" stroke-width="1"/><text x="20" y="91.3" font-size="15" fill="#3f3f46">@mercurjs/admin</text><text x="20" y="115.3" font-size="15" fill="#a1a1aa">dashboard-sdk</text></g></g><rect x="40.5" y="48.5" width="221" height="131" fill="none" stroke="#e4e4e7" stroke-width="1"/><rect x="286" y="48" width="222" height="132" fill="#ffffff" filter="url(#sh)"/><rect x="286" y="48" width="222" height="132" fill="#ffffff"/><g transform="translate(286 48)"><g clip-path="url(#c2)"><rect x="20" y="25" width="10" height="10" fill="#18181b"/><text x="42" y="36.3" font-size="18" fill="#18181b" font-weight="500">Vendor</text><line x1="0" y1="60" x2="222" y2="60" stroke="#e4e4e7" stroke-width="1"/><text x="20" y="91.3" font-size="15" fill="#3f3f46">@mercurjs/vendor</text><text x="20" y="115.3" font-size="15" fill="#a1a1aa">dashboard-sdk</text></g></g><rect x="286.5" y="48.5" width="221" height="131" fill="none" stroke="#e4e4e7" stroke-width="1"/><rect x="532" y="48" width="222" height="132" fill="#ffffff" filter="url(#sh)"/><rect x="532" y="48" width="222" height="132" fill="#ffffff"/><g transform="translate(532 48)"><g clip-path="url(#c3)"><rect x="20" y="25" width="10" height="10" fill="#18181b"/><text x="42" y="36.3" font-size="18" fill="#18181b" font-weight="500">Storefront</text><line x1="0" y1="60" x2="222" y2="60" stroke="#e4e4e7" stroke-width="1"/><text x="20" y="91.3" font-size="15" fill="#3f3f46">Next.js or any</text><text x="20" y="115.3" font-size="15" fill="#a1a1aa">framework</text></g></g><rect x="532.5" y="48.5" width="221" height="131" fill="none" stroke="#e4e4e7" stroke-width="1"/><rect x="778" y="48" width="222" height="132" fill="#ffffff" filter="url(#sh)"/><rect x="778" y="48" width="222" height="132" fill="#ffffff"/><g transform="translate(778 48)"><g clip-path="url(#c4)"><rect x="20" y="25" width="10" height="10" fill="#18181b"/><text x="42" y="36.3" font-size="18" fill="#18181b" font-weight="500">Services</text><line x1="0" y1="60" x2="222" y2="60" stroke="#e4e4e7" stroke-width="1"/><text x="20" y="91.3" font-size="15" fill="#3f3f46">ERP · PIM</text><text x="20" y="115.3" font-size="15" fill="#a1a1aa">AI agents</text></g></g><rect x="778.5" y="48.5" width="221" height="131" fill="none" stroke="#e4e4e7" stroke-width="1"/><path d="M151 180 L151 220" fill="none" stroke="#c4c4cc" stroke-width="1"/><rect x="148" y="217" width="6" height="6" fill="#c4c4cc"/><path d="M397 180 L397 220" fill="none" stroke="#c4c4cc" stroke-width="1"/><rect x="394" y="217" width="6" height="6" fill="#c4c4cc"/><path d="M643 180 L643 220" fill="none" stroke="#c4c4cc" stroke-width="1"/><rect x="640" y="217" width="6" height="6" fill="#c4c4cc"/><path d="M889 180 L889 220" fill="none" stroke="#c4c4cc" stroke-width="1"/><rect x="886" y="217" width="6" height="6" fill="#c4c4cc"/><rect x="40" y="220" width="960" height="64" fill="#ffffff" filter="url(#sh)"/><rect x="40" y="220" width="960" height="64" fill="#ffffff"/><g transform="translate(40 220)"><g clip-path="url(#c5)"><text x="24" y="37.6" font-size="16" fill="#18181b" font-weight="500">@mercurjs/client</text><text x="201.6" y="37.3" font-size="15" fill="#a1a1aa">typed by mercurjs codegen</text><text x="936" y="37.3" font-size="15" fill="#71717a" text-anchor="end">@mercurjs/types</text></g></g><rect x="40.5" y="220.5" width="959" height="63" fill="none" stroke="#e4e4e7" stroke-width="1"/><path d="M200 284 L200 328" fill="none" stroke="#c4c4cc" stroke-width="1"/><rect x="197" y="325" width="6" height="6" fill="#c4c4cc"/><path d="M520 284 L520 328" fill="none" stroke="#c4c4cc" stroke-width="1"/><rect x="517" y="325" width="6" height="6" fill="#c4c4cc"/><path d="M840 284 L840 328" fill="none" stroke="#c4c4cc" stroke-width="1"/><rect x="837" y="325" width="6" height="6" fill="#c4c4cc"/><rect x="40" y="328" width="960" height="532" fill="#ffffff" filter="url(#sh)"/><rect x="40" y="328" width="960" height="532" fill="#ffffff"/><g transform="translate(40 328)"><g clip-path="url(#c6)"><text x="24" y="41.6" font-size="16" fill="#18181b" font-weight="500">/admin/*</text><text x="296" y="41.3" font-size="15" fill="#a1a1aa" text-anchor="end">role-gated</text><line x1="320" y1="0" x2="320" y2="72" stroke="#e4e4e7" stroke-width="1"/><text x="344" y="41.6" font-size="16" fill="#18181b" font-weight="500">/vendor/*</text><text x="616" y="41.3" font-size="15" fill="#a1a1aa" text-anchor="end">seller-scoped</text><line x1="640" y1="0" x2="640" y2="72" stroke="#e4e4e7" stroke-width="1"/><text x="664" y="41.6" font-size="16" fill="#18181b" font-weight="500">/store/*</text><text x="936" y="41.3" font-size="15" fill="#a1a1aa" text-anchor="end">public</text><line x1="0" y1="72" x2="960" y2="72" stroke="#e4e4e7" stroke-width="1"/><rect x="24" y="102" width="10" height="10" fill="#7c3aed"/><text x="46" y="111.9" font-size="14" fill="#18181b" letter-spacing="1.2">MARKETPLACE</text><text x="46" y="137.3" font-size="15" fill="#a1a1aa">@mercurjs/core</text><rect x="244" y="92" width="78" height="30" fill="#f4f4f5"/><text x="256" y="112.3" font-size="15" fill="#71717a">seller</text><rect x="332" y="92" width="69" height="30" fill="#f4f4f5"/><text x="344" y="112.3" font-size="15" fill="#71717a">offer</text><rect x="411" y="92" width="114" height="30" fill="#f4f4f5"/><text x="423" y="112.3" font-size="15" fill="#71717a">commission</text><rect x="535" y="92" width="78" height="30" fill="#f4f4f5"/><text x="547" y="112.3" font-size="15" fill="#71717a">payout</text><rect x="623" y="92" width="132" height="30" fill="#f4f4f5"/><text x="635" y="112.3" font-size="15" fill="#71717a">product-edit</text><rect x="244" y="134" width="177" height="30" fill="#f4f4f5"/><text x="256" y="154.3" font-size="15" fill="#71717a">product-attribute</text><rect x="431" y="134" width="78" height="30" fill="#f4f4f5"/><text x="443" y="154.3" font-size="15" fill="#71717a">review</text><rect x="519" y="134" width="141" height="30" fill="#f4f4f5"/><text x="531" y="154.3" font-size="15" fill="#71717a">custom-fields</text><line x1="0" y1="184" x2="960" y2="184" stroke="#ededf0" stroke-width="1"/><rect x="24" y="214" width="10" height="10" fill="#71717a"/><text x="46" y="223.9" font-size="14" fill="#18181b" letter-spacing="1.2">COMMERCE</text><text x="46" y="249.3" font-size="15" fill="#a1a1aa">@medusajs/medusa</text><rect x="244" y="204" width="87" height="30" fill="#f4f4f5"/><text x="256" y="224.3" font-size="15" fill="#71717a">product</text><rect x="341" y="204" width="87" height="30" fill="#f4f4f5"/><text x="353" y="224.3" font-size="15" fill="#71717a">pricing</text><rect x="438" y="204" width="60" height="30" fill="#f4f4f5"/><text x="450" y="224.3" font-size="15" fill="#71717a">cart</text><rect x="508" y="204" width="69" height="30" fill="#f4f4f5"/><text x="520" y="224.3" font-size="15" fill="#71717a">order</text><rect x="587" y="204" width="87" height="30" fill="#f4f4f5"/><text x="599" y="224.3" font-size="15" fill="#71717a">payment</text><rect x="684" y="204" width="123" height="30" fill="#f4f4f5"/><text x="696" y="224.3" font-size="15" fill="#71717a">fulfillment</text><rect x="817" y="204" width="105" height="30" fill="#f4f4f5"/><text x="829" y="224.3" font-size="15" fill="#71717a">inventory</text><rect x="244" y="246" width="105" height="30" fill="#f4f4f5"/><text x="256" y="266.3" font-size="15" fill="#71717a">promotion</text><line x1="0" y1="296" x2="960" y2="296" stroke="#ededf0" stroke-width="1"/><rect x="24" y="326" width="10" height="10" fill="#a1a1aa"/><text x="46" y="335.9" font-size="14" fill="#18181b" letter-spacing="1.2">YOURS</text><text x="46" y="361.3" font-size="15" fill="#a1a1aa">src/</text><rect x="244.5" y="316.5" width="86" height="29" fill="none" stroke="#c4c4cc" stroke-width="1" stroke-dasharray="3 3"/><text x="256" y="336.3" font-size="15" fill="#71717a">modules</text><rect x="341.5" y="316.5" width="149" height="29" fill="none" stroke="#c4c4cc" stroke-width="1" stroke-dasharray="3 3"/><text x="353" y="336.3" font-size="15" fill="#71717a">workflow hooks</text><rect x="501.5" y="316.5" width="113" height="29" fill="none" stroke="#c4c4cc" stroke-width="1" stroke-dasharray="3 3"/><text x="513" y="336.3" font-size="15" fill="#71717a">api routes</text><rect x="625.5" y="316.5" width="122" height="29" fill="none" stroke="#c4c4cc" stroke-width="1" stroke-dasharray="3 3"/><text x="637" y="336.3" font-size="15" fill="#71717a">subscribers</text><rect x="758.5" y="316.5" width="77" height="29" fill="none" stroke="#c4c4cc" stroke-width="1" stroke-dasharray="3 3"/><text x="770" y="336.3" font-size="15" fill="#71717a">blocks</text><line x1="0" y1="386" x2="960" y2="386" stroke="#ededf0" stroke-width="1"/><rect x="24" y="416" width="10" height="10" fill="#a1a1aa"/><text x="46" y="425.9" font-size="14" fill="#18181b" letter-spacing="1.2">LINKS</text><text x="46" y="451.3" font-size="15" fill="#a1a1aa">defineLink</text><rect x="244" y="406" width="168" height="30" fill="#f4f4f5"/><text x="256" y="426.3" font-size="15" fill="#71717a">product ↔ seller</text><rect x="422" y="406" width="159" height="30" fill="#f4f4f5"/><text x="434" y="426.3" font-size="15" fill="#71717a">offer ↔ variant</text><rect x="591" y="406" width="195" height="30" fill="#f4f4f5"/><text x="603" y="426.3" font-size="15" fill="#71717a">order-group ↔ order</text><line x1="0" y1="476" x2="960" y2="476" stroke="#ededf0" stroke-width="1"/><text x="24" y="509.3" font-size="15" fill="#a1a1aa">withMercur() · one Node process</text><text x="936" y="509.3" font-size="15" fill="#a1a1aa" text-anchor="end">route → workflow → module</text></g></g><rect x="40.5" y="328.5" width="959" height="531" fill="none" stroke="#e4e4e7" stroke-width="1"/><path d="M192 860 L192 916" fill="none" stroke="#c4c4cc" stroke-width="1"/><rect x="189" y="913" width="6" height="6" fill="#c4c4cc"/><rect x="40" y="916" width="304" height="112" fill="#ffffff" filter="url(#sh)"/><rect x="40" y="916" width="304" height="112" fill="#ffffff"/><g transform="translate(40 916)"><g clip-path="url(#c7)"><rect x="20" y="25" width="10" height="10" fill="#a1a1aa"/><text x="42" y="36.3" font-size="18" fill="#18181b" font-weight="500">PostgreSQL</text><line x1="0" y1="60" x2="304" y2="60" stroke="#e4e4e7" stroke-width="1"/><text x="20" y="91.3" font-size="15" fill="#71717a">one database</text></g></g><rect x="40.5" y="916.5" width="303" height="111" fill="none" stroke="#e4e4e7" stroke-width="1"/><path d="M520 860 L520 916" fill="none" stroke="#c4c4cc" stroke-width="1"/><rect x="517" y="913" width="6" height="6" fill="#c4c4cc"/><rect x="368" y="916" width="304" height="112" fill="#ffffff" filter="url(#sh)"/><rect x="368" y="916" width="304" height="112" fill="#ffffff"/><g transform="translate(368 916)"><g clip-path="url(#c8)"><rect x="20" y="25" width="10" height="10" fill="#a1a1aa"/><text x="42" y="36.3" font-size="18" fill="#18181b" font-weight="500">Redis</text><line x1="0" y1="60" x2="304" y2="60" stroke="#e4e4e7" stroke-width="1"/><text x="20" y="91.3" font-size="15" fill="#71717a">events · workflows · locks</text></g></g><rect x="368.5" y="916.5" width="303" height="111" fill="none" stroke="#e4e4e7" stroke-width="1"/><path d="M848 860 L848 916" fill="none" stroke="#c4c4cc" stroke-width="1"/><rect x="845" y="913" width="6" height="6" fill="#c4c4cc"/><rect x="696" y="916" width="304" height="112" fill="#ffffff" filter="url(#sh)"/><rect x="696" y="916" width="304" height="112" fill="#ffffff"/><g transform="translate(696 916)"><g clip-path="url(#c9)"><rect x="20" y="25" width="10" height="10" fill="#a1a1aa"/><text x="42" y="36.3" font-size="18" fill="#18181b" font-weight="500">Providers</text><line x1="0" y1="60" x2="304" y2="60" stroke="#e4e4e7" stroke-width="1"/><text x="20" y="91.3" font-size="15" fill="#71717a">payments · payouts · search</text></g></g><rect x="696.5" y="916.5" width="303" height="111" fill="none" stroke="#e4e4e7" stroke-width="1"/>
</svg>