Repo map

Medusa architecture.

Medusa is a commerce platform. Nodeway mapped the medusajs/medusa repository at commit 01f39c4, from 27 November 2026, and found 10,051 source files, 14,081 functions, classes and components, 50 routes and 36 database tables. This page is drawn from that map.

Free to start. macOS (Apple silicon and Intel), Windows and Linux.
Source files
10,051
Functions and classes
14,081
Confirmed calls
23,345
Routes
50
Tables
36

How the code is laid out

Most of it is TypeScript: 8,824 files of 10,051, followed by JavaScript (689), Shell (535) and Python (3).

The repository is split into 115 packages: folders with their own manifest, such as a package.json, pyproject.toml or go.mod. The largest are www (2,303 files), packages/admin/dashboard (1,983 files), www/apps/api-reference (1,054 files), packages/core/core-flows (869 files), packages/medusa (796 files) and packages/core/types (742 files).

These are its top-level folders by number of source files, with 5 more files at the root. The biggest ones show their own largest folders underneath.

  • packages/7,635 files4 routes · 36 tables
  • core/2,288 files36 tables
  • admin/2,076 files2 routes
  • modules/1,087 files
  • medusa/package796 files1 route
  • design-system/651 files
  • plugins/455 files
  • www/package2,303 files43 routes
  • apps/1,499 files43 routes
  • packages/480 files
  • utils/package316 files
  • integration-tests/package62 files3 routes
  • http/package31 files
  • modules/package14 files3 routes
  • helpers/6 files
  • scripts/45 files
  • deps-update/8 files
  • deps-analyze/2 files
  • .claude/skills/generating-icons/scripts/1 file

Where the code starts

Nodeway looked for files that define a main function, and for files named like a starting point (main, server, app, cli and similar) that at most one other file imports, then for index files that nothing imports. Ranked that way, then by how many files each one reaches through its imports:

FileReaches
packages/medusa/src/commands/db/setup.tsdefines main1,206 files
packages/medusa/src/commands/db/migrate.tsdefines main1,204 files
packages/admin/dashboard/src/main.tsx625 files
www/utils/packages/docs-generator/src/commands/run.ts41 files
www/apps/resources/scripts/prepare.mjsdefines main39 files
www/utils/packages/release-banner/src/cli.ts15 files

Routes

Nodeway found 50 routes, 5 of them pages, and linked 35 to the function that handles them. The rest by HTTP method: GET 26, POST 10, HEAD 5, OPTIONS 4. Most are under www/apps (43), integration-tests/modules (3) and packages/admin (2).

Some of them

RouteMethod
/serve · packages/admin/admin-bundler/src/commands/serve.tsGET
/tagGET · www/apps/api-reference/app/tag/route.tsGET
/schemaGET · www/apps/api-reference/app/schema/route.tsGET
/versionsGET · www/apps/api-reference/app/versions/route.tsGET
/base-specsGET · www/apps/api-reference/app/base-specs/route.tsGET
/robots.txtGET · www/apps/book/app/robots.txt/route.tsGET
/api/changelogGET · www/apps/cloud/app/api/changelog/route.tsGET
/download/[area]GET · www/apps/api-reference/app/download/[area]/route.tsGET

Data model

Nodeway found 36 database tables. Code in the repository reads or writes 4 of them. The most used:

TableUsed by
product_option_value2 columns · links to product_option · packages/core/utils/src/dal/mikro-orm/__fixtures__/utils.ts2 read0 write
product_variant2 columns · links to product · packages/core/utils/src/dal/mikro-orm/__fixtures__/utils.ts2 read0 write
product_option1 column · links to product · packages/core/utils/src/dal/mikro-orm/__fixtures__/utils.ts1 read0 write
productpackages/core/utils/src/dal/mikro-orm/__fixtures__/utils.ts1 read0 write
deep_recursive_entity22 columns · links to deep_recursive_entity1 and deep_recursive_entity3 · packages/core/utils/src/dal/mikro-orm/__fixtures__/utils.ts0 read0 write
entity22 columns · links to entity1 · packages/core/utils/src/dal/mikro-orm/__fixtures__/utils.ts0 read0 write
entity2_with_un_decorated_prop2 columns · links to entity1_with_un_decorated_prop · packages/core/utils/src/dal/mikro-orm/__fixtures__/utils.ts0 read0 write
searchable_entity22 columns · links to searchable_entity1 · packages/core/utils/src/dal/mikro-orm/__fixtures__/utils.ts0 read0 write

One request, traced

Nodeway followed GET /md-content/[[...slug]] from its route to the code that handles it, then along confirmed calls.

  1. GET /md-content/[[...slug]]route · www/apps/api-reference/app/md-content/[[...slug]]/route.ts
  2. GETfunction · www/apps/api-reference/app/md-content/[[...slug]]/route.ts:177
  3. resolveMarkdownfunction · www/apps/api-reference/app/md-content/[[...slug]]/route.ts:144
  4. resolveMarkdown_function · www/apps/api-reference/app/md-content/[[...slug]]/route.ts:73
  5. fetchAssociatedSchemafunction · www/apps/api-reference/app/md-content/[[...slug]]/route.ts:37
  6. getPathForEnvfunction · www/apps/api-reference/utils/get-path-for-env.ts:3

The most-called code

Ranked by how many different functions call each one, counting only calls the analyzer could confirm from the code. These are often the helpers worth reading first.

FunctionCallers
createStepfunction · packages/core/workflows-sdk/src/utils/composer/create-step.ts591
MedusaContextfunction · packages/core/utils/src/modules-sdk/decorators/context-parameter.ts570
fetchmethod · packages/core/js-sdk/src/client.ts439
createWorkflowfunction · packages/core/workflows-sdk/src/utils/composer/create-workflow.ts415
queryKeysFactoryfunction · packages/admin/dashboard/src/lib/query-key-factory.ts410
InjectManagerfunction · packages/core/utils/src/modules-sdk/decorators/inject-manager.ts331
transformfunction · packages/core/workflows-sdk/src/utils/composer/transform.ts282
InjectTransactionManagerfunction · packages/core/utils/src/modules-sdk/decorators/inject-transaction-manager.ts250

Open this repo in Nodeway

Nodeway is a desktop app that draws this map on your own computer, so you can click into any folder, read the code beside the map and trace a request yourself. Clone the repository:

git clone https://github.com/medusajs/medusa.git
  • Install Nodeway for macOS, Windows or Linux: the getting started guide has every installer.
  • Open the cloned folder. The first map is drawn on your machine and nothing is uploaded.
  • Search for createStep and trace what it calls, or pick a route and follow it to the database.

New to reading a codebase this size? See how to understand a large codebase and how to read a call graph.

Questions

What language is Medusa written in?

Mostly TypeScript: 8,824 of its 10,051 source files at commit 01f39c4, then JavaScript with 689.

Where does the Medusa code start?

The entry point that reaches the most code is packages/medusa/src/commands/db/setup.ts, which leads to 1,206 files through its imports.

How many routes does Medusa have?

Nodeway found 50 routes, 35 of them linked to a handler. The most are under www/apps.

What database tables does Medusa use?

36 tables. The most used are product_option_value, product_variant and product_option.

How this page was made

Generated from a map Nodeway's analyzer (version 18) made of medusajs/medusa at commit 01f39c4, committed on 27 November 2026. Tests, dependencies and build output are mostly left out. A call counts only when the analyzer could confirm its target from the code, so real totals are higher. The project will have changed since.

More codebases, mapped

All repo maps

See your whole codebase in minutes.

Open a folder and Nodeway maps it on your own computer. No account, and nothing is uploaded.

More guides