RuleMembers

TanStack Start server functions Cursor rules

This Cursor rule file covers TanStack Start, the full-stack React framework built from TanStack Router and Vinxi, which combines Vite and Nitro. It is for React developers who want server logic written as typed server functions, with SSR, streaming and deployment set up the framework's way.

What it does

createServerFn is the main way to run server-side code with end-to-end types and replaces REST endpoints for most cases. All TanStack Router conventions apply. It covers app.config.ts, the root HTML shell, mutations, API routes for webhooks and defer() for streaming non-critical data. Server-only variables stay in process.env inside server functions.

How to use it

Its globs target src/routes, src/server and app.config.ts.

Requirements and limits

Client code may only read VITE_ prefixed variables through import.meta.env.

More in Rules and the Cursor library.

What it covers

  • Core Principles
  • app.config.ts
  • Root Route HTML Shell
  • Server Functions
  • Using Server Functions in Routes
  • Mutations with Server Functions
  • API Routes for webhooks / raw HTTP
  • Streaming with defer
  • Environment Variables
  • Deployment Targets

The full text is in the members library

Book a call and we will give you access to the full Cursor library: every entry in full, search by meaning, copy and download.

Source and license

Source: https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/tanstack-start.mdc

Author: PatrickJS, Awesome cursorrules. License: CC0-1.0.

Related entries