Skip to content

Commit 94a5cb1

Browse files
committed
Add TanStack Start example app
1 parent 8406975 commit 94a5cb1

32 files changed

+5790
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local
6+
count.txt
7+
.env
8+
.nitro
9+
.tanstack
10+
.wrangler
11+
.output
12+
.vinxi
13+
todos.json
14+
*.tsbuildinfo
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package-lock.json
2+
pnpm-lock.yaml
3+
yarn.lock
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"files.watcherExclude": {
3+
"**/routeTree.gen.ts": true
4+
},
5+
"search.exclude": {
6+
"**/routeTree.gen.ts": true
7+
},
8+
"files.readonlyInclude": {
9+
"**/routeTree.gen.ts": true
10+
}
11+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Base UI + TanStack Start
2+
3+
This is a simple [TanStack Start](https://tanstack.com/start/latest/docs/framework/react/overview) app with [Base UI components](https://base-ui.com/react/overview/quick-start) and styled with [Tailwind CSS](https://tailwindcss.com/).
4+
5+
## Getting started
6+
7+
[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/mui/base-ui/tree/master/examples/tanstack-start-tailwind)
8+
9+
Or run it locally at [http://localhost:3000](http://localhost:3000):
10+
11+
```bash
12+
pnpm install
13+
pnpm start
14+
```
15+
16+
# Building for production
17+
18+
To build a production bundle:
19+
20+
```bash
21+
pnpm build
22+
```
23+
24+
To preview the production build:
25+
26+
```bash
27+
pnpm serve
28+
```
29+
30+
## TypeScript
31+
32+
To check the types:
33+
34+
```bash
35+
pnpm typescript
36+
```
37+
38+
## Linting & Formatting
39+
40+
This project uses [ESLint](https://eslint.org/) and [prettier](https://prettier.io/) for linting and formatting. ESLint is configured using [tanstack/eslint-config](https://tanstack.com/config/latest/docs/eslint). The following scripts are available:
41+
42+
```bash
43+
# lint only
44+
pnpm lint
45+
# lint and prettier with autofix
46+
pnpm check
47+
```
48+
49+
## Routing
50+
51+
This app uses [TanStack Router](https://tanstack.com/router) with a file based router. Routes are managed as files in `src/routes`. The router also provides [`loader` functionality](https://tanstack.com/router/latest/docs/framework/react/guide/data-loading#loader-parameters) to load data for a route before it's rendered.
52+
53+
## More info
54+
55+
TanStart Start uses [Vite](https://vite.dev).
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// @ts-check
2+
3+
import { tanstackConfig } from '@tanstack/eslint-config';
4+
5+
export default [
6+
...tanstackConfig,
7+
{
8+
files: ['**/*.js'],
9+
languageOptions: {
10+
parserOptions: { project: null, projectService: { allowDefaultProject: ['*.js'] } },
11+
},
12+
},
13+
];
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "base-ui-tanstack-start",
3+
"private": true,
4+
"type": "module",
5+
"scripts": {
6+
"dev": "vite dev --port 3000",
7+
"build": "vite build",
8+
"serve": "vite preview",
9+
"lint": "eslint",
10+
"check": "prettier --write . && eslint --fix",
11+
"typescript": "tsc -b tsconfig.json"
12+
},
13+
"dependencies": {
14+
"@base-ui-components/react": "latest",
15+
"@base-ui-components/utils": "latest",
16+
"@tanstack/react-devtools": "^0.8.1",
17+
"@tanstack/react-router": "^1.139.0",
18+
"@tanstack/react-router-devtools": "^1.139.0",
19+
"@tanstack/react-start": "^1.139.0",
20+
"@tanstack/router-plugin": "^1.139.0",
21+
"clsx": "^2.1.1",
22+
"lucide-react": "^0.554.0",
23+
"react": "^19",
24+
"react-dom": "^19",
25+
"vite-tsconfig-paths": "^5.1.4"
26+
},
27+
"devDependencies": {
28+
"@tailwindcss/vite": "^4.1.17",
29+
"@tanstack/devtools-vite": "^0.3.11",
30+
"@tanstack/eslint-config": "^0.3.0",
31+
"@types/node": "^22.10.2",
32+
"@types/react": "^19",
33+
"@types/react-dom": "^19",
34+
"@vitejs/plugin-react": "^5.0.4",
35+
"prettier": "^3.5.3",
36+
"tailwindcss": "^4.1.17",
37+
"typescript": "^5.7.2",
38+
"vite": "^7.1.7"
39+
}
40+
}

0 commit comments

Comments
 (0)