Public evidence: generated by OpenThunder’s keyless engine (no AI) from expressjs/express@ae6dd37 on 2026-07-21. Reproduce it: openthunder lens generate --no-narrate && openthunder lens export. ← Evidence Gallery

express: Architecture

express · ae6dd37680e3 · generated 2026-07-21T00:12:11.056Z · static analysis

Architecture health: 77/100 (C)

Overview

express is a JavaScript/TypeScript project. It is a library of 1 package. The main structural risks to watch: 6 oversized "god" files. The file with the widest blast radius is test/support/utils.js: 10 files depend on it at runtime.

_This entire analysis runs on your machine with no AI required. Connect a model provider to also narrate the reasoning and recover decisions._

Where to start

  1. index.js Start here: how the system boots and wires its subsystems together.
  2. test/support/utils.js Core module: 10 other modules depend on it, so it shapes much of the system.
  3. lib/utils.js Core module: 7 other modules depend on it, so it shapes much of the system.
  4. lib/express.js Core module: 3 other modules depend on it, so it shapes much of the system.
  5. examples/mvc/db.js Core module: 3 other modules depend on it, so it shapes much of the system.
  6. examples/auth/index.js Key flow: Authentication, a high-risk path that enters at GET / (examples/auth/index.js).

System map

flowchart TD
  subgraph sys_boundary["express"]
    express["express"]
  end
  class express library
  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;

Critical flows

Application startup high risk

Entry: process start (index.js)

Boot wires every subsystem together; a fault here stops the whole process from starting. It also passes through a fragile zone (express.js), widening the blast radius.

sequenceDiagram
  actor C0 as Process
  participant F0 as index.js
  participant F1 as express.js
  C0->>F0: process start
  F0->>F1: calls

Authentication high risk

Entry: GET / (examples/auth/index.js)

returns a response to the caller (client)

Authentication guards every protected resource; a regression here can expose data or grant unauthorized access.

sequenceDiagram
  actor C0 as Caller
  participant F0 as auth/index.js
  participant F1 as cookie-sessions/index.js
  participant F2 as session/index.js
  participant F3 as redis.js
  C0->>F0: GET /
  F0-->>C0: returns a response to the caller
  F1-->>C0: returns a response to the caller
  F2-->>C0: returns a response to the caller
  F3-->>C0: returns a response to the caller

Fragile zones

Architecture rules

blocking Change test/support/utils.js with care: 10 files depend on it at runtime. Preserve its public signatures, keep changes additive where possible, and run/extend its tests before and after.

This file has a wide blast radius (fan-in 10, fan-out 0, risk score 20); a careless edit ripples through many dependents.

blocking Change lib/utils.js with care: 7 files depend on it at runtime. Preserve its public signatures, keep changes additive where possible, and run/extend its tests before and after.

This file has a wide blast radius (fan-in 7, fan-out 0, risk score 14); a careless edit ripples through many dependents.

advisory Change lib/express.js with care: 3 files depend on it at runtime. Preserve its public signatures, keep changes additive where possible, and run/extend its tests before and after.

This file has a wide blast radius (fan-in 3, fan-out 3, risk score 6.8); a careless edit ripples through many dependents.

advisory Change lib/response.js with care: 1 file depends on it at runtime; oversized and doing too much. Preserve its public signatures, keep changes additive where possible, and run/extend its tests before and after.

This file has a wide blast radius (fan-in 1, fan-out 1, risk score 6.3); a careless edit ripples through many dependents.

advisory Change examples/mvc/db.js with care: 3 files depend on it at runtime. Preserve its public signatures, keep changes additive where possible, and run/extend its tests before and after.

This file has a wide blast radius (fan-in 3, fan-out 0, risk score 6); a careless edit ripples through many dependents.

advisory Do not add new responsibilities to oversized files (test/app.router.js, lib/response.js, test/res.sendFile.js, test/express.static.js, test/express.urlencoded.js); extract new logic into focused modules instead.

Large multi-purpose files are change magnets that accumulate coupling and resist testing; keeping them from growing limits the damage.