Skip to content

Conversation

@birkskyum
Copy link
Member

@birkskyum birkskyum commented Nov 11, 2025

Summary by CodeRabbit

  • New Features
    • Added a new Solid Start with Bun example project showcasing a production-ready server with intelligent static asset preloading.
    • Includes demo routes demonstrating API endpoints and server functions.
    • Provides complete development and build setup with TypeScript, Tailwind CSS, ESLint, and Prettier configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

A complete Solid Start example project for Bun runtime is added, featuring configuration files, a production server with intelligent static asset preloading, generated routing infrastructure, route examples including API endpoints and server functions, and supporting documentation and tooling.

Changes

Cohort / File(s) Summary
Project Configuration
examples/solid/start-bun/{.gitignore,.prettierignore,package.json,tsconfig.json,vite.config.ts,eslint.config.js,prettier.config.js}
Configuration and tooling setup for the Bun-based Solid Start example, including dependency definitions, TypeScript compiler options, ESLint/Prettier presets, and Vite build configuration with Solid SSR and path alias support.
Documentation & Assets
examples/solid/start-bun/{README.md,public/manifest.json,public/robots.txt}
Project documentation detailing TanStack Start production server setup with Bun, and PWA/SEO configuration files.
VSCode Configuration
examples/solid/start-bun/.vscode/settings.json
Editor settings to exclude, hide, and protect the generated routeTree.gen.ts file from watching, searching, and editing.
Production Server
examples/solid/start-bun/server.ts
Bun-based production server with environment-driven configuration, intelligent static asset preloading strategy, memory-aware in-memory caching with ETag and gzip support, glob pattern matching for include/exclude filtering, and detailed verbose logging.
Application Root & Styles
examples/solid/start-bun/src/{routes/__root.tsx,styles.css}
Root route with HTML shell, HydrationScript, Header, DevTools integration, and global stylesheet with Tailwind CSS import.
Router Infrastructure
examples/solid/start-bun/src/{router.tsx,routeTree.gen.ts}
Router factory function with scroll restoration and route tree generation, including type augmentations for @tanstack/solid-router and @tanstack/solid-start.
Route Components & API
examples/solid/start-bun/src/routes/{index.tsx,api.demo-names.ts,demo.start.api-request.tsx,demo.start.server-funcs.tsx}
Home route with splash screen, API endpoint returning demo names, route demonstrating client-side API fetching, and route with server functions and file-based data persistence.
UI Components
examples/solid/start-bun/src/components/Header.tsx
Navigation header component with client-side routing links.

Sequence Diagram

sequenceDiagram
    participant Startup as Server Startup
    participant Scanner as Asset Scanner
    participant Preload as Memory Preloader
    participant Server as Bun HTTP Server
    participant Client as Client Request
    participant Assets as Asset Response

    Startup->>Scanner: Scan dist/ for assets
    Scanner->>Scanner: Apply glob patterns<br/>(include/exclude)
    Scanner->>Preload: Filter by size limits
    Preload->>Preload: Load small assets<br/>into memory
    Preload->>Preload: Compute ETags,<br/>gzip if configured
    Preload->>Server: Register routes &<br/>preloaded assets
    Server->>Server: Wire static routes<br/>+ catch-all handler

    Client->>Server: Request /path/to/asset
    alt Asset preloaded
        Server->>Assets: Return from memory<br/>(check ETag, gzip)
        Assets->>Client: 200 or 304 response
    else Asset not preloaded
        Server->>Assets: Read from disk<br/>on-demand
        Assets->>Client: 200 response
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Attention areas:
    • server.ts: Complex asset preloading logic with glob pattern matching, ETags, gzip compression, and verbose logging; verify correctness of regex conversion and memory management strategy
    • routeTree.gen.ts: Generated file with extensive type augmentations and module declarations; confirm expected structure and typing for router integration
    • demo.start.server-funcs.tsx: File I/O operations for todos.json persistence; verify safe file handling and atomicity of write operations
    • Environment variable documentation in README.md and usage in server.ts should be kept in sync

Possibly related PRs

Suggested labels

documentation

Suggested reviewers

  • schiller-manuel

Poem

🐰 A Bun-powered Start takes flight,
With routes pre-loaded, optimized tight,
Asset caching, smart and sleek,
Solid SSR at its peak!
From Solid roots to Bun's delight,
This example shines so bright! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs(solid-start)--start-bun-example

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 864a2e0 and bcf58fd.

⛔ Files ignored due to path filters (3)
  • examples/solid/start-bun/public/favicon.ico is excluded by !**/*.ico
  • examples/solid/start-bun/src/logo.svg is excluded by !**/*.svg
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (21)
  • examples/solid/start-bun/.gitignore (1 hunks)
  • examples/solid/start-bun/.prettierignore (1 hunks)
  • examples/solid/start-bun/.vscode/settings.json (1 hunks)
  • examples/solid/start-bun/README.md (1 hunks)
  • examples/solid/start-bun/eslint.config.js (1 hunks)
  • examples/solid/start-bun/package.json (1 hunks)
  • examples/solid/start-bun/prettier.config.js (1 hunks)
  • examples/solid/start-bun/public/manifest.json (1 hunks)
  • examples/solid/start-bun/public/robots.txt (1 hunks)
  • examples/solid/start-bun/server.ts (1 hunks)
  • examples/solid/start-bun/src/components/Header.tsx (1 hunks)
  • examples/solid/start-bun/src/routeTree.gen.ts (1 hunks)
  • examples/solid/start-bun/src/router.tsx (1 hunks)
  • examples/solid/start-bun/src/routes/__root.tsx (1 hunks)
  • examples/solid/start-bun/src/routes/api.demo-names.ts (1 hunks)
  • examples/solid/start-bun/src/routes/demo.start.api-request.tsx (1 hunks)
  • examples/solid/start-bun/src/routes/demo.start.server-funcs.tsx (1 hunks)
  • examples/solid/start-bun/src/routes/index.tsx (1 hunks)
  • examples/solid/start-bun/src/styles.css (1 hunks)
  • examples/solid/start-bun/tsconfig.json (1 hunks)
  • examples/solid/start-bun/vite.config.ts (1 hunks)

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

nx-cloud bot commented Nov 11, 2025

View your CI Pipeline Execution ↗ for commit bcf58fd

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

☁️ Nx Cloud last updated this comment at 2025-11-11 03:03:51 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 11, 2025

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5816

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5816

@tanstack/eslint-plugin-router

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

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5816

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5816

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5816

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5816

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5816

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5816

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5816

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5816

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5816

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5816

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5816

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5816

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5816

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5816

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5816

commit: bcf58fd

@birkskyum birkskyum marked this pull request as ready for review November 11, 2025 03:04
@birkskyum birkskyum merged commit 5302896 into main Nov 11, 2025
5 of 6 checks passed
@birkskyum birkskyum deleted the docs(solid-start)--start-bun-example branch November 11, 2025 03:05
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.

2 participants