Build SSR applications with TanStack Start and Strapi CMS. Use when creating content-driven websites with server-side rendering, SEO requirements, and headless CMS integration. Covers monorepo setup, TanStack Query integration, type-safe API clients, and production-ready patterns.
Build production-ready SSR applications using TanStack Start (React) frontend with Strapi headless CMS backend.
frontend/ + backend/ in single repomy-app/
├── frontend/ # TanStack Start application
│ ├── src/
│ │ ├── routes/ # File-based routing
│ │ │ ├── __root.tsx # Root layout
│ │ │ ├── index.tsx # Home page
│ │ │ └── posts/
│ │ │ ├── index.tsx # List page
│ │ │ └── $slug.tsx # Detail page
│ │ ├── hooks/ # TanStack Query hooks
│ │ ├── lib/
│ │ │ └── strapiClient.ts # API client
│ │ ├── types/
│ │ │ └── strapi.ts # TypeScript types
│ │ └── components/ # UI components
│ ├── app.config.ts # TanStack Start config
│ └── package.json
├── backend/ # Strapi application
│ └── src/api/ # Content types
└── pnpm-workspace.yaml
Before starting, ask the user:
"Do you want to install the project in the current directory? (yes/no)"
frontend/ and backend/ directly in the current directoryfrontend/ and backend/ inside itIf installing in current directory:
# Create pnpm workspace in current directory
cat > pnpm-workspace.yaml << 'EOF'