Repo map

Ghost architecture.

Ghost is a publishing platform for websites, memberships and newsletters. Nodeway mapped the TryGhost/Ghost repository at commit a6a9ba9, from 28 November 2026, and found 4,801 source files, 13,873 functions, classes and components and 336 routes. This page is drawn from that map.

Free to start. macOS (Apple silicon and Intel), Windows and Linux.
Source files
4,801
Functions and classes
13,873
Confirmed calls
17,005
Routes
336
Tables
0

How the code is laid out

Most of it is TypeScript: 3,777 files of 4,801, followed by JavaScript (997) and Shell (27).

The repository is split into 56 packages: folders with their own manifest, such as a package.json, pyproject.toml or go.mod. The largest are ghost (1,992 files), clients/admin (1,252 files), koenig/koenig-lexical (314 files), clients/shade (168 files), clients/portal (117 files) and clients/admin-x-framework (116 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.

  • ghost/package1,992 files336 routes
  • core/1,975 files336 routes
  • scripts/6 files
  • bin/4 files
  • clients/1,886 files
  • admin/package1,252 files
  • shade/package168 files
  • portal/package117 files
  • koenig/536 files
  • koenig-lexical/package314 files
  • kg-default-nodes/package111 files
  • kg-default-cards/package35 files
  • packages/198 files
  • testing/test-data/package49 files
  • app-sdk/package36 files
  • adapters/35 files
  • tools/104 files
  • scripts/package48 files
  • configs/29 files
  • gx/package27 files
  • contracts/53 files
  • app-contracts/package43 files
  • metafield-types/package10 files
  • .github/11 files
  • scripts/i18n-review/package5 files
  • hooks/4 files
  • actions/report-boot-benchmark/1 file
  • docker/8 files
  • stripe/2 files
  • analytics/1 file
  • fake-mailgun/1 file
  • .agents/4 files
  • bin/1 file
  • skills/migrate-internal-package/scripts/1 file
  • .claude/hooks/2 files
  • .devcontainer/2 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
clients/admin/src/main.tsx194 files
ghost/bin/validate-adapters.tsdefines main28 files
packages/app-sdk/src/cli.ts26 files
tools/gx/rebuild-in-development-tables.tsdefines main26 files
clients/shade/src/app.ts14 files
packages/app-sdk/src/backend/app.ts9 files

Routes

Nodeway found 336 routes and linked 3 to the function that handles them. They by HTTP method: GET 168, POST 82, PUT 55, DELETE 30, ALL 1. All are under ghost/core (336).

Some of them

RouteMethod
/*#createApp · ghost/core/server/services/machine-payments/adapters/x402-adapter.tsGET
/:tokengiftPreview · ghost/core/server/web/gift-preview/app.jsGET
/ghost/core/server/web/announcement/routes.jsGET
/ghost/core/server/web/comments/routes.jsPOST
/ghost/core/server/web/members/account/routes.tsPUT
/dbghost/core/server/web/api/endpoints/admin/routes.jsGET
/dbghost/core/server/web/api/endpoints/admin/routes.jsPOST
/dbghost/core/server/web/api/endpoints/admin/routes.jsDELETE

One request, traced

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

  1. GET /:token/imageroute · ghost/core/server/web/gift-preview/app.js
  2. giftPreviewImagefunction · ghost/core/server/web/gift-preview/controller.js:114
  3. getPreviewmethod · ghost/core/server/services/gifts/gift-service.ts:967
  4. getByTokenmethod · ghost/core/server/services/gifts/gift-bookshelf-repository.ts:171
  5. toGiftmethod · ghost/core/server/services/gifts/gift-bookshelf-repository.ts:364
  6. decodeGiftRowfunction · ghost/core/server/services/gifts/gift-codec.ts:61

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
cnfunction · clients/shade/src/lib/ds-utils.ts525
formatNumberfunction · clients/shade/src/lib/ds-utils.ts144
createTransactionalMigrationfunction · ghost/core/server/data/migrations/utils/migrations.ts101
createAddColumnMigrationfunction · ghost/core/server/data/migrations/utils/schema.ts97
useHandleErrorhook · clients/admin-x-framework/src/hooks/use-handle-error.ts84
useCurrentUserhook · clients/admin-x-framework/src/api/current-user.ts66
useFeatureFlaghook · clients/admin-x-framework/src/hooks/use-feature-flag.ts63
toDatabaseDatefunction · ghost/core/server/lib/db-types/date.ts60

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/TryGhost/Ghost.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 cn 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 Ghost written in?

Mostly TypeScript: 3,777 of its 4,801 source files at commit a6a9ba9, then JavaScript with 997.

Where does the Ghost code start?

The entry point that reaches the most code is clients/admin/src/main.tsx, which leads to 194 files through its imports.

How many routes does Ghost have?

Nodeway found 336 routes, 3 of them linked to a handler. The most are under ghost/core.

How this page was made

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