Skip to content

docs(start): add Request Lifecycle guide#7511

Open
LadyBluenotes wants to merge 1 commit into
TanStack:mainfrom
LadyBluenotes:request-lifecycle
Open

docs(start): add Request Lifecycle guide#7511
LadyBluenotes wants to merge 1 commit into
TanStack:mainfrom
LadyBluenotes:request-lifecycle

Conversation

@LadyBluenotes
Copy link
Copy Markdown
Member

@LadyBluenotes LadyBluenotes commented May 30, 2026

Adds a new Request Lifecycle guide to the TanStack Start (React) docs that explains how a request flows through a Start app — from the server entry point, through global and route middleware, server routes, the server-function fast-path, and finally SSR.

As per #7499

Summary by CodeRabbit

Documentation

  • Added a comprehensive "Request Lifecycle" guide detailing how requests flow through the framework's server infrastructure, including middleware execution, routing, and server-side rendering phases
  • Included lifecycle diagrams and execution order documentation
  • Updated navigation to surface the new guide

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2d185fa9-6a79-4750-b521-db74385faf37

📥 Commits

Reviewing files that changed from the base of the PR and between 0ac831b and f7cea26.

📒 Files selected for processing (2)
  • docs/start/config.json
  • docs/start/framework/react/guide/request-lifecycle.md

📝 Walkthrough

Walkthrough

This PR adds a "Request Lifecycle" guide for TanStack Start that documents the complete request flow from HTTP entry through server middleware, optional fast-path handling, route matching, and finally SSR delegation with streaming. It includes navigation integration, a mermaid diagram, detailed stage-by-stage documentation, and a reference summary table.

Changes

Request Lifecycle Guide

Layer / File(s) Summary
Navigation entry and guide metadata
docs/start/config.json, docs/start/framework/react/guide/request-lifecycle.md (header)
Add "Request Lifecycle" to the React Guides navigation menu and establish document structure with id and title.
High-level request flow diagram
docs/start/framework/react/guide/request-lifecycle.md (lines 6–27)
Provide a visual overview of the complete request pipeline from HTTP entry through middleware, server functions, route matching, and SSR rendering using a mermaid diagram.
Server entry point and request context
docs/start/framework/react/guide/request-lifecycle.md (lines 28–67)
Document the universal fetch entry point via createServerEntry, default auto-generated behavior, and module augmentation pattern for typed request context that propagates through the server-side chain.
Global middleware and server function fast-path
docs/start/framework/react/guide/request-lifecycle.md (lines 68–108)
Explain global request middleware registration with next()-based flow control and context propagation; document the server function fast-path behavior for /_serverFn/ requests that bypass route matching and SSR.
Server routes and route-level middleware
docs/start/framework/react/guide/request-lifecycle.md (lines 109–178)
Document file-based server routes with handler definition patterns, HTTP method semantics, co-location of API handlers and rendered components, and route-level plus handler-level middleware layering with execution order.
Handler delegation and SSR execution
docs/start/framework/react/guide/request-lifecycle.md (lines 179–253)
Explain how handlers control flow delegation via Response return, next() deferral to SSR, or omission; detail SSR asset resolution, router load/dehydration, header building, HTML streaming, and custom stream handler configuration via createStartHandler.
Lifecycle summary and related guides
docs/start/framework/react/guide/request-lifecycle.md (lines 254–271)
Provide a concise reference table mapping each request pipeline stage to execution scope and request-ending capabilities, plus links to supporting documentation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

Suggested labels

documentation


🐰 A guide to the lifecycle flow,
Where requests through the server go—
From fetch to SSR's glow,
Each middleware plays its role,
And streaming makes the system whole.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs(start): add Request Lifecycle guide' is clear, concise, and directly summarizes the main change: adding a new Request Lifecycle guide to the TanStack Start documentation. It accurately reflects the content added across both the config file and the new guide document.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented May 30, 2026

View your CI Pipeline Execution ↗ for commit f7cea26

Command Status Duration Result
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 2m 6s View ↗
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-30 02:38:53 UTC

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 30, 2026

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/@tanstack/arktype-adapter@7511

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@7511

@tanstack/eslint-plugin-start

npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@7511

@tanstack/history

npm i https://pkg.pr.new/@tanstack/history@7511

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/@tanstack/nitro-v2-vite-plugin@7511

@tanstack/react-router

npm i https://pkg.pr.new/@tanstack/react-router@7511

@tanstack/react-router-devtools

npm i https://pkg.pr.new/@tanstack/react-router-devtools@7511

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/@tanstack/react-router-ssr-query@7511

@tanstack/react-start

npm i https://pkg.pr.new/@tanstack/react-start@7511

@tanstack/react-start-client

npm i https://pkg.pr.new/@tanstack/react-start-client@7511

@tanstack/react-start-rsc

npm i https://pkg.pr.new/@tanstack/react-start-rsc@7511

@tanstack/react-start-server

npm i https://pkg.pr.new/@tanstack/react-start-server@7511

@tanstack/router-cli

npm i https://pkg.pr.new/@tanstack/router-cli@7511

@tanstack/router-core

npm i https://pkg.pr.new/@tanstack/router-core@7511

@tanstack/router-devtools

npm i https://pkg.pr.new/@tanstack/router-devtools@7511

@tanstack/router-devtools-core

npm i https://pkg.pr.new/@tanstack/router-devtools-core@7511

@tanstack/router-generator

npm i https://pkg.pr.new/@tanstack/router-generator@7511

@tanstack/router-plugin

npm i https://pkg.pr.new/@tanstack/router-plugin@7511

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/@tanstack/router-ssr-query-core@7511

@tanstack/router-utils

npm i https://pkg.pr.new/@tanstack/router-utils@7511

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/@tanstack/router-vite-plugin@7511

@tanstack/solid-router

npm i https://pkg.pr.new/@tanstack/solid-router@7511

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/@tanstack/solid-router-devtools@7511

@tanstack/solid-router-ssr-query

npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@7511

@tanstack/solid-start

npm i https://pkg.pr.new/@tanstack/solid-start@7511

@tanstack/solid-start-client

npm i https://pkg.pr.new/@tanstack/solid-start-client@7511

@tanstack/solid-start-server

npm i https://pkg.pr.new/@tanstack/solid-start-server@7511

@tanstack/start-client-core

npm i https://pkg.pr.new/@tanstack/start-client-core@7511

@tanstack/start-fn-stubs

npm i https://pkg.pr.new/@tanstack/start-fn-stubs@7511

@tanstack/start-plugin-core

npm i https://pkg.pr.new/@tanstack/start-plugin-core@7511

@tanstack/start-server-core

npm i https://pkg.pr.new/@tanstack/start-server-core@7511

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/@tanstack/start-static-server-functions@7511

@tanstack/start-storage-context

npm i https://pkg.pr.new/@tanstack/start-storage-context@7511

@tanstack/valibot-adapter

npm i https://pkg.pr.new/@tanstack/valibot-adapter@7511

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/@tanstack/virtual-file-routes@7511

@tanstack/vue-router

npm i https://pkg.pr.new/@tanstack/vue-router@7511

@tanstack/vue-router-devtools

npm i https://pkg.pr.new/@tanstack/vue-router-devtools@7511

@tanstack/vue-router-ssr-query

npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@7511

@tanstack/vue-start

npm i https://pkg.pr.new/@tanstack/vue-start@7511

@tanstack/vue-start-client

npm i https://pkg.pr.new/@tanstack/vue-start-client@7511

@tanstack/vue-start-server

npm i https://pkg.pr.new/@tanstack/vue-start-server@7511

@tanstack/zod-adapter

npm i https://pkg.pr.new/@tanstack/zod-adapter@7511

commit: f7cea26

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.

1 participant