Archestra: a map of its architecture, in its own 22 layers.

Archestra writes its architecture down: platform/backend/layers.mjs puts every backend file in one of 22 layers, and a dependency-cruiser check keeps the imports in line. Wingbox built the graph of the repository, with no model, and the map draws it in those layers: 2,204 files and 10,757 dependencies, each file on the plane of its layer. Click a file to see what a change to it reaches.

The Archestra backend on 22 layer planes; a change to src/models/index.ts reaches 488 files within 2 hops
Open the live mapRead the report
The report

What Wingbox wrote on the whole repository

REPORT.md as the tool wrote it, without its own guesses of architecture layers: the layers of this page come from layers.mjs.

Wingbox report: archestra

Generated on 2026-11-16 by wingbox 0.2.5 from the code graph of this project. Open map.html in this folder for the interactive map.

Key findings

  • A change to platform/shared/index.ts reaches 4,820 of 7,980 modules (60%) within 2 hops; 2,295 modules depend on it directly.

Summary

Modules7,980
Dependencies between modules39,229
Functions, constants, classes and types50,759
Languagests 5,676, tsx 1,824, py 179, js 146, rs 145, go 6, cs 4

Most depended-on modules

A change in one of these files reaches the most code (test files are left out). "Within 2 hops" counts the modules that depend on it directly or through one other module.

FileDirect dependentsWithin 2 hops
platform/shared/index.ts2,2954,820
platform/backend/src/types/index.ts1,4052,590
platform/backend/src/models/index.ts9051,424
platform/backend/src/config.ts8452,378
platform/backend/src/database/index.ts8361,792
platform/backend/src/logging/index.ts5722,618
platform/frontend/src/components/ui/button.tsx4961,134
platform/frontend/src/lib/auth/auth.query.ts479986
platform/backend/src/fastify-instance.ts462599
platform/frontend/src/lib/utils/tailwind.ts4341,331
platform/frontend/src/lib/config/config.query.ts233460
platform/backend/src/models/resource-permission-policy.ts227823
platform/frontend/src/lib/hooks/use-app-name.ts214455
platform/frontend/src/lib/organization.query.ts192538
platform/frontend/src/components/ui/tooltip.tsx181535

Where to start reading

Files that nothing else depends on and that pull in the most modules:

  • platform/frontend/src/app/layout.tsx, depends on 25 modules
  • platform/frontend/src/app/settings/messaging-channels/ms-teams/page.tsx, depends on 19 modules
  • ai-labs/runner/src/lib.rs, depends on 15 modules
  • platform/frontend/src/app/settings/messaging-channels/email/page.tsx, depends on 15 modules
  • platform/frontend/src/app/settings/messaging-channels/slack/page.tsx, depends on 14 modules
  • platform/frontend/src/app/settings/messaging-channels/telegram/page.tsx, depends on 14 modules
  • platform/backend/src/standalone-scripts/seed-mock-data.ts, depends on 11 modules
  • platform/benchmarks/claude-native-project-pilot.mjs, depends on 11 modules
  • platform/benchmarks/codex-native-project-pilot.mjs, depends on 10 modules
  • platform/archestra-cli/src/main.rs, depends on 8 modules

Next steps

Check what a change will reach before you make it:

wingbox impact platform/shared/index.ts

Rebuild after the code changes with wingbox build. This report and the map are rewritten on every build.

Limits

The graph comes from static parsing. Dependencies created at run time (dependency injection, reflection, generated code) are not visible here.

What it says

Two tools, one picture

The dependency-cruiser check of the repository and Wingbox were written apart and read the code in different ways. They read the architecture the same way, import for import: the declared layers hold in both.

22

layers declared in layers.mjs, from schema at the bottom to server at the top: the source of truth for the map and for this page.

2,204

backend files placed in the 22 layers, 616 of them by a pin in layers.mjs. The other 2,091 are tests and helpers, which the rules leave out.

38,785

TypeScript and JavaScript dependencies in the whole repository, equal to the 38,785 that a separately written import resolver finds.

What Wingbox adds

How far a change travels, layer by layer

The check says whether an import is allowed. The same graph also answers the question an agent, or a reviewer, has before an edit: what depends on this file, and in which layers.

227
files import it directly
823
files within two hops
src/models/resource-permission-policy.ts
layer: models
  • imports it directly
  • through one other file
server10
routes-rest34
routes-chat3
routes-proxy34
mcp32
services20
policy12
services-support37
policy-config11
connections4
kb5
kb-connectors
kb-core4
provider-adapters
llm-protocol6
runtime7
llm-clients4
models-upper34
models-agents15
models ●28
core
schema

Tests and files outside the layers: 173 directly, 350 through one other file.

A possible simplification

A shorter allowlist: 18 files could be pinned lower

The allowlist of upward imports points at 46 files. 18 of them import nothing above the layer of their lowest importer: pinned there as they are, they need no allowlist entry, and 40 entries would go.

The first ten of 18. The graph sees imports, not the reasons behind them: a pin may wait on a compiler budget or on who owns the file. Three of these were also read in the source at this commit (a2a-base.ts, ngrok-tunnel-manager.ts, hook-run-parts.ts): they import only the schema, core and models layers.

For agents

The answer an agent gets before it edits

One command gives the two counts, the first 200 of the 823 files and the files to read first: 221 lines, about 5,985 tokens, instead of a search through 7,980 modules. With --all it prints every file.

$ wingbox impact platform/backend/src/models/resource-permission-policy.ts 2
Impact of changing platform/backend/src/models/resource-permission-policy.ts
  direct dependents   227
  within 2 hops       823

Depth 1
  platform/backend/src/agents/chatops/chatops-manager.ts                                                   imports
  platform/backend/src/agents/incoming-email/index.test.ts                                                 imports
  platform/backend/src/archestra-mcp-server/agent-resources.ts                                             imports
  platform/backend/src/archestra-mcp-server/agents.test.ts                                                 imports
  platform/backend/src/archestra-mcp-server/apps.test.ts                                                   imports
  platform/backend/src/archestra-mcp-server/hooks.test.ts                                                  imports
  platform/backend/src/archestra-mcp-server/mcp-servers.test.ts                                            imports
  platform/backend/src/archestra-mcp-server/openappa-bind-credential.test.ts                               imports
  ... 208 more lines
An idea

Wingbox as an MCP server in Archestra

Before an agent edits a file it asks two things: which layer is this file in, by layers.mjs, and what does a change to it reach. The answers come from the graph, in a few hundred to a few thousand tokens, on the machine where the code is: no model and no network.

Method

How this was made

  • The graph: Wingbox 0.2.5 from PyPI on the whole repository at commit 7765354, 2026-11-16. 7,980 modules: ts 5,676, tsx 1,824, py 179, js 146, rs 145, go 6, cs 4.
  • Checked against the code: 38,785 TypeScript and JavaScript dependencies equal to an import resolver written apart from Wingbox; Python 13 of 13 with 0 wrong and 0 missing.
  • The layers: platform/backend/layers.mjs was read as text, never run, and applied the way its layerOf() does: a pinned file belongs to the layer that pins it, any other file to the first layer whose path matches, tests to none.
  • The comparison: every dependency of the graph that goes from a layer to a higher one, against layers.known-upward-imports.json: the same imports, none extra and none missing.
  • The map: the Wingbox 0.2.5 map of the backend, each file on the plane its layers.mjs layer gives it; tests and files no layer names are left out. The report: REPORT.md as Wingbox wrote it, without its own layer guesses.
  • What is not here: Wingbox's own guess of architecture layers. Its built-in rules know one convention and would misread this codebase; the repository's layers.mjs is the source of truth for this page.

Made from the public repository archestra-ai/archestra.