Skip to content

docs: document request middleware order#548

Open
220nightmore-spec wants to merge 1 commit into
Liquifact:mainfrom
220nightmore-spec:docs-request-lifecycle-order-520
Open

docs: document request middleware order#548
220nightmore-spec wants to merge 1 commit into
Liquifact:mainfrom
220nightmore-spec:docs-request-lifecycle-order-520

Conversation

@220nightmore-spec

Copy link
Copy Markdown

Summary

Closes #520.

Updates docs/request-lifecycle-middleware-order.md so it reflects the current src/app.js bootstrap and the reusable route stacks in src/middleware/stacks.js.

Covered in the updated guide:

  • the outer createStandardizedApp() response-envelope wrapper
  • global middleware order before routes
  • KYC webhook raw-body parsing before the global JSON parser
  • request/correlation identifier behavior
  • body-size guard behavior and invoice route-local limits
  • inline route registration order
  • feature router mount order and important local middleware chains
  • reusable auth stack ordering
  • metrics, 404, and error-handler ordering

Validation

  • git diff --check
  • Verified referenced source paths exist:
    • src/app.js
    • src/middleware/stacks.js
    • src/utils/routeMountRegistry.js
    • src/routes/invest.js
    • src/routes/marketplace.js
    • src/routes/retention.js

No runtime tests were run because this is a docs-only change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document the request lifecycle and middleware execution order from app.js bootstrap

1 participant