start-core/server-routes

Define TanStack Start server routes with per-route middleware and HTTP handlers.

4|1|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/lespaceman/athena-workflow-marketplace --skill start-core-server-routes-lespaceman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: start-core/server-routes
Source: https://github.com/lespaceman/athena-workflow-marketplace/tree/main/plugins/tanstack-start/skills/upstream/%40tanstack/start-client-core/skills/start-core/server-routes
Command: npx skills add https://github.com/lespaceman/athena-workflow-marketplace --skill start-core-server-routes-lespaceman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Solves the complexity of pairing server-side endpoints with application routes and per-route middleware by providing a unified pattern for defining routes in TanStack Start.

Core Features & Use Cases

  • Define server routes using createFileRoute and specify HTTP method handlers (GET, POST, PUT, DELETE).
  • Attach per-route middleware and access handler context (request, params, context).
  • Follow file-based routing conventions and naming for consistent route definitions across TanStack Start projects.
  • Use in projects that colocate UI routes and server endpoints to share routing logic.

Quick Start

Create or modify a route file under routes to define a server endpoint with GET/POST handlers and optional middleware.

Frequently Asked Questions about start-core/server-routes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define server routes alongside UI routes in TanStack Start?

You define server routes in TanStack Start by using createFileRoute within your routes directory to colocate server endpoints and application UI. This pattern pairs HTTP method handlers with shared file-based routing logic.

How do I attach middleware to specific API endpoints in TanStack Start?

You attach per-route middleware in TanStack Start by configuring it within the server route definition. This allows the route to access handler context, including the request, params, and context objects.

Can I colocate API endpoints and application routes in the same project?

Yes, you can colocate UI routes and server endpoints in the same TanStack Start project. This approach shares routing logic and follows consistent file-based naming conventions across your application.

What HTTP methods can I handle with server routes in TanStack Start?

Server routes in TanStack Start support specifying HTTP method handlers for GET, POST, PUT, and DELETE requests. You define these methods directly within your route file.

What is the best way to structure request handling for colocated server routes?

The best way to structure request handling is using a unified pattern for defining routes with createFileRoute. This provides access to request context and applies per-route middleware for consistent server endpoint definitions.