How mercurjs/mercur works
Mercur is a headless multi-vendor marketplace platform built on Medusa. Its customer workflow spans marketplace browsing and offer discovery, cart and checkout, then order and post-purchase actions; operators and sellers manage marketplace entities through dashboards and APIs. The graph also preserves messaging, wishlists, search, and payment integrations documented by the README. Source evidence is sampled unevenly: product creation and messaging calls are visible, while several dashboard, storefront, search, and payout links are documented capabilities rather than inspected runtime wiring.
Main entry points: app Storefront · messages/route.ts Messaging API · products/route.ts Admin products API · app.tsx Admin dashboard
Components 22
Marketplace experience
- Storefront
apps/storefront/src/app - Cart and checkout
apps/storefront/src/components/sections/Cart - Orders and returns
apps/storefront/src/components/sections/OrderDetailsSection/OrderDetailsSection.tsx
Marketplace engine
- Catalog and offers
packages/core/src/api/store/products/route.ts - Marketplace APIs
packages/core/src/api - Admin products API
packages/core/src/api/admin/products/route.ts - Product workflows
packages/core/src/workflows/product/workflows/create-products.ts - Product attributes
packages/core/src/api/admin/product-attributes/route.ts - Medusa commerce core
- PostgreSQL and Redis
Operations and seller tools
- Admin dashboard
packages/admin/src/app.tsx - Seller dashboard
packages/admin/src/get-route-map.tsx
Marketplace extensions
- Product search
packages/registry/src/algolia/api/store/products/search/route.ts - Messaging API
packages/registry/src/messaging/api/store/messages/route.ts - Messaging service
packages/registry/src/messaging/modules/messaging/service.ts - Conversation workflows
packages/registry/src/messaging/workflows/messaging/workflows/create-conversation.ts - Message workflow
packages/registry/src/messaging/workflows/messaging/workflows/send-message.ts - Wishlist API
packages/registry/src/wishlist/api/store/wishlist/route.ts - Stripe Connect payouts
packages/plugins/stripe-connector/src/api/admin/stripe/settlements/route.ts
Other components
- Customer
- Seller
- Marketplace operator
Connections 21
- Customer → Storefront: browses and buys
README.md - Storefront → Catalog and offers: requests catalog
- Storefront → Product search: searches products
- Storefront → Cart and checkout: builds cart
- Cart and checkout → Orders and returns: completes checkout
- Storefront → Wishlist API: manages wishlist
- Storefront → Messaging API: starts conversations
- Seller → Seller dashboard: manages listings
README.md - Marketplace operator → Admin dashboard: manages marketplace
README.md - Admin dashboard → Admin products API: creates products
- Admin products API → Product workflows: runs workflow
packages/core/src/api/admin/products/route.ts - Admin products API → Catalog and offers: lists products
packages/core/src/api/admin/products/route.ts - Admin dashboard → Product attributes: manages attributes
- Marketplace APIs → Medusa commerce core: extends commerce
README.md - Medusa commerce core → PostgreSQL and Redis: persists marketplace data
README.md - Messaging API → Messaging service: queries conversations
packages/registry/src/messaging/api/store/messages/route.ts - Messaging API → Conversation workflows: creates conversation
packages/registry/src/messaging/api/store/messages/route.ts - Messaging API → Message workflow: sends message
packages/registry/src/messaging/api/store/messages/route.ts - Messaging service → PostgreSQL and Redis: reads and writes
packages/registry/src/messaging/modules/messaging/service.ts - Stripe Connect payouts → Medusa commerce core: integrates payments
- Medusa commerce core → Stripe Connect payouts: routes payouts