Overview
The TailStack React package is a standalone, production-grade frontend architecture template that provides a modern, high-performance foundation for building client-side applications. It leverages cutting-edge technologies including Vite 6, React 19, Tailwind CSS 4, and Shadcn UI.Perfect For
- Single-page applications (SPAs)
- Progressive web apps (PWAs)
- Client-side rendered dashboards
- Modern UI-focused projects
Package Information
Technical Stack
Vite 6
Lightning-fast build tool with instant HMR and optimized production builds
React 19
Latest React with improved performance and new features
Tailwind CSS 4
New engine for better performance and developer experience
TypeScript 5.9
Full type safety with the latest TypeScript features
Project Structure
Available Scripts
Dependencies
Core Libraries
React & Routing
React & Routing
- React 19 with improved performance and concurrent features
- React Router 7 for declarative routing
Styling & UI
Styling & UI
- Tailwind CSS 4 with new high-performance engine
- Lucide React for beautiful icons
- CVA for component variant management
- Utility functions for className handling
Utilities
Utilities
- Axios for HTTP requests
- Sonner for elegant toast notifications
Development Dependencies
Build Tools
Build Tools
Linting & Types
Linting & Types
Additional Tools
Additional Tools
Vite Configuration
Key Features
- Path Aliases: Use
@/to import fromsrc/directory - React Plugin: Fast refresh and JSX runtime
- Tailwind Plugin: Native Tailwind CSS 4 integration
Component Architecture
Shadcn UI Components
The package includes pre-built, accessible UI components from Shadcn UI in thesrc/components/ui/ directory.
Shadcn components are not installed as dependencies. They’re copied into your project, giving you full control to customize them.
Component Categories
UI Components
Reusable Shadcn UI primitives in
components/ui/Layout Components
Page layouts and structural elements in
components/layout/Feature Components
Domain-specific components (weather, docs, home)
Page Components
Top-level page components in
pages/Custom Hooks
Thesrc/hooks/ directory contains reusable React hooks for common functionality:
- State management hooks
- API data fetching hooks
- Browser API hooks
- Custom effect hooks
API Layer
Thesrc/api/ directory provides a structured approach to API communication:
TypeScript Configuration
Key TypeScript settings for optimal React development:- Target: ES2022 for modern JavaScript features
- Module Resolution: Bundler mode for Vite
- Path Aliases:
@/*maps to./src/* - Strict Mode: Enabled for maximum type safety
- JSX: React JSX transform
Weather App Demo
The React package includes a fully functional multi-page weather application to showcase the architecture and component patterns.
src/components/weather/, the demo demonstrates:
- API integration patterns
- Component composition
- State management
- Routing between pages
- UI component usage
Agent Skills
Pre-configured Skills
Vercel React Best Practices
Vercel React Best Practices
Comprehensive performance optimization guide for React applications.
- 57 rules across 8 categories
- Performance optimization patterns
- React rendering best practices
- Code splitting strategies
Tailwind v4 + shadcn/ui Production Stack
Tailwind v4 + shadcn/ui Production Stack
AI agent skill for working with Tailwind CSS v4 and Shadcn UI.
- Component generation
- Styling patterns
- Dark mode implementation
- Responsive design
Supported AI Agents
- Gemini
- Claude
- Codex
- Cursor
- OpenCode
- Trae
Development Workflow
Getting Started
Hot Module Replacement
Vite provides instant HMR for:- React components
- Tailwind CSS classes
- TypeScript files
- Static assets
Production Build
Build Process
- Runs TypeScript compiler (
tsc -b) - Creates optimized production bundle with Vite
- Outputs to
dist/directory
Optimization Features
Code Splitting
Automatic route-based code splitting
Tree Shaking
Removes unused code from bundle
Asset Optimization
Optimizes images and static assets
CSS Minification
Minifies and optimizes CSS output
Best Practices
Component Organization
Import Patterns
Type Safety
Performance Tips
Code Splitting
Code Splitting
Use React.lazy() for route-based code splitting:
Memoization
Memoization
Use React.memo() for expensive components:
Optimize Re-renders
Optimize Re-renders
Use useMemo() and useCallback() to prevent unnecessary re-renders:
Next Steps
Core Package
Learn about the full monorepo architecture
Node Package
Integrate with the backend API
Components
Explore available UI components
Deployment
Deploy your React application