Skip to content

Conversation

@mhartington
Copy link
Contributor

@mhartington mhartington commented Nov 16, 2025

Needs TanStack/create-tsrouter-app#232 before it can be merged

Summary by CodeRabbit

Documentation

  • Updated TanStack Start guide with an interactive CLI setup experience
  • Replaced static setup instructions with guided Prisma onboarding prompts
  • Simplified example application from complex data models to a basic Todo app
  • Enhanced database connection configuration guidance with interactive workflows
  • Improved route and component integration patterns in tutorial

aidankmcalister and others added 6 commits November 4, 2025 11:54
* `prisma-client-js` deprecated

* chore: empty commit

* broken link updated
* added env vars section to various pages

* minor coderabbit updates

* verbose removed

* test removed redirect list

* removed quickstart addition

* converted quickstarts back
* middleware deleted

* more middleware removed

* more middleware removed

* coderabbit changes
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 16, 2025

Warning

Rate limit exceeded

@mhartington has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 24 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between f3bb75b and e5848d4.

📒 Files selected for processing (1)
  • content/800-guides/160-tanstack-start.mdx (5 hunks)

Walkthrough

This PR updates the TanStack Start guide from a static Posts/Users example to an interactive Todos-focused guide. It replaces scaffolding content with CLI setup prompts, restructures the project layout from app/ to src/, updates the Prisma schema from User/Post models to a simplified Todo model, and adjusts all corresponding imports, routes, loaders, and data-fetching logic.

Changes

Cohort / File(s) Summary
Interactive Setup & CLI Integration
content/800-guides/160-tanstack-start.mdx
Replaces static setup instructions with interactive TanStack Start CLI preview showing project naming, toolchain selection, deployment adapter, and Prisma onboarding prompts. Introduces guided database connection string and configuration flow.
Prisma Schema & Database Configuration
content/800-guides/160-tanstack-start.mdx
Updates Prisma schema from User and Post models to a simplified Todo model with id, title, and createdAt fields. Adjusts generator and datasource configuration; replaces dotenv-centric environment setup with CLI-guided approach.
Route Structure & Import Paths
content/800-guides/160-tanstack-start.mdx
Restructures project layout from app/ to src/. Updates imports from ../lib/prisma to ../db, changes Route export signature to use App component with loader, and updates route path references to match new file organization.
Data Flow & UI Components
content/800-guides/160-tanstack-start.mdx
Modifies loader and server functions to fetch prisma.todo.findMany() instead of posts. Updates UI from "Posts" to "Todos", refactors component data consumption to use Route.useLoaderData() with todos list iteration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

  • Verify all import paths (particularly ../db references and src/ structure) remain consistent throughout the guide
  • Validate that Prisma schema changes (Todo model definition) align with the data fetching logic in loaders and server functions
  • Confirm Route/loader configuration in src/routes/index.tsx examples matches the component's expected data structure
  • Ensure all code snippets are syntactically correct and follow TanStack Start patterns

Possibly related PRs

  • clerk updates #7073 — Updates Prisma generator/provider settings and client import path configurations, which intersects with the schema and import changes in this guide.
  • feat: add chatGPT page #7173 — Modifies the same TanStack Start guide section with server-side route loader wiring, though this PR substantially refactors that area with the Todo model and new import paths.

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: updating TanStack Start documentation to align with v7, including shifts to interactive CLI previews, Prisma schema updates (User/Post to Todo), and new project structure (src/ layout).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

Dangerous URL check

No absolute URLs to prisma.io/docs found.
No local URLs found.

@github-actions
Copy link
Contributor

Redirect check

This PR probably requires the following redirects to be added to static/_redirects:

  • This PR does not change any pages in a way that would require a redirect.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 16, 2025

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: e5848d4
Status: ✅  Deploy successful!
Preview URL: https://2133f5dc.docs-51g.pages.dev
Branch Preview URL: https://v7-tanstack-updates.docs-51g.pages.dev

View logs

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
content/800-guides/160-tanstack-start.mdx (1)

141-164: ---

Fix file path inconsistency across three code blocks.

Verification confirms the critical inconsistency you identified. The file at lines 141–164 correctly uses src/routes/index.tsx, establishing the guide's structure pattern. However, the subsequent three code blocks deviate:

  • Line 168: Should be src/routes/index.tsx (currently app/routes/index.tsx)
  • Line 197: Should be src/routes/index.tsx (currently app/routes/index.tsx)
  • Line 232: Should be src/routes/index.tsx (currently app/routes/index.tsx)

This inconsistency will lead developers astray—they'll attempt to create files in the wrong directory structure. Update all three blocks to align with the established src/ pattern:

- ```typescript file=app/routes/index.tsx
+ ```typescript file=src/routes/index.tsx
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c2671d7 and f3bb75b.

📒 Files selected for processing (1)
  • content/800-guides/160-tanstack-start.mdx (5 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-10-09T21:32:50.340Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7167
File: content/900-ai/prompts/astro.mdx:84-84
Timestamp: 2025-10-09T21:32:50.340Z
Learning: The `npx prisma init` command supports the following flags: `--db` (shorthand for `--datasource-provider prisma+postgres`), `--output` (specifies output location for generated client), `--generator-provider` (defines the generator provider), `--datasource-provider`, `--url`, `--preview-feature`, and `--with-model`. These are documented valid CLI options for Prisma init command.

Applied to files:

  • content/800-guides/160-tanstack-start.mdx
📚 Learning: 2025-10-08T16:23:00.388Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:85-90
Timestamp: 2025-10-08T16:23:00.388Z
Learning: For .mdx files in the prisma/docs repository: All headings and titles should use sentence case (e.g., "Getting started with Prisma ORM", "Best practices for authentication"), not title case. Exception: Always preserve exact casing for product names including "Prisma Postgres", "Prisma", "Prisma ORM", and "Prisma Data Platform".

Applied to files:

  • content/800-guides/160-tanstack-start.mdx
🪛 LanguageTool
content/800-guides/160-tanstack-start.mdx

[grammar] ~30-~30: Ensure spelling is correct
Context: ...Would you like to use Tailwind CSS? No - Selecte Toolchain None - *Select deployment a...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~80-~80: Ensure spelling is correct
Context: ...e @default(now()) } ``` This creates a Todod model that will be pushed to the databa...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Check internal links
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
content/800-guides/160-tanstack-start.mdx (1)

66-66: Update generator output path to align with src/ structure.

The generator output path specifies ../app/generated/prisma, but the guide promotes a src/ project structure (as shown in line 116: src/db.ts). This is inconsistent. Verify the correct output path matches the new structure, likely ../src/generated/prisma.

Comment on lines 82 to 88
### 2.2. Configure the Prisma Client generator

To get access to the variables in the `.env` file, they can either be loaded by your runtime, or by using `dotenv`.
Include an import for `dotenv` at the top of the `prisma.config.ts`

```ts
//add-start
import 'dotenv/config'
//add-end
import { defineConfig, env } from 'prisma/config';
export default defineConfig({
schema: 'prisma/schema.prisma',
migrations: {
path: 'prisma/migrations',
},
engine: 'classic',
datasource: {
url: env('DATABASE_URL'),
},
});
```

### 2.4. Configure the Prisma Client generator

Now, run the following command to create the database tables and generate the Prisma Client:
Now, run the following command to create the database tables:

```terminal
npx prisma migrate dev --name init
npm run db:seed -- --name init
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Resolve section numbering gap and title mismatch.

Two issues here:

  1. Section numbering: Line 89 shows "### 2.5. Seed the database", but this should be "### 2.3" (the numbering jumps from 2.2 to 2.5, skipping 2.3 and 2.4).
  2. Section title mismatch: Line 82's title says "Configure the Prisma Client generator", but the content (lines 84–88) describes creating database tables with npm run db:seed -- --name init. The section title should reflect what's actually being done.
🤖 Prompt for AI Agents
In content/800-guides/160-tanstack-start.mdx around lines 82–89, the heading at
line 82 ("Configure the Prisma Client generator") does not match the content
(running npm run db:seed to create tables) and the next heading at line 89 is
mis-numbered as "### 2.5. Seed the database"; change the line 82 heading to a
title that matches the action (e.g., "### 2.2. Seed / Create database tables"),
rename the heading currently numbered "2.5" to "### 2.3. Seed the database", and
then verify and adjust subsequent section numbers to be sequential so there are
no skipped numbers.

mhartington and others added 3 commits November 17, 2025 20:13
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Base automatically changed from prisma-7 to main November 19, 2025 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants