Skip to content

Conversation

@digoburigo
Copy link
Contributor

@digoburigo digoburigo commented Oct 14, 2025

Summary by CodeRabbit

  • Documentation
    • Added a new reference page for the TanStack Start server adapter. It covers installation steps, how to mount the API, and how to set up Prisma integration. Includes code snippets for a catch-all API route, examples for CRUD methods (GET, POST, PUT, PATCH, DELETE), configuration guidance, and error-handling best practices. Clarifies how to expose handlers and structure routes. No changes to runtime behavior or public APIs.

@vercel
Copy link

vercel bot commented Oct 14, 2025

@digoburigo is attempting to deploy a commit to the ZenStack Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 14, 2025

Walkthrough

Adds a new documentation page describing the TanStack Start server adapter, including installation, mounting via TanStackStartHandler, configuration (AdapterOptions, getPrisma), usage examples for a catch-all API route, and CRUD handler exposure (GET/POST/PUT/PATCH/DELETE). No source code or public API changes.

Changes

Cohort / File(s) Summary of Changes
Documentation: TanStack Start adapter
docs/reference/server-adapters/tanstack-start.mdx
Introduces a reference page covering installation, configuration (AdapterOptions, getPrisma), mounting with TanStackStartHandler, API routing examples, and error handling. No code changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Pre-merge checks and finishing touches

✅ 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 succinctly conveys the primary change by indicating that documentation for the TanStack Start adapter is being added, and it is directly related to the new MDX file introduced in the changeset. It avoids unnecessary details and focuses on the main purpose of the pull request.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

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: 0

🧹 Nitpick comments (4)
docs/reference/server-adapters/tanstack-start.mdx (4)

19-21: Install snippet likely missing a required package (@zenstackhq/runtime).

The example imports enhance from @zenstackhq/runtime, but the install section only installs @zenstackhq/server. Add @zenstackhq/runtime to prevent copy/paste failures.

-```bash
-npm install @zenstackhq/server
-```
+```bash
+npm install @zenstackhq/server @zenstackhq/runtime
+```

27-55: Verify adapter symbol and broaden handler map (catch‑all, CORS).

  • Confirm the exported API is TanStackStartHandler from @zenstackhq/server/tanstack-start (naming often follows a create...Handler pattern). Also confirm the catch‑all path '/api/$' matches nested paths as intended; if you need deep segments, ensure you’re using the correct “splat” route.
  • Consider handling OPTIONS and HEAD to avoid 405s and enable CORS preflights.
         handlers: {
             GET: handler,
             POST: handler,
             PUT: handler,
             PATCH: handler,
             DELETE: handler,
+            OPTIONS: handler,
+            HEAD: handler,
         }

7-9: Imports: consistency and existence of partials.

  • Add a semicolon to the UsingAPI import for consistency.
  • Please confirm ./_error-handling.md, ./_options.mdx, and ./_using-api.mdx exist and default‑export MDX components (MDX loaders sometimes require default exports).
-import UsingAPI from './_using-api.mdx'
+import UsingAPI from './_using-api.mdx';

59-59: Prefer concrete types for getPrisma in AdapterOptions.

Documenting unknown makes usage vague. Consider specifying the expected Prisma/Enhanced Prisma type to improve DX and autocomplete.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 46a31dd and db77f20.

📒 Files selected for processing (1)
  • docs/reference/server-adapters/tanstack-start.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/reference/server-adapters/tanstack-start.mdx

[grammar] ~7-~7: There might be a mistake here.
Context: ...rorHandling from './_error-handling.md'; import AdapterOptions from './_options.m...

(QB_NEW_EN)


[grammar] ~8-~8: There might be a mistake here.
Context: ...rt AdapterOptions from './_options.mdx'; import UsingAPI from './_using-api.mdx' ...

(QB_NEW_EN)

Copy link
Member

@ymc9 ymc9 left a comment

Choose a reason for hiding this comment

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

Thank you @digoburigo ! I'm wrapping up the 2.20 releasae.

@ymc9 ymc9 merged commit 64166da into zenstackhq:main Oct 15, 2025
2 of 3 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Nov 1, 2025
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.

2 participants