feat(web): bootstrap TanStack Start app - #753
Closed
aXenDeveloper wants to merge 4 commits into
Closed
Conversation
Adds `apps/web`, a new TanStack Start (Vite + Nitro) app that will eventually replace the Next.js frontend. Stage 0 only - no VitNode features are ported yet. - Vite config wiring `tanstackStart`, Tailwind 4 and Nitro, with workspace packages bundled rather than externalized for SSR. - TanStack Query set up in the router context and `Wrap` provider up front, so it does not have to be retrofitted later. - Tailwind entry reusing the VitNode design tokens from the Next app, with Geist served through Fontsource instead of `next/font`. - A home page and an `/admin` placeholder, which exist to exercise the two locale strategies landing in the next commit. TanStack packages are pinned to releases older than the repo's `minimumReleaseAge` policy cutoff, so no policy exemptions are needed. `vite` and `@vitejs/plugin-react` are pinned to the versions already in the lockfile to keep every existing resolution unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WSPLXkitYKMftPVD4L3CVf
`@vitnode/i18n` carries the locale logic for the TanStack Start app, built on `use-intl` so the existing `next-intl` message files and `useTranslations` call sites port over later without being rewritten. The default locale is served unprefixed (`/about`), every other locale is prefixed (`/pl/about`), and `/api/*` and `/admin/*` are never prefixed at all - they read the locale from the cookie instead. The cookie is the only persistence: `localStorage` is invisible to SSR and would flash the wrong language. Split into three cores so the bundler can keep them apart: `shared` is free of environment-specific imports and safe on both sides, `client` holds the URL rewriting and isomorphic detection, and `server` holds the request middleware that answers redirects before React starts rendering. The formatting time zone is pinned rather than inherited from the host, which otherwise differs between server and browser and turns every formatted date into a hydration mismatch. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WSPLXkitYKMftPVD4L3CVf
The locale lives only in the public URL: `rewrite.input` strips the prefix before the router matches, and `rewrite.output` puts it back on every href the router builds. So the route tree holds plain paths, and a `<Link to="/">` renders `/pl` on a Polish page without any route knowing that locales exist. An unknown prefix like `/xyz` is left alone, matches nothing and 404s, rather than quietly falling back to English. `src/start.ts` registers the locale request middleware, which is what makes `/en/*` and `/pl/admin` answer with a 301 - a route can throw `notFound()`, but by then the response has already started streaming. The root loader resolves the locale and returns its messages, so they travel to the client in the router's own SSR payload. The first client render is identical to the server's, and an English visitor never downloads the Polish chunk. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WSPLXkitYKMftPVD4L3CVf
`pnpm-workspace.yaml` needs no change - its `apps/*` and `packages/*` globs already cover both new workspaces. Adds a `typecheck` task, which both new workspaces expose, and `.output` to the cached build outputs so Turborepo knows what `vite build` leaves behind. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WSPLXkitYKMftPVD4L3CVf
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Adds
apps/web, a new TanStack Start (Vite + Nitro) app that willeventually replace the Next.js frontend. Stage 0 only - no VitNode
features are ported yet.
tanstackStart, Tailwind 4 and Nitro, withworkspace packages bundled rather than externalized for SSR.
Wrapprovider upfront, so it does not have to be retrofitted later.
with Geist served through Fontsource instead of
next/font./adminplaceholder, which exist to exercise thetwo locale strategies landing in the next commit.
TanStack packages are pinned to releases older than the repo's
minimumReleaseAgepolicy cutoff, so no policy exemptions are needed.viteand@vitejs/plugin-reactare pinned to the versions already inthe lockfile to keep every existing resolution unchanged.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01WSPLXkitYKMftPVD4L3CVf