Skip to content

Commit 3af1b8b

Browse files
committed
refactor: update documentation titles and summaries for clarity and consistency
1 parent 309911b commit 3af1b8b

24 files changed

Lines changed: 530 additions & 67 deletions

packages/start-skills/manifest.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,25 @@
55
"v1": {
66
"index": "skills/v1/index.md",
77
"files": [
8-
"skills/v1/adapters.md",
8+
"skills/v1/authentication.md",
9+
"skills/v1/databases.md",
910
"skills/v1/deployment.md",
1011
"skills/v1/environment-config.md",
12+
"skills/v1/error-boundaries.md",
13+
"skills/v1/execution-model.md",
1114
"skills/v1/file-structure.md",
1215
"skills/v1/index.md",
1316
"skills/v1/middleware.md",
17+
"skills/v1/observability.md",
18+
"skills/v1/path-aliases.md",
19+
"skills/v1/routing.md",
1420
"skills/v1/router-integration.md",
21+
"skills/v1/selective-ssr.md",
22+
"skills/v1/server-entry-point.md",
1523
"skills/v1/server-functions.md",
24+
"skills/v1/server-routes.md",
1625
"skills/v1/start-setup.md",
26+
"skills/v1/static-prerendering.md",
1727
"skills/v1/streaming-ssr.md"
1828
]
1929
}

packages/start-skills/skills/topics.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,21 @@
22
"index.md",
33
"start-setup.md",
44
"file-structure.md",
5+
"routing.md",
56
"router-integration.md",
6-
"adapters.md",
7+
"path-aliases.md",
8+
"execution-model.md",
9+
"server-entry-point.md",
10+
"environment-config.md",
711
"server-functions.md",
12+
"server-routes.md",
13+
"databases.md",
814
"middleware.md",
915
"streaming-ssr.md",
10-
"environment-config.md",
16+
"selective-ssr.md",
17+
"static-prerendering.md",
18+
"error-boundaries.md",
19+
"authentication.md",
20+
"observability.md",
1121
"deployment.md"
1222
]

packages/start-skills/skills/v1/adapters.md

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
id: authentication
3+
title: Authentication
4+
versions:
5+
- latest
6+
summary: Define auth boundaries and implement login flows.
7+
resources:
8+
- https://tanstack.com/start/latest/docs/overview
9+
---
10+
11+
# Authentication
12+
13+
Purpose:
14+
15+
- Define authentication boundaries and implement login flows.
16+
17+
Scope:
18+
19+
- Use when planning sessions, cookies, providers, or token storage.
20+
21+
Guidelines:
22+
23+
- Keep auth checks in middleware or server functions, not client-only code.
24+
- Use `@skills/router/authenticated-routes` for route guards and redirects.
25+
- Align session storage with the chosen adapter runtime.
26+
27+
Examples:
28+
29+
```ts
30+
export const login = serverFn(async (input) => {
31+
const user = await verifyCredentials(input)
32+
return createSession(user)
33+
})
34+
```
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
id: databases
3+
title: Databases
4+
versions:
5+
- latest
6+
summary: Access databases safely in Start apps.
7+
resources:
8+
- https://tanstack.com/start/latest/docs/overview
9+
---
10+
11+
# Databases
12+
13+
Purpose:
14+
15+
- Keep database access on the server while keeping types aligned.
16+
17+
Scope:
18+
19+
- Use when introducing database clients or query layers.
20+
21+
Guidelines:
22+
23+
- Initialize database clients in server-only modules.
24+
- Expose data through server functions or `@skills/router/loaders`.
25+
- Align connection pooling with the adapter runtime.
26+
27+
Examples:
28+
29+
```ts
30+
export const listProjects = serverFn(async () => {
31+
return db.project.findMany()
32+
})
33+
```
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
---
22
id: deployment
3-
title: Start Deployment
3+
title: Deployment
44
versions:
55
- latest
6-
- ">=1 <2"
7-
summary: Deploy Start apps with the right adapter and build outputs.
6+
summary: Deploy Start apps to hosting targets.
87
resources:
98
- https://tanstack.com/start/latest/docs/overview
109
---
1110

12-
# Start Deployment
11+
# Deployment
1312

1413
Purpose:
1514

@@ -22,5 +21,5 @@ Scope:
2221
Guidelines:
2322

2423
- Confirm adapter compatibility with the hosting provider.
25-
- Validate SSR streaming requirements and response limits.
24+
- Validate SSR requirements with `@skills/router/ssr-loaders`.
2625
- Ensure server functions are deployed to the correct runtime.
Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,40 @@
11
---
22
id: environment-config
3-
title: Start Environment Config
3+
title: Environment
44
versions:
55
- latest
6-
- ">=1 <2"
7-
summary: Manage environment variables and secrets for Start runtimes.
6+
summary: Configure environment variables and runtime helpers.
87
resources:
98
- https://tanstack.com/start/latest/docs/overview
109
---
1110

12-
# Start Environment Config
11+
# Environment
1312

1413
Purpose:
1514

16-
- Keep secrets and runtime settings consistent across environments.
15+
- Define environment variables and runtime helpers safely.
1716

1817
Scope:
1918

20-
- Use when wiring environment variables for adapters and server functions.
19+
- Use when wiring environment variables, secrets, and runtime helpers.
2120

2221
Guidelines:
2322

2423
- Validate required environment variables at startup.
2524
- Keep secrets server-only and never expose them to client bundles.
26-
- Coordinate per-environment overrides with the deployment target.
25+
- Keep environment helpers in server entry files or server functions.
26+
- Validate helpers against the selected adapter runtime.
27+
28+
Examples:
29+
30+
```ts
31+
const requireEnv = (key: string) => {
32+
const value = process.env[key]
33+
if (!value) throw new Error(`Missing ${key}`)
34+
return value
35+
}
36+
37+
export const env = {
38+
databaseUrl: requireEnv('DATABASE_URL'),
39+
}
40+
```
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
id: error-boundaries
3+
title: Error Handling
4+
versions:
5+
- latest
6+
summary: Handle runtime and hydration errors safely.
7+
resources:
8+
- https://tanstack.com/start/latest/docs/overview
9+
---
10+
11+
# Error Handling
12+
13+
Purpose:
14+
15+
- Define how errors surface during server rendering and hydration.
16+
17+
Scope:
18+
19+
- Use when handling runtime failures and hydration mismatches.
20+
21+
Guidelines:
22+
23+
- Capture server errors in middleware or server functions.
24+
- Use `@skills/router/error-boundaries` for route-level UI fallback.
25+
- Pair 404 handling with `@skills/router/not-found-boundaries`.
26+
- Ensure server-rendered data matches client expectations.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
id: execution-model
3+
title: Execution Model
4+
versions:
5+
- latest
6+
summary: Understand where Start code executes.
7+
resources:
8+
- https://tanstack.com/start/latest/docs/overview
9+
---
10+
11+
# Execution Model
12+
13+
Purpose:
14+
15+
- Clarify what runs on the server, client, or both.
16+
17+
Scope:
18+
19+
- Use when debugging execution context and data flow.
20+
21+
Guidelines:
22+
23+
- Keep server-only logic in entry points and server functions.
24+
- Use server functions or `@skills/router/loaders` for data fetching.
25+
- Avoid importing server-only modules in client entry files.
26+
- Avoid relying on browser-only APIs during SSR.
27+
28+
Examples:
29+
30+
```ts
31+
// server-only module
32+
export async function readSecrets() {
33+
return loadFromVault()
34+
}
35+
36+
// server function uses the server-only module
37+
export const getSession = serverFn(async () => readSecrets())
38+
```

packages/start-skills/skills/v1/file-structure.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
---
22
id: file-structure
3-
title: Start File Structure
3+
title: File Structure
44
versions:
55
- latest
6-
- ">=1 <2"
76
summary: Organize Start entry points, routes, and shared modules.
87
resources:
98
- https://tanstack.com/start/latest/docs/overview
109
---
1110

12-
# Start File Structure
11+
# File Structure
1312

1413
Purpose:
1514

@@ -23,4 +22,21 @@ Guidelines:
2322

2423
- Keep entry files and route modules minimal and focused.
2524
- Separate shared utilities, server-only helpers, and client-only components.
25+
- Group runtime-only code (server functions, middleware, server routes) together.
2626
- Use `@skills/router/file-based-routing` if you lean on Router file routing.
27+
28+
Examples:
29+
30+
```
31+
app/
32+
routes/
33+
index.tsx
34+
settings.tsx
35+
entry-client.tsx
36+
entry-server.tsx
37+
server/
38+
routes/
39+
middleware/
40+
shared/
41+
formatting.ts
42+
```

0 commit comments

Comments
 (0)