Skip to content

Commit 1adb468

Browse files
Austin/builder tailwind v4 (#470)
* add new placeholder page with empty content * minimal integration between @tanstack/cta-base and tanstack.com * feat: add builder route with styles and UI components * feat: add ZIP export functionality to builder interface with JSZip integration * refactor: remove unused exit button from builder interface * feat: add cta-engine and cra framework dependencies for dry-run app creation * remove problematic utility classes * chore: upgrade to tailwindcss v4 * chore: update @tanstack/cta-ui-base from local link to v0.21.0 --------- Co-authored-by: Austin Montoya <austin@liminal.sh>
1 parent 6467788 commit 1adb468

28 files changed

Lines changed: 2898 additions & 83 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ dist
2626

2727
# Content Collections generated files
2828
.content-collections
29+
.tanstack
2930

CLAUDE.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
TanStack.com is the official website and documentation hub for all TanStack open-source libraries (React Query, React Table, React Router, React Form, etc.). Built with TanStack Router/Start as a full-stack React application.
8+
9+
## Essential Commands
10+
11+
```bash
12+
# Development
13+
pnpm dev # Run frontend (Vite) + backend (Convex) in parallel
14+
pnpm dev:frontend # Frontend only (Vite dev server)
15+
pnpm dev:backend # Backend only (Convex)
16+
17+
# Build & Deploy
18+
pnpm build # Production build
19+
pnpm start # Production start
20+
21+
# Code Quality
22+
pnpm lint # Run Prettier + ESLint checks
23+
pnpm format # Auto-format with Prettier
24+
25+
# Local Package Development
26+
pnpm linkAll # Link local TanStack packages (requires sibling repos)
27+
```
28+
29+
## Architecture Overview
30+
31+
### Tech Stack
32+
- **Framework**: TanStack Router + TanStack Start (file-system based routing)
33+
- **Styling**: Tailwind CSS with custom design tokens
34+
- **Backend**: Convex (real-time backend service)
35+
- **Auth**: Clerk
36+
- **Content**: Content Collections + Markdown for docs/blog
37+
- **Build**: Vite
38+
39+
### Key Directory Structure
40+
- `src/routes/` - File-system based routing (TanStack Router)
41+
- `src/components/` - Shared React components
42+
- `src/libraries/` - Library configurations and metadata
43+
- `src/blog/` - Blog posts in Markdown
44+
- `convex/` - Backend functions (Convex)
45+
- `scripts/` - Build and development scripts
46+
47+
### Routing System
48+
Uses TanStack Router's file-system routing. Key patterns:
49+
- `src/routes/__root.tsx` - Root layout
50+
- `src/routes/[framework]/[library]/*.tsx` - Dynamic library docs
51+
- Route files export `createFileRoute()` for route configuration
52+
- Layouts use `_layout.tsx` convention
53+
54+
### Content System
55+
Documentation is fetched from GitHub in production or read locally in development:
56+
- Library docs pulled from respective GitHub repos
57+
- Blog posts stored locally in `src/blog/`
58+
- Content processed via Content Collections
59+
- Supports multiple framework variations (React, Vue, Angular, Solid)
60+
61+
### State Management
62+
- **TanStack Query**: Server state and data fetching
63+
- **Zustand**: Client state (`src/stores/`)
64+
- **React Context**: Theme and auth providers
65+
66+
### Backend (Convex)
67+
- Functions in `convex/` directory
68+
- Real-time subscriptions and mutations
69+
- Handles user data, sponsors, authentication
70+
71+
## Development Setup Requirements
72+
73+
1. **Environment Variables**: Create `.env` file with:
74+
- Clerk tokens (auth)
75+
- Convex deployment URL
76+
- Sentry DSN (optional)
77+
78+
2. **Local Package Development**:
79+
- Parent directory must be named `tanstack/`
80+
- Sibling repos required for local docs: `tanstack/query`, `tanstack/router`, etc.
81+
- Run `pnpm linkAll` to link local packages
82+
83+
3. **Port Configuration**: Dev server runs on port 3000
84+
85+
## Important Patterns
86+
87+
### Component Creation
88+
- Use TypeScript with explicit types
89+
- Follow existing component patterns in `src/components/`
90+
- Tailwind classes for styling (avoid inline styles)
91+
92+
### Route Creation
93+
```tsx
94+
import { createFileRoute } from '@tanstack/react-router'
95+
96+
export const Route = createFileRoute('/path')({
97+
component: RouteComponent,
98+
})
99+
100+
function RouteComponent() {
101+
// Component implementation
102+
}
103+
```
104+
105+
### API/Backend Calls
106+
Use Convex hooks:
107+
```tsx
108+
import { useQuery, useMutation } from 'convex/react'
109+
import { api } from '~/convex/_generated/api'
110+
111+
const data = useQuery(api.functions.myFunction)
112+
const mutate = useMutation(api.functions.myMutation)
113+
```
114+
115+
### Content/Documentation Updates
116+
- Blog posts: Add Markdown files to `src/blog/`
117+
- Library metadata: Update `src/libraries/[library].tsx`
118+
- Documentation pulled from respective library repos (not edited here)

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,18 @@
3434
"@sentry/vite-plugin": "^2.22.6",
3535
"@tailwindcss/typography": "^0.5.13",
3636
"@tailwindcss/vite": "^4.1.11",
37+
"@tanstack/cta-engine": "^0.19.0",
38+
"@tanstack/cta-framework-react-cra": "^0.19.0",
39+
"@tanstack/cta-ui": "^0.19.0",
40+
"@tanstack/cta-ui-base": "^0.21.0",
3741
"@tanstack/react-pacer": "^0.7.0",
3842
"@tanstack/react-query": "^5.84.2",
3943
"@tanstack/react-router": "1.131.2",
4044
"@tanstack/react-router-devtools": "1.131.2",
4145
"@tanstack/react-router-with-query": "1.130.17",
4246
"@tanstack/react-start": "1.131.2",
4347
"@types/d3": "^7.4.3",
48+
"@types/jszip": "^3.4.1",
4449
"@typescript-eslint/parser": "^7.2.0",
4550
"@vercel/analytics": "^1.2.2",
4651
"@vercel/speed-insights": "^1.0.10",
@@ -59,6 +64,7 @@
5964
"gray-matter": "^4.0.3",
6065
"html-react-parser": "^5.1.10",
6166
"import-meta-resolve": "^4.0.0",
67+
"jszip": "^3.10.1",
6268
"lru-cache": "^7.13.1",
6369
"marked": "^13.0.2",
6470
"marked-alert": "^2.0.1",
@@ -74,6 +80,7 @@
7480
"remove-markdown": "^0.5.0",
7581
"shiki": "^1.4.0",
7682
"tailwind-merge": "^1.14.0",
83+
"tailwindcss-animate": "^1.0.7",
7784
"tiny-invariant": "^1.3.3",
7885
"vite-tsconfig-paths": "^5.0.1",
7986
"zod": "^3.23.8",
@@ -83,6 +90,7 @@
8390
"@content-collections/core": "^0.8.2",
8491
"@content-collections/vite": "^0.2.4",
8592
"@shikijs/transformers": "^1.10.3",
93+
"@tailwindcss/postcss": "^4.1.11",
8694
"@types/react": "^18.3.12",
8795
"@types/react-dom": "^18.3.1",
8896
"@types/remove-markdown": "^0.3.4",

0 commit comments

Comments
 (0)