Medusa Project Structure

The open-source alternative to Shopify. Medusa is a modular, high-performance headless commerce engine built with Node.js, featuring a clean monorepo structure that separates the core engine, admin dashboard, and its extensive module ecosystem.

Updated 2025-12-30

#medusa #ecommerce #nodejs #monorepo #turborepo #headless-commerce #open-source
PNGPDF

Project Directory

medusa/
packages/
Core & official packages
medusa/
The core commerce engine
src/
Core logic & loaders
package.json
admin/
The admin dashboard (React)
modules/
Architecture v2: Decoupled logic (Auth, Product, etc.)
cli/
Medusa command line tools
design-system/
UI components for admin
www/
Marketing and landing pages
turbo.json
Turborepo configuration
package.json
Root workspace

Repository Info

Tech Stack

  • Engine-Node.js (Express)
  • Language-TypeScript
  • Database-PostgreSQL with MikroORM/Drizzle
  • Admin-React
  • Workflow-Medusa Workflows (Durable)

Architecture Notes

Medusa v2 has introduced a major shift towards a fully modular architecture. Instead of a monolithic core, commerce functionality is now split into independent 'Modules' (like Product, Cart, Order) that communicate via a central service bus. This allows developers to swap out core components or scale them independently. They also use 'Workflows' to manage complex, multi-step asynchronous business logic with built-in state management and retries.

Key Directories

  • packages/medusa/-The orchestration layer that ties all modules and plugins together
  • packages/modules/-The new home for decoupled business logic in the v2 architecture
  • packages/admin/-A highly extensible React-based dashboard for managing commerce data
  • packages/cli/-Essential tools for scaffolding and managing Medusa projects

Why This Structure?

Medusa is a prime example of modern, scalable Node.js architecture. Its transition to a modular system and its use of durable workflows make it an essential case study for building complex, mission-critical backend systems. It perfectly balances flexibility for developers with a robust core for commerce.

Share this template

Related Templates

© 2025 FolderStructure.dev