# Data flow — remix-run/remix

> Canonical page: https://codevetter.com/unpack/remix/data-flow

# Data flow — remix-run/remix

Scanned commit 27bd7a4401594ec1acbe30ee3937518832270a30 (2026-10-01). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

HTTP input becomes a Web Request and request context before middleware and route dispatch. Component output becomes a byte stream carrying HTML and client-entry metadata, which the browser uses to activate components and frames. OAuth data crosses a session-backed redirect boundary before application-owned identity persistence. CLI inputs and configuration follow separate Node filesystem and process boundaries.
- For one-argument handlers, createRequestListener constructs a Web Request, invokes the handler, and sends synchronous or asynchronous responses through sendResponseForRequest; request-construction and handler failures use separate error paths. — [packages/node-fetch-server/src/lib/request-listener.ts#L128-164](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/node-fetch-server/src/lib/request-listener.ts#L128-L164)
- Router.fetch creates RequestContext, assigns its router, and dispatches through global middleware before matching routes against context.url. — [packages/fetch-router/src/lib/router.ts#L321-328](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/fetch-router/src/lib/router.ts#L321-L328) [packages/fetch-router/src/lib/router.ts#L372-388](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/fetch-router/src/lib/router.ts#L372-L388) [packages/fetch-router/src/lib/router.ts#L589-597](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/fetch-router/src/lib/router.ts#L589-L597)
- dispatchMatch merges matched parameters into context.params and executes route middleware or the handler while racing against request abort. — [packages/fetch-router/src/lib/router.ts#L431-443](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/fetch-router/src/lib/router.ts#L431-L443)
- renderWith stores a per-request renderer as both a context key and context.render; render connects request URL, abort signal, frame resolution, and client entries to renderToStream and createHtmlResponse. — [packages/render-middleware/src/lib/render.ts#L23-41](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/render-middleware/src/lib/render.ts#L23-L41) [packages/render-middleware/src/lib/render-ui.ts#L73-90](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/render-middleware/src/lib/render-ui.ts#L73-L90)
- A file:-based clientEntry ID is split into source ID and export name, resolved with assets.getScriptEntry, and returned with href, import map, and preload metadata. — [packages/render-middleware/src/lib/render-ui.ts#L200-225](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/render-middleware/src/lib/render-ui.ts#L200-L225)
- The template browser entry imports each requested module through importModule, selects its named export, rejects non-functions, and supplies that loader to run(). — [template/app/actions/public/entry.ts#L1-23](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/template/app/actions/public/entry.ts#L1-L23)
- Asset requests accept GET/HEAD, normalize transform query data, parse mapped paths, and route CSS through styleCompiler; compiled script responses enforce fingerprints and distinguish missing/disallowed files from invalid transforms. — [packages/assets/src/lib/asset-server.ts#L666-705](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/assets/src/lib/asset-server.ts#L666-L705) [packages/assets/src/lib/asset-server.ts#L780-812](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/assets/src/lib/asset-server.ts#L780-L812)
- Session middleware parses the signed cookie, optionally validates embedded expiration, loads SessionStorage, installs context.session, then saves after downstream handling and appends Set-Cookie when storage returns a value. — [packages/session-middleware/src/lib/session.ts#L33-74](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/session-middleware/src/lib/session.ts#L33-L74) [packages/session-middleware/src/lib/session.ts#L78-99](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/session-middleware/src/lib/session.ts#L78-L99)
- External login generates state and a PKCE verifier, stores the transaction under __auth by default, and returns the provider authorization redirect; callback processing validates provider/state before invoking the provider runtime. — [packages/auth/src/lib/utils.ts#L10-26](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/auth/src/lib/utils.ts#L10-L26) [packages/auth/src/lib/start-external-auth.ts#L40-49](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/auth/src/lib/start-external-auth.ts#L40-L49) [packages/auth/src/lib/finish-external-auth.ts#L48-76](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/auth/src/lib/finish-external-auth.ts#L48-L76)
- resolveExternalAuth looks up the provider account, extracts profile details, updates or creates a user, optionally links by profile-derived email, then creates or updates the auth-account row. — [demos/social-auth/app/actions/auth/resolve-external-auth.ts#L21-74](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/demos/social-auth/app/actions/auth/resolve-external-auth.ts#L21-L74) [demos/social-auth/app/actions/auth/resolve-external-auth.ts#L76-109](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/demos/social-auth/app/actions/auth/resolve-external-auth.ts#L76-L109)
- Scaffolding resolves the target directory and application name, copies token-substituted template files, and rewrites package name, Remix dependency version, development dependencies, and Node engine constraints. — [packages/cli/src/lib/bootstrap-project.ts#L49-78](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/cli/src/lib/bootstrap-project.ts#L49-L78) [packages/cli/src/lib/bootstrap-project.ts#L138-162](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/cli/src/lib/bootstrap-project.ts#L138-L162) [packages/cli/src/lib/bootstrap-project.ts#L186-221](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/cli/src/lib/bootstrap-project.ts#L186-L221)
- Route inspection launches a Node subprocess that dynamically imports app/routes.ts, normalizes the exported routes object, writes JSON to stdout, and returns that output to the parent loader. — [packages/cli/src/lib/route-map.ts#L79-119](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/cli/src/lib/route-map.ts#L79-L119) [packages/cli/src/lib/load-route-map-worker.ts#L16-33](https://github.com/remix-run/remix/blob/27bd7a4401594ec1acbe30ee3937518832270a30/packages/cli/src/lib/load-route-map-worker.ts#L16-L33)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
