openthunder lens generate --no-narrate && openthunder lens export. ← Evidence GalleryArchitecture health: 30/100 (F)
vite is a JavaScript/TypeScript pnpm monorepo, built with React, Vue, Svelte, Vite, and Express. It runs as 9 frontends (test-alias, test-devtools, test-environment-react-ssr, test-extensions, test-external, test-json, test-legacy, test-optimize-deps, test-optimize-deps-no-discovery), 2 backend services (test-css-lightningcss-proxy, test-optimize-missing-deps), and 2 CLIs (test-cli, test-cli-module), backed by 64 shared packages. The main structural risks to watch: 15 oversized "god" files and 18 circular import chains. The file with the widest blast radius is packages/vite/src/node/utils.ts: 70 files depend on it at runtime; part of an import cycle; oversized and doing too much.
_This entire analysis runs on your machine with no AI required. Connect a model provider to also narrate the reasoning and recover decisions._
playground/css-lightningcss-proxy/ Start here: the primary entry point of the system.packages/vite/src/node/utils.ts Core module: 78 other modules depend on it, so it shapes much of the system.packages/vite/src/shared/utils.ts Core module: 58 other modules depend on it, so it shapes much of the system.packages/vite/src/node/config.ts Core module: 52 other modules depend on it, so it shapes much of the system.packages/vite/src/node/plugin.ts Core module: 40 other modules depend on it, so it shapes much of the system.playground/ssr-deps/src/app.js Key flow: Authentication, a high-risk path that enters at invoke app.js (playground/ssr-deps/src/app.js).packages/vite/src/module-runner/constants.ts Key flow: Mission execution, a high-risk path that enters at invoke constants.ts (packages/vite/src/module-runner/constants.ts).packages/create-vite/src/index.ts Key flow: File changes / writes, a high-risk path that enters at invoke index.ts (packages/create-vite/src/index.ts).packages/plugin-legacy/src/index.ts Key flow: Background jobs, a medium-risk path that enters at scheduled trigger (packages/plugin-legacy/src/index.ts).packages/vite/src/node/constants.ts Change with care: 31 files depend on it at runtime.flowchart TD
subgraph sys_boundary["vite"]
create_vite["create-vite"]
plugin_legacy["plugin-legacy"]
vite["vite"]
test_legacy["test-legacy"]
collapsed_units["73 more units, no cross-unit imports: vite-lit-starter, vite-lit-ts-starter, vite-preact-starter +70"]
end
create_vite -->|uses| vite
test_legacy -->|uses| plugin_legacy
class create_vite library
class plugin_legacy library
class vite library
class test_legacy frontend
class collapsed_units muted
%% collapsed (no cross-unit imports): vite-lit-starter, vite-lit-ts-starter, vite-preact-starter, vite-preact-ts-starter, vite-qwik, vite-qwik, vite-react-starter, vite-react-typescript-starter, vite-solid-starter, vite-solid-typescript-starter, vite-svelte-starter, vite-svelte-ts-starter, vite-starter, vite-typescript-starter, vite-vue-starter, vite-vue-typescript-starter, types, test-alias, test-assets, test-assets-sanitize, test-backend-integration, test-base-conflict, test-build-old, test-chunk-importmap, test-cli, test-cli-module, test-client-reload, test-csp, test-css, test-css-codesplit, test-css-codesplit-cjs, test-css-lightningcss, test-css-lightningcss-proxy, test-css-lightningcss-root, test-css-no-codesplit, test-css-sourcemap, test-blue-app, test-green-app, test-data-uri, test-define, test-devtools, test-dynamic-import, test-dynamic-import-inline, test-env, test-env-nested, test-environment-react-ssr, test-extensions, test-external, test-forward-console, test-fs-serve, test-import-context, test-hmr, test-hmr-full-bundle-mode, test-hmr-ssr, test-html, test-import-attribute, test-js-sourcemap, test-json, test-my-lib, test-minify, test-hmr, test-multiple-entrypoints, test-nested-deps, test-object-hooks, test-optimize-deps, test-optimize-deps-no-discovery, test-optimize-missing-deps, test-preload, test-preserve-symlinks, test-proxy-bypass, test-proxy-hmr, test-other-app, test-resolve
classDef frontend fill:#2563eb,stroke:#93c5fd,color:#fff,stroke-width:2px;
classDef service fill:#059669,stroke:#6ee7b7,color:#fff,stroke-width:2px;
classDef store fill:#d97706,stroke:#fcd34d,color:#fff,stroke-width:2px;
classDef queue fill:#9333ea,stroke:#d8b4fe,color:#fff,stroke-width:2px;
classDef job fill:#4f46e5,stroke:#a5b4fc,color:#fff,stroke-width:2px;
classDef external fill:#475569,stroke:#cbd5e1,color:#fff,stroke-width:2px;
classDef aiprovider fill:#e11d48,stroke:#fda4af,color:#fff,stroke-width:2px;
classDef library fill:#0891b2,stroke:#67e8f9,color:#fff,stroke-width:2px;
classDef cli fill:#0d9488,stroke:#5eead4,color:#fff,stroke-width:2px;
classDef user fill:#64748b,stroke:#e2e8f0,color:#fff,stroke-width:2px;
classDef muted fill:#334155,stroke:#64748b,color:#cbd5e1,stroke-width:1px;
Entry: invoke app.js (playground/ssr-deps/src/app.js)
Authentication guards every protected resource; a regression here can expose data or grant unauthorized access.
sequenceDiagram actor C0 as Caller participant F0 as app.js C0->>F0: invoke app.js
Entry: invoke constants.ts (packages/vite/src/module-runner/constants.ts)
Mission execution drives autonomous code changes; errors here corrupt runs or the target repository.
sequenceDiagram actor C0 as Caller participant F0 as constants.ts participant F1 as importMeta.ts participant F2 as createImportMeta.ts participant F3 as esmEvaluator.ts participant F4 as evaluatedModules.ts participant F5 as hmrHandler.ts C0->>F0: invoke constants.ts
Entry: invoke index.ts (packages/create-vite/src/index.ts)
writes files to the working tree (disk)
Direct writes to the working tree are hard to reverse; an unguarded write can clobber user code.
sequenceDiagram actor C0 as Caller participant F0 as index.ts participant Disk as disk C0->>F0: invoke index.ts F0->>Disk: writes files to the working tree
Entry: scheduled trigger (packages/plugin-legacy/src/index.ts)
Background jobs run unattended; failures are silent and can pile up unnoticed.
sequenceDiagram actor C0 as Scheduler participant F0 as index.ts C0->>F0: scheduled trigger
packages/vite/src/node/utils.ts (score 150.3): 70 files depend on it at runtime; part of an import cycle; oversized and doing too muchpackages/vite/src/shared/utils.ts (score 98.3): 49 files depend on it at runtimepackages/vite/src/node/constants.ts (score 63): 31 files depend on it at runtimepackages/vite/src/node/config.ts (score 62.3): 7 files depend on it at runtime; types used by 33 modules; part of an import cycle; oversized and doing too muchplayground/multiple-entrypoints/entrypoints/a23.js (score 53.5): 24 files depend on it at runtime; part of an import cycleplayground/multiple-entrypoints/entrypoints/a24.js (score 53.3): 24 files depend on it at runtime; part of an import cycleplayground/multiple-entrypoints/entrypoints/a22.js (score 51.8): 23 files depend on it at runtime; part of an import cycleplayground/multiple-entrypoints/entrypoints/a21.js (score 50): 22 files depend on it at runtime; part of an import cycleplayground/multiple-entrypoints/entrypoints/a20.js (score 48.3): 21 files depend on it at runtime; part of an import cycleplayground/multiple-entrypoints/entrypoints/a19.js (score 46.5): 20 files depend on it at runtime; part of an import cycleplayground/multiple-entrypoints/entrypoints/a18.js (score 44.8): 19 files depend on it at runtime; part of an import cyclepackages/vite/src/node/server/index.ts (score 44.3): 6 files depend on it at runtime; types used by 15 modules; part of an import cycle; oversized and doing too muchThis file has a wide blast radius (fan-in 78, fan-out 11, risk score 150.3); a careless edit ripples through many dependents.
This file has a wide blast radius (fan-in 58, fan-out 1, risk score 98.3); a careless edit ripples through many dependents.
This file has a wide blast radius (fan-in 35, fan-out 1, risk score 63); a careless edit ripples through many dependents.
This file has a wide blast radius (fan-in 52, fan-out 32, risk score 62.3); a careless edit ripples through many dependents.
This file has a wide blast radius (fan-in 24, fan-out 2, risk score 53.5); a careless edit ripples through many dependents.
This file has a wide blast radius (fan-in 24, fan-out 1, risk score 53.3); a careless edit ripples through many dependents.
Circular dependencies make modules impossible to reason about or test in isolation and cause load-order bugs.
Large multi-purpose files are change magnets that accumulate coupling and resist testing; keeping them from growing limits the damage.
Deep cross-package imports defeat the module boundary, make refactors brittle, and create hidden coupling the build graph cannot see.