Repo map

Directus architecture.

Directus is a backend that turns a SQL database into an API and admin app. Nodeway mapped the directus/directus repository at commit 4856582, from 23 November 2026, and found 2,800 source files, 7,461 functions, classes and components and 372 routes. This page is drawn from that map.

Free to start. macOS (Apple silicon and Intel), Windows and Linux.
Source files
2,800
Functions and classes
7,461
Confirmed calls
9,943
Routes
372
Tables
0

How the code is laid out

Most of it is TypeScript: 2,163 files of 2,800, followed by Vue (609) and JavaScript (28).

The repository is split into 37 packages: folders with their own manifest, such as a package.json, pyproject.toml or go.mod. The largest are app (1,169 files), api (856 files), sdk (215 files), packages/utils (75 files), packages/extensions-sdk (65 files) and packages/types (57 files).

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

  • app/package1,169 files107 routes
  • src/1,168 files107 routes
  • api/package856 files263 routes
  • src/854 files263 routes
  • packages/551 files2 routes
  • utils/package75 files
  • extensions-sdk/package65 files2 routes
  • types/package57 files
  • sdk/package215 files
  • src/213 files
  • .claude/hooks/3 files
  • directus/package2 files

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
api/src/cli/run.ts809 files
api/src/start.ts787 files
api/src/controllers/server.ts786 files
app/src/main.ts545 files
packages/extensions-sdk/src/cli/run.ts35 files
app/src/modules/settings/index.ts668 files

Routes

Nodeway found 372 routes and linked 253 to the function that handles them. They by HTTP method: POST 129, GET 125, PATCH 59, DELETE 58, OPTIONS 1. Most are under api/src (263), app/src (107) and packages/extensions-sdk (2).

Some of them

RouteMethod
/respond · api/src/auth/drivers/ldap.tsPOST
/respond · api/src/auth/drivers/oauth2.tsGET
/respond · api/src/controllers/access.tsPATCH
/respond · api/src/controllers/comments.tsDELETE
/merespond · api/src/controllers/permissions.tsGET
/merespond · api/src/controllers/users.tsPATCH
/acsrespond · api/src/auth/drivers/saml.tsPOST
/:pkrespond · api/src/controllers/activity.tsGET

One request, traced

Nodeway followed GET /admin from its route to the code that handles it, then along confirmed calls.

  1. GET /adminroute · api/src/app.ts
  2. createAppfunction · api/src/app.ts:93
  3. registerAuthProvidersfunction · api/src/auth.ts:31
  4. getDatabasefunction · api/src/database/index.ts:34
  5. createMetricsfunction · api/src/metrics/lib/create-metrics.ts:21
  6. hasDatabaseConnectionfunction · api/src/database/index.ts:177

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
useEnvhook · packages/env/src/lib/use-env.ts191
useLoggerhook · api/src/logger/index.ts179
throwIfEmptyfunction · sdk/src/rest/utils/throw-if-empty.ts140
unexpectedErrorfunction · app/src/utils/unexpected-error.ts133
getDatabasefunction · api/src/database/index.ts117
useFieldsStorehook · app/src/stores/fields.ts98
getSchemafunction · api/src/utils/get-schema.ts94
asyncHandlerfunction · api/src/utils/async-handler.ts89

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/directus/directus.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 useEnv 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 Directus written in?

Mostly TypeScript: 2,163 of its 2,800 source files at commit 4856582, then Vue with 609.

Where does the Directus code start?

The entry point that reaches the most code is api/src/cli/run.ts, which leads to 809 files through its imports.

How many routes does Directus have?

Nodeway found 372 routes, 253 of them linked to a handler. The most are under api/src.

How this page was made

Generated from a map Nodeway's analyzer (version 18) made of directus/directus at commit 4856582, committed on 23 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