feat: migrate to TanStack Start + React on Cloudflare - #33
Merged
Conversation
- Add vite.config.ts with cloudflare, tanstackStart, and react plugins - Add router, root/index routes, and server entry re-exporting TanStack handler - Update tsconfig for React JSX and vite/client types - Point wrangler main to src/server.ts - Update dev/build/preview/deploy scripts for Vite - Add .output and node_modules/.vite to gitignore Co-authored-by: Jack McNicol <jackmcpickle@users.noreply.github.com>
Create file routes for all minimum HTML pages, reusing existing page components with createServerFn loaders that call cached-aggregate and Cloudflare env bindings. Add site.api.ts and board.api.ts server functions, request-auth helpers, embedded Layout support, and font preconnects in root. Co-authored-by: Jack McNicol <jackmcpickle@users.noreply.github.com>
Convert pages to React, serve HTML via TanStack Start file routes and createServerFn loaders, and keep Hono for API/agent/OG/reporter/cookie routes. Preserve existing functionality and unit tests. Co-authored-by: Jack McNicol <jackmcpickle@users.noreply.github.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
tokentally | 99b19b0 | Aug 06 2026, 02:16 PM |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Treat only Sec-Fetch-Mode navigate as a browser signal so Workers/Vite injected cors mode does not force HTML for curl/agents. Stop validateSearch from rewriting bare URLs with default query params. Co-authored-by: Jack McNicol <jackmcpickle@users.noreply.github.com>
TanStack regenerates src/routeTree.gen.ts with its own formatting, which was failing CI oxfmt --check. Co-authored-by: Jack McNicol <jackmcpickle@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates tokenmaxer.quest from Hono + hono/jsx SSR to TanStack Start + React on Cloudflare Workers, while keeping the existing Hono JSON/API, agent markdown, OG images, reporter script, and cookie mutation routes.
Architecture
createServerFnloaders (src/routes/*,src/core/api/*)/api/*,/tokentally.mjs,/llms*,*.md, OG PNGs,/invite,/auth,/h/*/joinsrc/server.ts) dispatches by path + Accept / Sec-Fetch-Modesrc/pages/*(converted from hono/jsx)Patterns
Adapted from delacour-agent-skills (
dlc-scaffold-tanstack): file routes,createServerFn, server-only DB access. Uses Cloudflare Vite plugin instead of Nitro bun (required for existing Workers/D1/KV deploy).Verification
pnpm checkgreen locally (362 tests)pnpm build+pnpm previewsmoke (HTML pages, API, agent markdown, reporter)https://tokenmaxer.quest— Workers Builds for this PR; asset hashes match the branch build)Sec-Fetch-Mode: navigatecounts as browser (Workers/Vite injectscors)Notable follow-ups