Compare server-side rendering (SSR), client-side loading, and React Server Components (RSC) streaming in a Rails app. The demo includes product search, product and restaurant details, blog posts, and cached variants.
Open the same page in each rendering mode to compare its loading behavior and browser JavaScript:
| Page | SSR | Client | RSC |
|---|---|---|---|
| Blog post | SSR | Client | RSC |
| Product detail | SSR | Client | RSC |
| Restaurant detail | SSR | Client | RSC |
| Product search | SSR | Client | RSC |
Browse products opens the RSC product search. Each family also has SSR and RSC cached variants; start with the cached SSR blog and cached RSC blog. See the cached-variant measurements for cache state and test conditions.
Other examples:
- Product pull mode: bidirectional async props and server caching; design and measurements.
- Media gallery: video and image galleries rendered RSC-first.
- CSS code splitting: compare SSR, RSC server components, and RSC client components; the experiment report describes the observed CSS delivery limitations.
- Interactive SSR/RSC playground and how RSC works.
This is a curated tour. The route contract lists the full GET-route inventory, including experiments with feature flags or other prerequisites. Those experiments are not part of the default tour.
Prerequisites: Ruby 3.4.9, PostgreSQL, Node 22.12+ (or a supported Node 20 release listed in package.json), and pnpm 9.15.2. Ruby and JavaScript dependencies are pinned in Gemfile and package.json.
bundle install
pnpm install --frozen-lockfile
bin/rails db:prepare
bin/devOpen localhost:3000, then use the same paths as the live-demo links above. bin/dev runs Rails, asset watchers, and the Node renderer together. Rails uses port 3000 and the renderer defaults to port 3800.
The app uses Rails 8.1, React 19, React on Rails Pro, TypeScript, and Tailwind CSS. Production builds use Rspack through Shakapacker; Webpack configurations remain available for comparison. See the bundler migration notes for details.
db:prepare uses the default SEED_MODE=small on a new database. This still creates substantial review data and may take several minutes. SEED_MODE=full is an opt-in large restaurant dataset, not a prerequisite for browsing the demo. The seed entry point selects the restaurant seed mode and also seeds products, product reviews, and the search catalog.
Dataset sizes depend on seed mode and the deployed database. Product counts and review counts describe different things; the old planning targets do not describe every deployment.
With the app running, check health and the actual product-search API:
curl --fail http://localhost:3000/up
curl --fail http://localhost:3000/api/product_search/resultsThe search response includes total_count, which reports the current matching product count.
- Open the blog's SSR, client, and RSC links from the table. Compare when content appears and inspect JavaScript requests in browser developer tools.
- Repeat with product search; use the same filters and pagination to compare equivalent results.
- Open the performance evidence page to inspect the linked reports and their measurement conditions.
Performance depends on the page, device, network, cache state, dataset, and build. This README makes no universal speedup claim. PERFORMANCE_EVIDENCE.md records dated measurements and their limitations; BENCHMARKING.md explains how to reproduce measurements and compare changes.
- CONTRIBUTING.md: development setup, RSpec, lint, browser journeys, and PR expectations.
- DOCS_MANIFEST.md: current guides and experiment reports.
- Deployment guide: Control Plane environments and review apps.
- React on Rails documentation.
- TanStack Query integration: an option for interactive client-owned state alongside RSC; companion starter.
The original implementation plan and task specifications are historical design material. Their routes, commands, performance targets, and completion checklists are not current operating instructions.
The documentation route guard checks this README and the contributor guide against the canonical route contract. It also checks local file links and executable entry points. Update those documents when changing routes; see the guard.