StillWorking commited on
Commit
7d79684
·
verified ·
1 Parent(s): 95f0899

Upload frontend/src/routes/README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. frontend/src/routes/README.md +21 -0
frontend/src/routes/README.md ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Routes
2
+
3
+ TanStack Start uses **file-based routing**. Every `.tsx` file in this directory
4
+ defines a route. Do **not** create `src/pages/`, `src/routes/_app/index.tsx`, or
5
+ `app/layout.tsx` — those are Next.js / Remix conventions. The only root layout
6
+ is `src/routes/__root.tsx`.
7
+
8
+ ## Conventions
9
+
10
+ | File | URL |
11
+ | --- | --- |
12
+ | `index.tsx` | `/` |
13
+ | `about.tsx` | `/about` |
14
+ | `users/index.tsx` | `/users` |
15
+ | `users/$id.tsx` | `/users/:id` (dynamic — bare `$`, no curly braces) |
16
+ | `posts/{-$category}.tsx` | `/posts/:category?` (optional segment) |
17
+ | `files/$.tsx` | `/files/*` (splat — read via `_splat` param, never `*`) |
18
+ | `_layout.tsx` | layout route (renders children via `<Outlet />`) |
19
+ | `__root.tsx` | app shell — wraps every page; preserve `<Outlet />` |
20
+
21
+ `routeTree.gen.ts` is auto-generated. Don't edit it by hand.