Skip to main content

Medusa Store

Medusa is the commerce system of record for carts, orders, promotions, product extensions, and workflows. It is configured in medusa-store/medusa-config.ts; its custom modules live under medusa-store/src/modules/. Cart completion, order creation, payment-collection refresh, and related store APIs are implemented in src/api/store/carts/[cart_id]/. Runtime dependencies include a primary and replica PostgreSQL connection, Redis cache/locking/event bus/workflows, and S3 file storage. Helm values define separate Medusa server, IMS server, and worker deployments.

Vector

Vector is the marketplace checkout-facing FastAPI service. Its router assembly is vector/app/api/v1/routes.py; checkout orchestration is split between cart, payment, delivery, and Medusa service modules. It uses Redis, Medusa, Mint over gRPC, SQS/SNS, URL-shortening, and Google Maps. Keep Vector thin: it should coordinate user-facing checkout concerns while commerce state remains in Medusa, payment processing remains in Mint, and post-order work remains in Orderbox.

Mint

Mint is the payment boundary. mint/app/main.py runs its HTTP APIs and gRPC server. Payment endpoints are versioned under mint/app/api/v1/ and v2/; payment/order logic is in mint/app/service/. It integrates JuSPay and Cashfree, with documented callbacks to Vector, Dermadesk, Orderbox, and Konsilo. Payment updates must be idempotent and should always record a reconciliation identifier that is safe to propagate to downstream systems.

Orderbox

Orderbox owns marketplace and consultation post-order workflows, ERP synchronization, shipment state, and returns. Its primary HTTP entry is orderbox/app/main.py; v3 routes are assembled in app/api/v3/route.py. The worker is started via app/worker_main.py. Service code under app/service/v3/ separates order creation, reservations, ERP payloads, payments, shipping, and returns. It integrates Medusa, Storehouse reservations, Estimo, Mint gRPC, Shopify, Shipway, Business Central, Hodor, Reflekt, and Konsilo.