Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9321061
eslint update
LadyBluenotes Dec 1, 2025
18b83f7
run formatting
LadyBluenotes Dec 1, 2025
624d62d
run auto lint fixes
LadyBluenotes Dec 1, 2025
802623e
rm unused code and variables
LadyBluenotes Dec 1, 2025
782a5ec
rm unused code
LadyBluenotes Dec 1, 2025
018eca2
rm unused code
LadyBluenotes Dec 1, 2025
04e205c
add preact store, standardize framework font-colors (#553)
KevinVandy Dec 1, 2025
40ec0b2
Fix Heading Link Error (#555)
LadyBluenotes Dec 1, 2025
480ceb9
rm unused deps
LadyBluenotes Dec 1, 2025
83b47e3
Merge branch 'main' into eslint-updates
LadyBluenotes Dec 1, 2025
04daefb
add variable inter font
LadyBluenotes Dec 1, 2025
84984d9
fix?
LadyBluenotes Dec 1, 2025
9b44f21
img fix and rm carbon
LadyBluenotes Dec 2, 2025
1296a0f
fix??
LadyBluenotes Dec 2, 2025
e1cdbe6
fix????
LadyBluenotes Dec 2, 2025
f09a6e0
ok this is the fix
LadyBluenotes Dec 2, 2025
a657a6c
rm unused code
LadyBluenotes Dec 2, 2025
8df98c3
Merge branch 'main' into eslint-updates
KevinVandy Dec 2, 2025
b0596ef
Merge branch 'main' into eslint-updates
LadyBluenotes Dec 2, 2025
1e7dc0c
rm more unused code
LadyBluenotes Dec 2, 2025
2268df8
Add smooth hover transitions to navbar interactive elements (#545)
garrettsiegel Dec 2, 2025
6cee8cd
Add Superhumanizer sponsor metadata (#559)
KamranKhan11 Dec 4, 2025
a4876b2
Update sponsor login from 'Superhumanizer' to 'rewriterprojs' (#560)
KamranKhan11 Dec 4, 2025
7fbbc19
Squashed commit of the following:
tannerlinsley Dec 4, 2025
fdf3389
fixes
tannerlinsley Dec 4, 2025
0008899
fix build
tannerlinsley Dec 4, 2025
650a20c
ai default docs
tannerlinsley Dec 4, 2025
6823317
ai article
tannerlinsley Dec 4, 2025
0d5e18a
post links
tannerlinsley Dec 4, 2025
4f90468
Use blog header images for social sharing (#564)
KyleAMathews Dec 5, 2025
8dcba59
ci: run prettier autofix action (#565)
lachlancollins Dec 5, 2025
ad85fd6
feat: Improve handling of relative links in markdown (#563)
lachlancollins Dec 5, 2025
ed9e475
feat: improved frameworks page (#556)
KevinVandy Dec 5, 2025
4b71e16
eslint update
LadyBluenotes Dec 1, 2025
f7ab43c
run auto lint fixes
LadyBluenotes Dec 1, 2025
56a9741
rm unused code and variables
LadyBluenotes Dec 1, 2025
c0a499a
add preact store, standardize framework font-colors (#553)
KevinVandy Dec 1, 2025
2571e40
img fix and rm carbon
LadyBluenotes Dec 2, 2025
cb58489
fix broken package.json
LadyBluenotes Dec 5, 2025
8b33f2d
fix lock??
LadyBluenotes Dec 5, 2025
ccff12b
fix navbar
LadyBluenotes Dec 5, 2025
8e6346c
fix
LadyBluenotes Dec 5, 2025
e3f04f2
fix import
LadyBluenotes Dec 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .eslintrc

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/autofix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: autofix.ci # needed to securely identify the workflow

on:
pull_request:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
autofix:
name: autofix
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Fix formatting
run: pnpm format
- name: Apply fixes
uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27
with:
commit-message: 'ci: apply automated fixes'
15 changes: 5 additions & 10 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,12 @@ jobs:
name: PR
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v4
- name: Checkout
uses: actions/checkout@v5.0.0
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install Packages
run: pnpm install --frozen-lockfile
fetch-depth: 0
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Run Lint
run: pnpm lint
- name: Run Build
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
node_modules
package-lock.json
yarn.lock
convex/generated
drizzle/migrations

.tanstack
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.15.0
v20.19.6
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
**/public
pnpm-lock.yaml
routeTree.gen.ts
convex/_generated
convex/README.md
src/blog/tanstack-db-0.1-the-embedded-client-database-for-tanstack-query.md
.content-collections
.claude
153 changes: 0 additions & 153 deletions .tanstack-start/server-routes/routeTree.gen.ts

This file was deleted.

91 changes: 91 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,94 @@ loader: async ({ deps }) => {
```

This ensures the loader only re-runs when the specific dependencies change, not when unrelated search params (like `expanded`, `viewMode`, etc.) change.

### Loaders Are Isomorphic

**Loaders in TanStack Start/Router are isomorphic and cannot call server logic unless via a call to a server function.**

Loaders run on both the server and client, so they cannot directly access server-only APIs (like file system, database connections, etc.). To perform server-side operations, loaders must call server functions (e.g., TanStack server functions created via `createServerFn()`, Convex queries/mutations, API routes, or other server functions).

❌ **Bad:**

```typescript
loader: async () => {
// This won't work - direct server API access
const data = await fs.readFile('data.json')
return { data }
}
```

✅ **Good:**

```typescript
loader: async () => {
// Call a server function instead (TanStack server function or Convex)
// TanStack server functions created via createServerFn() can be called directly
const data = await serverFn({ data: { id: '123' } })
// or
const data = await convex.query(api.data.getData)
return { data }
}
```

## Server-Only Code and Environment Shaking

### TanStack Start Environment Shaking

**TanStack Start performs environment shaking - any code not referenced by a `createServerFn` handler is stripped from the client build.**

This means:

- Server-only code (database, file system, etc.) is automatically excluded from client bundles
- Only code inside `createServerFn` handlers is included in server bundles
- Code outside handlers is included in both server and client bundles

### Importing Server Functions

**Server functions wrapped in `createServerFn` can be safely imported statically in route files.**

❌ **Bad - Dynamic imports in component code:**

```typescript
// In a route component
const rolesQuery = useQuery({
queryFn: async () => {
const { listRoles } = await import('~/utils/roles.server')
return listRoles({ data: {} })
},
})
```

This causes bundler issues because dynamic imports can't be properly tree-shaken, potentially pulling server-only code (like `Buffer`, `drizzle`, `postgres`) into the client bundle.

✅ **Good - Static imports:**

```typescript
// At the top of the route file
import { listRoles } from '~/utils/roles.server'

// In component code
const rolesQuery = useQuery({
queryFn: async () => {
return listRoles({ data: {} })
},
})
```

Since `listRoles` is wrapped in `createServerFn`, TanStack Start will properly handle environment shaking and exclude server-only dependencies from the client bundle.

### Rules for Server-Only Imports

1. **Server functions** (`createServerFn` wrappers) can be imported statically anywhere
2. **Direct server-only code** (database clients, file system, etc.) must ONLY be imported:
- Inside `createServerFn` handlers
- In separate server-only files (e.g., `*.server.ts`)
- Never use dynamic imports (`await import()`) for server-only code in component code

## Development & Build Commands

### Use `build` for Testing Build Output

**The `dev` command does not end - it runs indefinitely in watch mode.**

When agents need to test build output or verify that the project builds successfully, use the `build` command instead of `dev`. The `build` command will complete and exit, making it suitable for automated testing and verification.
2 changes: 1 addition & 1 deletion agents/tasks/tanstack-com-task-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
- Status: Backlog
- Notes:
- Route: `src/routes/state-of-tanstack.tsx`.
- Include growth charts (npm downloads: reuse `NpmStatsChart.tsx` or embed portions of `stats/npm`), GitHub stars, contributors, dependents (available via Convex aggregation already powering `OpenSourceStats`).
- Include growth charts (npm downloads: reuse `NpmStatsChart.tsx` (in git history) or embed portions of `stats/npm`), GitHub stars, contributors, dependents (available via Convex aggregation already powering `OpenSourceStats`).
- Community stats: Discord members (needs server function), newsletter subscribers (manual or vendor API), X/Twitter followers (manual or API), repository contributors (Convex or GitHub GraphQL on server).
- Ecosystem counts: partners (derive from `src/utils/partners.tsx`), plugins/tools (manual list or content collection).
- CTA to GitHub org.
Expand Down
6 changes: 6 additions & 0 deletions content-collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ const posts = defineCollection({
}),
transform: ({ content, ...post }) => {
const frontMatter = extractFrontMatter(content)

// Extract header image (first image after frontmatter)
const headerImageMatch = content.match(/!\[([^\]]*)\]\(([^)]+)\)/)
const headerImage = headerImageMatch ? headerImageMatch[2] : undefined

return {
...post,
slug: post._meta.path,
excerpt: frontMatter.excerpt,
description: frontMatter.data.description,
headerImage,
content,
}
},
Expand Down
Loading