TanStack Start
Full-stack React framework powered by TanStack Router with type-safe file-based routing and SSR.
→ TanStack Start Documentation
What create-faster adds
Beyond the official setup, we include:
Project Structure:
- File-based routing with
__root.tsxlayout - Pre-styled landing page with dark theme
- Router configuration with scroll restoration
Development Scripts:
dev- Development server with dynamic port assignment (3000 or turborepo-specific)build- Production build, emits the Nitro server to.output/preview- Preview the production buildpostinstall- Generatessrc/routeTree.gen.tswithtsr generate(@tanstack/router-cli), sotscand the editor work right after install.devandbuildkeep the file up to date, and it is meant to be committedstart- Production server (node --env-file-if-exists=.env --env-file=.env.start .output/server/index.mjs): loads the app's.envwhen it exists (otherwise Node prints.env not found. Continuing without it.on stderr), then.env.start(NODE_ENV=productionand the app'sPORT), and listens on the app's port. Whenstartruns from the app directory, aPORTorNITRO_PORTexported in the shell overrides it; in Turborepo,turbo startfrom the root runs in strict env mode and drops shell variables, so only the two files apply
Vite Configuration:
- TanStack Router DevTools enabled (a panel of the TanStack Devtools shell when that module is selected)
- Nitro (
nitro/vite) as the production server: the build emits.output/server/index.mjs, whichstartruns. The Cloudflare Workers and Cloudflare Workers (static) deployments replace it - Tailwind CSS v4 via Vite plugin
- TypeScript path aliases through Vite's native
resolve.tsconfigPaths
Styling:
- Tailwind CSS v4 (latest version using new Vite plugin)
- Dark theme with slate color palette
- System font stack for optimal performance
Files created:
src/
├── components/
│ └── not-found.tsx # Root notFoundComponent
├── routes/
│ ├── ___root.tsx # Root layout with meta tags and styles
│ └── index.tsx # Home page with welcome content
├── router.tsx # Router instance with scroll restoration
└── styles.css # Global styles with Tailwind import
vite.config.ts # Vite config with all plugins
.env.start # NODE_ENV=production and the default PORT for `start` (both win over .env): port 3000, or the app's own port in Turborepo
tsconfig.json # TypeScript config with path aliasesDependencies
Integration notes:
- ORM integration: When Drizzle or Prisma is selected, database scripts are added to
package.json - Turborepo: Uses
@repo/dbpackage for shared database logic - Single repo: Includes database scripts directly in app package
- Build output:
.output/is added to.gitignore, and in Turborepo it is part of thebuildtask outputs so cached builds keep a runnable server
Compatible Modules
API
Data Fetching
Observability
Analytics
Testing

