Frontend Stack Selection
The CTO platform supports two frontend stack philosophies. Use this skill to choose the appropriate stack when generating Blaze tasks.
Quick Reference
| Stack |
Best For |
Router |
Data Layer |
Tables |
Forms |
| shadcn (Default) |
Marketing, SEO, SSR, e-commerce |
Next.js App Router |
Server Actions + React Query |
shadcn Table |
React Hook Form |
| tanstack |
Dashboards, real-time, local-first |
TanStack Router |
TanStack DB + Query |
TanStack Table |
TanStack Form |
Option A: shadcn Stack (Default)
Best for: Marketing sites, SEO-focused apps, content-heavy sites, e-commerce, SSR applications
Core Technologies:
- Router: Next.js App Router (SSR, file-based routing, RSC)
- Data: Server Actions + React Query for client-side caching
- UI: shadcn/ui components (Radix primitives + Tailwind)
- Forms: React Hook Form + Effect Schema validation
- Animation: anime.js for motion design
- Type System: Effect (type-safe errors, Schema, services)
Strengths:
- Excellent SEO with server-side rendering
- Built-in image optimization, fonts, and metadata
- Streaming and progressive enhancement
- Mature ecosystem with extensive documentation
Task XML Example:
<task id="1">
<meta>
<title>Build Marketing Landing Page</title>
<agent>blaze</agent>
<frontend_stack>shadcn</frontend_stack>
</meta>
<context>
<overview>Create SEO-optimized landing page with lead capture form</overview>
<stack_rationale>shadcn selected for SSR, SEO, and Server Actions</stack_rationale>
</context>
</task>
Option B: TanStack Stack
Best for: Dashboards, admin panels, real-time apps, collaborative tools, offline-first, local-first applications
Core Technologies:
- Router: TanStack Router (type-safe, client-first, search params)
- Data: TanStack DB (collections, live queries, optimistic updates)
- Query: TanStack Query (always included, server-state management)
- Tables: TanStack Table (sorting, filtering, pagination, virtualization)
- Forms: TanStack Form + Effect Schema validation
- Lists: TanStack Virtual (100k+ items at 60fps)
- Full-Stack: TanStack Start (optional, for greenfield projects)
- UI: shadcn/ui components (compatible with both stacks)
- Type System: Effect (type-safe errors, Schema, services)
Strengths:
- Sub-millisecond live queries (~0.7ms for 100k items)
- Optimistic mutations with automatic rollback
- Type-safe routing with search param validation
- Client-first architecture for instant UI feedback
- Normalized collections prevent data duplication
- Sync modes: eager, on-demand, progressive
Task XML Example:
<task id="2">
<meta>
<title>Build Analytics Dashboard</title>
<agent>blaze</agent>
<frontend_stack>tanstack</frontend_stack>
</meta>
<context>
<overview>Create real-time analytics dashboard with live data updates</overview>
<stack_rationale>TanStack selected for live queries and sub-millisecond reactivity</stack_rationale>
</context>
</task>
Stack Selection Keywords
Use these keyword patterns to determine the appropriate stack:
| PRD Keywords |
Recommended Stack |
Rationale |
| dashboard, admin panel, data grid, data-heavy |
tanstack |
TanStack Table + live queries excel at data-dense UIs |
| real-time, live updates, collaborative |
tanstack |
TanStack DB provides sub-ms live query reactivity |
| offline-first, local-first, sync |
tanstack |
TanStack DB collections support multiple sync strategies |
| optimistic UI, instant feedback |
tanstack |
Built-in optimistic mutations with rollback |
| marketing, landing page, brochure |
shadcn |
SSR and SEO optimization |
| SEO, search engine, metadata |
shadcn |
Next.js RSC with streaming |
| blog, content, CMS |
shadcn |
Server-side rendering for content |
| e-commerce, checkout, payment |
shadcn |
Server Actions for secure transactions |
| forms-heavy, wizard, multi-step |
Either |
Both have excellent form libraries |
Frontend Stack in Task XML
When generating tasks for Blaze, include the <frontend_stack> element in the task meta:
<task id="{{task_id}}" priority="high">
<meta>
<title>Task Title</title>
<agent>blaze</agent>
<job_type>coder</job_type>
<frontend_stack>tanstack</frontend_stack> <!-- or "shadcn" -->
</meta>
<context>
<overview>Task description</overview>
<stack_rationale>Why this stack was selected</stack_rationale>
</context>
<!-- ... rest of task -->
</task>
If frontend_stack is omitted, Blaze defaults to the shadcn stack.
Mixed Stack Projects
For projects requiring both stacks (e.g., marketing site with dashboard):
- Separate Next.js routes: Use Next.js for marketing (
/) and TanStack for dashboard (/app/*)
- Micro-frontends: Separate deployments communicating via shared state
- Progressive migration: Start with shadcn, add TanStack for specific features
Document the approach in the task context when mixed stacks are needed.
1---2name: frontend-stack-selection3description: Decision framework for choosing between shadcn (SSR/SEO) and TanStack (real-time/client-first) frontend stacks4---5
6# Frontend Stack Selection
7
8The CTO platform supports two frontend stack philosophies. Use this skill to choose the appropriate stack when generating Blaze tasks.
9
10## Quick Reference
11
12| Stack | Best For | Router | Data Layer | Tables | Forms |
13|-------|----------|--------|------------|--------|-------|
14| **shadcn** (Default) | Marketing, SEO, SSR, e-commerce | Next.js App Router | Server Actions + React Query | shadcn Table | React Hook Form |
15| **tanstack** | Dashboards, real-time, local-first | TanStack Router | TanStack DB + Query | TanStack Table | TanStack Form |
16
17---
18
19## Option A: shadcn Stack (Default)
20
21**Best for**: Marketing sites, SEO-focused apps, content-heavy sites, e-commerce, SSR applications
22
23**Core Technologies**:
24- **Router**: Next.js App Router (SSR, file-based routing, RSC)
25- **Data**: Server Actions + React Query for client-side caching
26- **UI**: shadcn/ui components (Radix primitives + Tailwind)
27- **Forms**: React Hook Form + Effect Schema validation
28- **Animation**: anime.js for motion design
29- **Type System**: Effect (type-safe errors, Schema, services)
30
31**Strengths**:
32- Excellent SEO with server-side rendering
33- Built-in image optimization, fonts, and metadata
34- Streaming and progressive enhancement
35- Mature ecosystem with extensive documentation
36
37**Task XML Example**:
38
39```xml
40<task id="1">
41 <meta>
42 <title>Build Marketing Landing Page</title>
43 <agent>blaze</agent>
44 <frontend_stack>shadcn</frontend_stack>
45 </meta>
46 <context>
47 <overview>Create SEO-optimized landing page with lead capture form</overview>
48 <stack_rationale>shadcn selected for SSR, SEO, and Server Actions</stack_rationale>
49 </context>
50</task>
51```
52
53---
54
55## Option B: TanStack Stack
56
57**Best for**: Dashboards, admin panels, real-time apps, collaborative tools, offline-first, local-first applications
58
59**Core Technologies**:
60- **Router**: TanStack Router (type-safe, client-first, search params)
61- **Data**: TanStack DB (collections, live queries, optimistic updates)
62- **Query**: TanStack Query (always included, server-state management)
63- **Tables**: TanStack Table (sorting, filtering, pagination, virtualization)
64- **Forms**: TanStack Form + Effect Schema validation
65- **Lists**: TanStack Virtual (100k+ items at 60fps)
66- **Full-Stack**: TanStack Start (optional, for greenfield projects)
67- **UI**: shadcn/ui components (compatible with both stacks)
68- **Type System**: Effect (type-safe errors, Schema, services)
69
70**Strengths**:
71- Sub-millisecond live queries (~0.7ms for 100k items)
72- Optimistic mutations with automatic rollback
73- Type-safe routing with search param validation
74- Client-first architecture for instant UI feedback
75- Normalized collections prevent data duplication
76- Sync modes: eager, on-demand, progressive
77
78**Task XML Example**:
79
80```xml
81<task id="2">
82 <meta>
83 <title>Build Analytics Dashboard</title>
84 <agent>blaze</agent>
85 <frontend_stack>tanstack</frontend_stack>
86 </meta>
87 <context>
88 <overview>Create real-time analytics dashboard with live data updates</overview>
89 <stack_rationale>TanStack selected for live queries and sub-millisecond reactivity</stack_rationale>
90 </context>
91</task>
92```
93
94---
95
96## Stack Selection Keywords
97
98Use these keyword patterns to determine the appropriate stack:
99
100| PRD Keywords | Recommended Stack | Rationale |
101|--------------|-------------------|-----------|
102| dashboard, admin panel, data grid, data-heavy | `tanstack` | TanStack Table + live queries excel at data-dense UIs |
103| real-time, live updates, collaborative | `tanstack` | TanStack DB provides sub-ms live query reactivity |
104| offline-first, local-first, sync | `tanstack` | TanStack DB collections support multiple sync strategies |
105| optimistic UI, instant feedback | `tanstack` | Built-in optimistic mutations with rollback |
106| marketing, landing page, brochure | `shadcn` | SSR and SEO optimization |
107| SEO, search engine, metadata | `shadcn` | Next.js RSC with streaming |
108| blog, content, CMS | `shadcn` | Server-side rendering for content |
109| e-commerce, checkout, payment | `shadcn` | Server Actions for secure transactions |
110| forms-heavy, wizard, multi-step | Either | Both have excellent form libraries |
111
112---
113
114## Frontend Stack in Task XML
115
116When generating tasks for Blaze, include the `<frontend_stack>` element in the task meta:
117
118```xml
119<task id="{{task_id}}" priority="high">
120 <meta>
121 <title>Task Title</title>
122 <agent>blaze</agent>
123 <job_type>coder</job_type>
124 <frontend_stack>tanstack</frontend_stack> <!-- or "shadcn" -->
125 </meta>
126 <context>
127 <overview>Task description</overview>
128 <stack_rationale>Why this stack was selected</stack_rationale>
129 </context>
130 <!-- ... rest of task -->
131</task>
132```
133
134If `frontend_stack` is omitted, Blaze defaults to the **shadcn** stack.
135
136---
137
138## Mixed Stack Projects
139
140For projects requiring both stacks (e.g., marketing site with dashboard):
141
1421. **Separate Next.js routes**: Use Next.js for marketing (`/`) and TanStack for dashboard (`/app/*`)
1432. **Micro-frontends**: Separate deployments communicating via shared state
1443. **Progressive migration**: Start with shadcn, add TanStack for specific features
145
146Document the approach in the task context when mixed stacks are needed.