Medusa Project Structure: Where Every Kind of Code Belongs
Medusa loads code by convention. A directory-by-directory guide to what goes where, and the decision tree for placing any new piece of logic.
Medusa loads code by convention. A directory-by-directory guide to what goes where, and the decision tree for placing any new piece of logic.
How Medusa's payment abstraction works, why running two providers is easier than you think, and the authorise-versus-capture decision that determines your refund story.
Cart persistence, the guest-to-customer merge, inventory races and optimistic UI. The cart problems that only appear in production, and how to avoid them.
What works, what we changed, and what we would never do again.
The dashboard is a React app you can extend. Injecting widgets into existing pages, adding new routes, and the conventions that keep extensions from looking bolted on.
Not a feature grid written by someone selling one of them. Where Shopify genuinely wins, where Medusa does, and the revenue point where the maths flips.
How Medusa's event bus works, when a subscriber is the right tool instead of a workflow step, and the retry semantics you need to design around.
When a module should become a plugin, how the package is structured, and what changes when your code has to run in someone else's application.
The SDK is thin on purpose. What it handles, how authentication differs between store and admin, and why the fields parameter is the difference between a fast storefront and a slow one.
Catalog, customers, orders, subscriptions and the redirect map that decides whether you keep your rankings. A working plan for moving off Shopify, from people who have done it.
Everything in Medusa is resolved from a container. What is registered, how scoping works per request, and how to avoid the two mistakes that cause leaks.
A small rant about why "dark mode toggle" is the wrong abstraction.