Skip to content

Commit c40eb63

Browse files
committed
feat(example): Devinx tanstack start example
1 parent 6657fe1 commit c40eb63

File tree

14 files changed

+465
-1357
lines changed

14 files changed

+465
-1357
lines changed

eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default tseslint.config(
2121
'**/node_modules/**',
2222
'**/docs/.astro/**',
2323
'examples/realtime-next/**',
24+
'examples/realtime-tantsack-start/**',
2425
'examples/realtime-demo/**',
2526
'integration-tests//**',
2627
]),

examples/realtime-tantsack-start/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ dist-ssr
66
.env
77
.output
88
.vinxi
9+
.tanstack-start
10+
.nitro

examples/realtime-tantsack-start/app.config.timestamp_1749472294770.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

examples/realtime-tantsack-start/app.config.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

examples/realtime-tantsack-start/package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,23 @@
33
"private": true,
44
"type": "module",
55
"scripts": {
6-
"dev": "vinxi dev",
7-
"start": "vinxi start",
8-
"build": "vinxi build",
6+
"dev": "vite dev --port 3000",
7+
"build": "vite build",
8+
"start": "node .output/server/index.mjs",
99
"serve": "vite preview",
1010
"test": "vitest run"
1111
},
1212
"dependencies": {
1313
"@openai/agents": "workspace:*",
1414
"@tailwindcss/vite": "^4.1.8",
15-
"@tanstack/react-router": "^1.120.20",
16-
"@tanstack/react-router-devtools": "^1.120.20",
17-
"@tanstack/react-router-with-query": "^1.120.20",
18-
"@tanstack/react-start": "^1.120.20",
15+
"@tanstack/react-router": "^1.121.0-alpha.22",
16+
"@tanstack/react-router-devtools": "^1.121.0-alpha.22",
17+
"@tanstack/react-router-with-query": "^1.121.0-alpha.22",
18+
"@tanstack/react-start": "^1.121.0-alpha.25",
1919
"@tanstack/router-plugin": "^1.120.20",
2020
"react": "^19.1.0",
2121
"react-dom": "^19.1.0",
2222
"tailwindcss": "^4.1.8",
23-
"vinxi": "^0.5.6",
2423
"vite-tsconfig-paths": "^5.1.4"
2524
},
2625
"devDependencies": {

examples/realtime-tantsack-start/src/api.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples/realtime-tantsack-start/src/client.tsx

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/realtime-tantsack-start/src/routeTree.gen.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@
88
// You should NOT make any changes in this file as it will be overwritten.
99
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
1010

11+
import type { CreateFileRoute, FileRoutesByPath } from '@tanstack/react-router';
12+
1113
// Import Routes
1214

1315
import { Route as rootRoute } from './routes/__root';
14-
import { Route as IndexImport } from './routes/index';
16+
import { Route as IndexRouteImport } from './routes/index';
1517

1618
// Create/Update Routes
1719

18-
const IndexRoute = IndexImport.update({
20+
const IndexRoute = IndexRouteImport.update({
1921
id: '/',
2022
path: '/',
2123
getParentRoute: () => rootRoute,
@@ -29,12 +31,24 @@ declare module '@tanstack/react-router' {
2931
id: '/';
3032
path: '/';
3133
fullPath: '/';
32-
preLoaderRoute: typeof IndexImport;
34+
preLoaderRoute: typeof IndexRouteImport;
3335
parentRoute: typeof rootRoute;
3436
};
3537
}
3638
}
3739

40+
// Add type-safety to the createFileRoute function across the route tree
41+
42+
declare module './routes/index' {
43+
const createFileRoute: CreateFileRoute<
44+
'/',
45+
FileRoutesByPath['/']['parentRoute'],
46+
FileRoutesByPath['/']['id'],
47+
FileRoutesByPath['/']['path'],
48+
FileRoutesByPath['/']['fullPath']
49+
>;
50+
}
51+
3852
// Create and export the route tree
3953

4054
export interface FileRoutesByFullPath {

examples/realtime-tantsack-start/src/routes/api/get-token.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

examples/realtime-tantsack-start/src/routes/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { createFileRoute } from '@tanstack/react-router';
21
import {
32
RealtimeAgent,
43
RealtimeSession,
@@ -15,7 +14,7 @@ import { handleRefundRequestServerFn } from '../server/backendAgent';
1514
import { getTokenServerFn } from '../server/token';
1615
import { App } from '@/components/App';
1716

18-
export const Route = createFileRoute('/')({
17+
export const Route = createFileRoute({
1918
component: Home,
2019
});
2120

0 commit comments

Comments
 (0)