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.

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.tsreaches 4,820 of 7,980 modules (60%) within 2 hops; 2,295 modules depend on it directly.
Summary
| Modules | 7,980 |
| Dependencies between modules | 39,229 |
| Functions, constants, classes and types | 50,759 |
| Languages | ts 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.
| File | Direct dependents | Within 2 hops |
|---|---|---|
platform/shared/index.ts | 2,295 | 4,820 |
platform/backend/src/types/index.ts | 1,405 | 2,590 |
platform/backend/src/models/index.ts | 905 | 1,424 |
platform/backend/src/config.ts | 845 | 2,378 |
platform/backend/src/database/index.ts | 836 | 1,792 |
platform/backend/src/logging/index.ts | 572 | 2,618 |
platform/frontend/src/components/ui/button.tsx | 496 | 1,134 |
platform/frontend/src/lib/auth/auth.query.ts | 479 | 986 |
platform/backend/src/fastify-instance.ts | 462 | 599 |
platform/frontend/src/lib/utils/tailwind.ts | 434 | 1,331 |
platform/frontend/src/lib/config/config.query.ts | 233 | 460 |
platform/backend/src/models/resource-permission-policy.ts | 227 | 823 |
platform/frontend/src/lib/hooks/use-app-name.ts | 214 | 455 |
platform/frontend/src/lib/organization.query.ts | 192 | 538 |
platform/frontend/src/components/ui/tooltip.tsx | 181 | 535 |
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 modulesplatform/frontend/src/app/settings/messaging-channels/ms-teams/page.tsx, depends on 19 modulesai-labs/runner/src/lib.rs, depends on 15 modulesplatform/frontend/src/app/settings/messaging-channels/email/page.tsx, depends on 15 modulesplatform/frontend/src/app/settings/messaging-channels/slack/page.tsx, depends on 14 modulesplatform/frontend/src/app/settings/messaging-channels/telegram/page.tsx, depends on 14 modulesplatform/backend/src/standalone-scripts/seed-mock-data.ts, depends on 11 modulesplatform/benchmarks/claude-native-project-pilot.mjs, depends on 11 modulesplatform/benchmarks/codex-native-project-pilot.mjs, depends on 10 modulesplatform/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.
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.
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.
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.
TypeScript and JavaScript dependencies in the whole repository, equal to the 38,785 that a separately written import resolver finds.
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.
- imports it directly
- through one other file
Tests and files outside the layers: 173 directly, 350 through one other file.
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.
| File | Layer today | Could sit in | Entries it removes |
|---|---|---|---|
| src/agents/a2a/a2a-base.ts | mcp | policy | 9 |
| src/ngrok-tunnel-manager.ts | server | mcp | 4 |
| src/hooks/hook-run-parts.ts | server | mcp | 4 |
| src/server/llm-proxy-timing.ts | server | mcp | 3 |
| src/routes/proxy/llm-proxy-helpers.ts | routes-proxy | policy | 3 |
| src/routes/chat/context-trimming.ts | routes-chat | mcp | 2 |
| src/services/agent-runtime/runtime-identity.ts | services | policy | 2 |
| src/server/llm-proxy-drain.ts | server | routes-chat | 2 |
| src/entrypoints/_shared/log-capture.ts | server | policy | 2 |
| src/routes/chat/token-bucket-refit.ts | routes-chat | mcp | 1 |
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.
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
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.
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.