start-core/server-routes

Build API endpoints alongside UI routes with TanStack Start.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/redacharf/fin-punk --skill start-core-server-routes-redacharf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: start-core/server-routes
Source: https://github.com/redacharf/fin-punk/tree/main/.agents/skills/start-core/server-routes
Command: npx skills add https://github.com/redacharf/fin-punk --skill start-core-server-routes-redacharf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Define and manage server-side API endpoints together with app routes using TanStack Start, enabling coherent routing and data handling across the full stack.

Core Features & Use Cases

  • Server routes alongside UI routes: Define API handlers in tandem with UI routes using createFileRoute and the server property.
  • Per-route middleware & context: Compose middleware and access request, params, and context for flexible, secure endpoints.
  • Dynamic routing & handlers: Implement GET/POST/PUT/DELETE handlers with strong typing and consistent behavior across routes.
  • Use Case: Build a small admin API under /api and a corresponding UI route under /admin with shared authentication and validation logic.

Quick Start

Create a server route file using createFileRoute with a GET handler and verify it responds to requests.

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 create API routes alongside UI routes in TanStack Start?

API routes in TanStack Start are created alongside UI routes using the createFileRoute pattern with a server property, allowing you to define API handlers in tandem with UI components for coherent full-stack routing.

Can I use per-route middleware for server handlers in TanStack Start?

Yes, server routes support per-route middleware composition, enabling you to access request data, params, and context to build flexible and secure API endpoints within TanStack Start.

How do I implement GET and POST handlers with TypeScript in TanStack Start server routes?

Server routes implement GET/POST/PUT/DELETE handlers with strong typing by defining them within the server property of createFileRoute, ensuring consistent behavior and type safety across API endpoints.

What do I need to know to build server routes with TanStack Start?

Building server routes requires familiarity with TypeScript, TanStack Router, and createFileRoute patterns to implement per-route server handlers, request parsing, and middleware composition effectively.

What is the best way to structure a small admin API and UI with shared authentication in TanStack Start?

Define an admin API under /api using server routes and a corresponding UI route under /admin, sharing authentication and validation logic through per-route middleware and context composition.

How does request parsing work for API endpoints in TanStack Start?

Request parsing for API endpoints in TanStack Start works through per-route server handlers that access request data, params, and context, enabling robust data handling across the full stack.