tanstack-start-routes
TanStack Start Routes
TanStack Start uses file-based routing with TanStack Router. Routes are defined as files in the src/routes directory.
When to Use
- Adding new pages to your application
- Setting up nested layouts
- Configuring route parameters
- Creating pathless layout routes
- Organizing route structure
Directory Structure
src/
├── routes/
│ ├── __root.tsx # Root layout (required)
│ ├── index.tsx # Home page (/)
More from netlify/swar-templates
content-collections
Use content-collections for type-safe content management with markdown files. Use when building blogs, documentation sites, or any content-driven pages with frontmatter and markdown.
1tanstack-start-loaders
Load data for TanStack Start routes using beforeLoad and loader functions. Use when fetching data for pages, implementing route guards, or setting up route context. IMPORTANT - Loaders should call server functions for data access.
1tanstack-start-project-setup
Set up and configure TanStack Start projects. Use when creating new projects, configuring the router, setting up TanStack Query integration, or configuring build settings.
1tanstack-start-api-routes
Create API routes (server routes) in TanStack Start for handling HTTP requests. Use when building REST APIs, webhooks, or any HTTP endpoint that returns data rather than rendering a page.
1