From 245a4206329c582cdb4e43a3ed678665d286eaec Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 7 Aug 2026 04:15:09 +0000 Subject: [PATCH] Modified by www.SourceFiles.app --- src/routes/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/routes/README.md diff --git a/src/routes/README.md b/src/routes/README.md new file mode 100644 index 0000000..441a4e8 --- /dev/null +++ b/src/routes/README.md @@ -0,0 +1,21 @@ +# Routes + +TanStack Start uses **file-based routing**. Every `.tsx` file in this directory +defines a route. Do **not** create `src/pages/`, `src/routes/_app/index.tsx`, or +`app/layout.tsx` — those are Next.js / Remix conventions. The only root layout +is `src/routes/__root.tsx`. + +## Conventions + +| File | URL | +| --- | --- | +| `index.tsx` | `/` | +| `about.tsx` | `/about` | +| `users/index.tsx` | `/users` | +| `users/$id.tsx` | `/users/:id` (dynamic — bare `$`, no curly braces) | +| `posts/{-$category}.tsx` | `/posts/:category?` (optional segment) | +| `files/$.tsx` | `/files/*` (splat — read via `_splat` param, never `*`) | +| `_layout.tsx` | layout route (renders children via ``) | +| `__root.tsx` | app shell — wraps every page; preserve `` | + +`routeTree.gen.ts` is auto-generated. Don't edit it by hand.