···11-Welcome to your new TanStack Start app!
22-33-# Getting Started
44-55-To run this application:
66-77-```bash
88-npm install
99-npm run dev
1010-```
1111-1212-# Building For Production
1313-1414-To build this application for production:
1515-1616-```bash
1717-npm run build
1818-```
1919-2020-## Testing
2121-2222-This project uses [Vitest](https://vitest.dev/) for testing. You can run the tests with:
2323-2424-```bash
2525-npm run test
2626-```
2727-2828-## Styling
2929-3030-This project uses [Tailwind CSS](https://tailwindcss.com/) for styling.
3131-3232-### Removing Tailwind CSS
3333-3434-If you prefer not to use Tailwind CSS:
3535-3636-1. Remove the demo pages in `src/routes/demo/`
3737-2. Replace the Tailwind import in `src/styles.css` with your own styles
3838-3. Remove `tailwindcss()` from the plugins array in `vite.config.ts`
3939-4. Uninstall the packages: `npm install @tailwindcss/vite tailwindcss -D`
4040-4141-## Linting & Formatting
4242-4343-This project uses [eslint](https://eslint.org/) and [oxfmt](https://oxc.rs/docs/guide/usage/oxfmt.html) for linting and formatting. Eslint is configured using [tanstack/eslint-config](https://tanstack.com/config/latest/docs/eslint). The following scripts are available:
4444-4545-```bash
4646-npm run lint
4747-npm run format
4848-npm run format:check
4949-npm run check
5050-```
5151-5252-## Routing
5353-5454-This project uses [TanStack Router](https://tanstack.com/router) with file-based routing. Routes are managed as files in `src/routes`.
5555-5656-### Adding A Route
5757-5858-To add a new route to your application just add a new file in the `./src/routes` directory.
5959-6060-TanStack will automatically generate the content of the route file for you.
6161-6262-Now that you have two routes you can use a `Link` component to navigate between them.
6363-6464-### Adding Links
6565-6666-To use SPA (Single Page Application) navigation you will need to import the `Link` component from `@tanstack/react-router`.
6767-6868-```tsx
6969-import { Link } from "@tanstack/react-router";
7070-```
7171-7272-Then anywhere in your JSX you can use it like so:
7373-7474-```tsx
7575-<Link to="/about">About</Link>
7676-```
7777-7878-This will create a link that will navigate to the `/about` route.
7979-8080-More information on the `Link` component can be found in the [Link documentation](https://tanstack.com/router/v1/docs/framework/react/api/router/linkComponent).
8181-8282-### Using A Layout
8383-8484-In the File Based Routing setup the layout is located in `src/routes/__root.tsx`. Anything you add to the root route will appear in all the routes. The route content will appear in the JSX where you render `{children}` in the `shellComponent`.
8585-8686-Here is an example layout that includes a header:
8787-8888-```tsx
8989-import { HeadContent, Scripts, createRootRoute } from "@tanstack/react-router";
9090-9191-export const Route = createRootRoute({
9292- head: () => ({
9393- meta: [
9494- { charSet: "utf-8" },
9595- { name: "viewport", content: "width=device-width, initial-scale=1" },
9696- { title: "My App" },
9797- ],
9898- }),
9999- shellComponent: ({ children }) => (
100100- <html lang="en">
101101- <head>
102102- <HeadContent />
103103- </head>
104104- <body>
105105- <header>
106106- <nav>
107107- <Link to="/">Home</Link>
108108- <Link to="/about">About</Link>
109109- </nav>
110110- </header>
111111- {children}
112112- <Scripts />
113113- </body>
114114- </html>
115115- ),
116116-});
117117-```
118118-119119-More information on layouts can be found in the [Layouts documentation](https://tanstack.com/router/latest/docs/framework/react/guide/routing-concepts#layouts).
120120-121121-## Server Functions
122122-123123-TanStack Start provides server functions that allow you to write server-side code that seamlessly integrates with your client components.
124124-125125-```tsx
126126-import { createServerFn } from "@tanstack/react-start";
127127-128128-const getServerTime = createServerFn({
129129- method: "GET",
130130-}).handler(async () => {
131131- return new Date().toISOString();
132132-});
133133-134134-// Use in a component
135135-function MyComponent() {
136136- const [time, setTime] = useState("");
137137-138138- useEffect(() => {
139139- getServerTime().then(setTime);
140140- }, []);
141141-142142- return <div>Server time: {time}</div>;
143143-}
144144-```
145145-146146-## API Routes
147147-148148-You can create API routes by using the `server` property in your route definitions:
149149-150150-```tsx
151151-import { createFileRoute } from "@tanstack/react-router";
152152-import { json } from "@tanstack/react-start";
153153-154154-export const Route = createFileRoute("/api/hello")({
155155- server: {
156156- handlers: {
157157- GET: () => json({ message: "Hello, World!" }),
158158- },
159159- },
160160-});
161161-```
162162-163163-## Data Fetching
164164-165165-There are multiple ways to fetch data in your application. You can use TanStack Query to fetch data from a server. But you can also use the `loader` functionality built into TanStack Router to load the data for a route before it's rendered.
11+# AtmosphereConf VODs
1662167167-For example:
33+A simple app to view the videos from AtmosphereConf 2026
1684169169-```tsx
170170-import { createFileRoute } from "@tanstack/react-router";
55+## AI Disclaimer
1716172172-export const Route = createFileRoute("/people")({
173173- loader: async () => {
174174- const response = await fetch("https://swapi.dev/api/people");
175175- return response.json();
176176- },
177177- component: PeopleComponent,
178178-});
179179-180180-function PeopleComponent() {
181181- const data = Route.useLoaderData();
182182- return (
183183- <ul>
184184- {data.results.map((person) => (
185185- <li key={person.name}>{person.name}</li>
186186- ))}
187187- </ul>
188188- );
189189-}
190190-```
191191-192192-Loaders simplify your data fetching logic dramatically. Check out more information in the [Loader documentation](https://tanstack.com/router/latest/docs/framework/react/guide/data-loading#loader-parameters).
193193-194194-# Demo files
195195-196196-Files prefixed with `demo` can be safely deleted. They are there to provide a starting point for you to play around with the features you've installed.
197197-198198-# Learn More
199199-200200-You can learn more about all of the offerings from TanStack in the [TanStack documentation](https://tanstack.com).
201201-202202-For TanStack Start specific documentation, visit [TanStack Start](https://tanstack.com/start).
77+I used AI to generate large parts of the code.
88+Added my special spice though.