solid-tanstack-start
/solid-tanstack-start
Use when organizing TanStack Start code, splitting oversized routes/server functions, or reviewing architecture. Do NOT use for setup or plain React SPA.
- Author
- fusengine ↗
- Repository
- agents ↗
- Licence
- MIT
- Last repository change
- 12.10.2026
Assessment and security
- Files in this package
- 11
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 12.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when organizing TanStack Start code, splitting oversized routes/server functions, or reviewing architecture. Do NOT use for setup or plain React SPA.
Original author description
Use when organizing TanStack Start code, splitting oversized routes/server functions, or reviewing architecture. Do NOT use for setup or plain React SPA.
How it works
- Codebase Analysis (MANDATORY)
- DRY - Reuse or Create Shared (MANDATORY)
- Absolute Rules (MANDATORY)
- SOLID Principles (Detailed Guides)
- Code Templates
- Forbidden
SKILL.md preview
---
name: solid-tanstack-start
version: 1.0.0
description: Use when organizing TanStack Start code, splitting oversized routes/server functions, or reviewing architecture. Do NOT use for setup or plain React SPA.
user-invocable: true
references: references/solid-principles.md, references/single-responsibility.md, references/architecture-patterns.md, references/interface-segregation.md, references/dependency-inversion.md, references/templates/route.md, references/templates/server-fn.md, references/templates/interface.md, references/templates/hook.md
---
<objective>
Applies SOLID principles and clean architecture to TanStack Start v1.168.58 projects: source files within `FUSE_SOLID_MAX_LINES` and split by responsibility when cohesion drops, types declared only in src/interfaces/ (never inline in a route or component file), JSDoc on every export, and a modular directory structure built around the Start route tree.
Establishes the isomorphic/server-only boundary as an architectural concern: DB access, secrets, and filesystem work must sit behind createServerFn or createServerOnlyFn, never inside a bare loader.
Absolute rules include never hand-editing the generated src/routeTree.gen.ts, no module importing another feature module except cores/, no barrel exports, and no `any` types. Includes code templates for routes, server functions, interfaces, and hooks, and DRY guidance to grep for existing logic in src/modules/cores/ or src/lib/ before writing new code.
Do NOT use this skill for initial framework setup (use start-core), for the server/client execution-boundary deep dive itself (use start-execution-model), or for a generic React SPA that has no Start route tree (use solid-react).
</objective>
# SOLID TanStack Start
SOLID and clean architecture for **TanStack Start v1.168.58** projects (Vite plugin
`tanstackStart()`, file-based routes in `src/routes/`, server functions via
`createServerFn`). Start code is isomorphic by default — architecture must make
the server/client boundary explicit.
## Codebase Analysis (MANDATORY)
**Before ANY implementation:**
1. Explore the `src/routes/` tree and existing `modules/` to learn conventions.
2. Read related route files and their `createServerFn` wrappers.
3. Identify naming, path aliases (`~/`, `@/`), and data-flow patterns.
## DRY - Reuse or Create Shared (MANDATORY)
**Before writing ANY new code:**
1. **Grep** for similar function names, loaders, or server functions.
2. Check shared locations: `src/modules/cores/`, `src/lib/`.
3. If similar code exists → extend/reuse instead of duplicating.
4. Logic used by 2+ features → put it in `src/modules/cores/` directly.
5. Run `npx jscpd ./src --threshold 3` after creating new files.
---
## Absolute Rules (MANDATORY)
### 1. Source-file size ceiling
Source files must not exceed `FUSE_SOLID_MAX_LINES` - the hook's ceiling is the only authority.
Split by responsibility when cohesion drops; see `references/single-responsibility.md`.
### 2. NEVER edit `src/routeTree.gen.ts`
It is generated by the `tanstackStart()` plugin on every dev/build run. Editing
it by hand is always wrong — the change is overwritten and route types break.
Add/rename files in `src/routes/` instead and let the plugin regenerate it.
### 3. Interfaces Separated
```text
src/modules/[feature]/src/interfaces/
├── user.interface.ts
└── api.interface.ts
```
**NEVER declare types inside a route or component file.** See
`references/interface-segregation.md`.
### 4. JSDoc Mandatory on every export
```typescript
/**
* Fetch a user by ID (server-only).
*
* @param data - Lookup payload with the user id
* @returns The user row, or throws notFound()
*/
export const getUser = createServerFn({ method: 'GET' })
.validator((data: { id: string }) => data)
.handler(async ({ data }) => findUserById(data.id))
```
### 5. Server-only logic lives behind `createServerFn`
Loaders are isomorphic. DB access, secrets, and filesystem MUST sit inside a
`createServerFn().handler()` (or a `createServerOnlyFn`), never a bare loader.
See `start-execution-model` for the full boundary model.
---
## SOLID Principles (Detailed Guides)
1. **`references/single-responsibility.md`** — Load when a route/server function
grows past its limit; line budgets + split strategy for Start files.
2. **`references/interface-segregation.md`** — Load when designing route loader
data, server-function payloads, or router context; keep them focused.
3. **`references/dependency-inversion.md`** — Load when a server function calls a
service; depend on abstractions in `interfaces/`, inject implementations.
See `references/solid-principles.md` for the overview and
`references/architecture-patterns.md` for the full directory layout.
---
## Code Templates
Ready-to-copy code in `references/templates/`:
| Template | Usage |
|----------|-------|
| `route.md` | `createFileRoute` component + loader |
| `server-fn.md` | `createServerFn` with Zod validator |
| `interface.md` | TypeScript interfaces in `src/interfaces/` |
| `hook.md` | Client hook wrapping a server function |
---
## Forbidden
- Editing `src/routeTree.gen.ts` (generated).
- Types declared inside route/component files.
- DB / secrets / filesystem in a bare loader (→ `createServerFn`).
- Module importing another feature module (except `cores/`).
- Source files exceeding `FUSE_SOLID_MAX_LINES`, missing JSDoc on exports, `any` type.
- Barrel exports (`index.ts` re-exports).
- Coding without checking current docs (Context7 + Exa) first.
Files in this package (11)
- .gitkeep 1 KB
- SKILL.md 5 KB
- references/architecture-patterns.md 4 KB
- references/dependency-inversion.md 3 KB
- references/interface-segregation.md 3 KB
- references/single-responsibility.md 3 KB
- references/solid-principles.md 3 KB
- references/templates/hook.md 2 KB
- references/templates/interface.md 2 KB
- references/templates/route.md 3 KB
- references/templates/server-fn.md 2 KB
Versions
The database has no other skills named solid-tanstack-start.
Database snapshot: 13.11.2026 · package version c562326b62fe (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100tanstack-start-architecture
Use when creating, moving, or naming files in a full-stack TanStack Start app (file-based routes, server functions) that also uses TanStack Query, Form, Table, DB, and Devtools, organized by technical layer. Covers routes, server/ (functions, middleware, services, db),… - 95tanstack-start-best-practices
TanStack Start best practices for full-stack React applications. Server functions, middleware, SSR, authentication, and deployment patterns. Activate when building full-stack apps with TanStack Start. - 100bun-tanstack-start
TanStack Start full-stack React framework with Bun runtime. Use for TanStack Router, server functions, vinxi, or encountering SSR, build, preset errors. - 100tanstack-start
Build full-stack React apps with TanStack Start. Use when a user asks to create a full-stack React application with type-safe server functions, set up file-based routing with SSR/SSG/SPA modes, build APIs with middleware and validation, implement server-side data fetching with… - 100tanstack-start
TanStack Start (RC) full-stack React with server functions, SSR, Cloudflare Workers. Use for Next.js migration, edge rendering, or encountering hydration, auth, data pattern errors. - 100start-server-routes
Use when building raw HTTP endpoints in TanStack Start with the server property — handlers, params, middleware. Do NOT use for internal RPC (start-server-functions).