Modern WebApp Template Optimized for AI-Assisted Development
This is a meticulously designed Vite + React template that demonstrates how to maximize AI programming tools' effectiveness through standardized project structure and conventions. Features carefully crafted Claude and Cursor rules that showcase how to collaborate with AI to build high-quality WebApps.
- Claude Rule Engineering - Precisely guide AI behavior patterns and development habits
- Cursor Rule Integration - Complete Cursor AI configuration rules in
.cursor/rules/directory - Intelligent Architecture Design - File organization structure optimized for AI understanding and code generation
- Convention over Configuration - Improve AI code generation quality through clear naming patterns and structural conventions
- AI-Friendly Documentation - Comprehensive project documentation to help AI quickly understand project context
- Vite 5 - Lightning-fast build tool with HMR
- React 19 - Latest React with concurrent features
- TypeScript - Complete type safety and IntelliSense
- TailwindCSS 4 - Utility-first CSS framework with Pastel color system
- Animated Components - Smooth animations with Framer Motion and optimized Spring presets
- Modern Design System - Clean, elegant design inspired by Vercel
- Theme Switching - Automatic dark/light theme switching
- Interactive Elements - Buttons, tooltips, icons with micro-interactions
- ESLint + Prettier - Code formatting and quality checks
- Git Hooks - Pre-commit code validation
- Auto Routing - File-based routing system with React Router DOM
- TypeScript Configuration - Optimized type configuration and path mapping
- Responsive Design - Mobile-first design approach
- Build Optimization - Code splitting and tree shaking
- Modern Browser Support - ES2020+ features
- Vercel Deployment Ready - Optimized configuration for Vercel deployment
- Node.js 18+
- pnpm (package manager)
- Cursor (recommended) or Claude Code for AI-assisted development
# Clone the template
git clone https://github.com/innei-template/smart-webapp-template
cd smart-webapp-template
# Install dependencies
pnpm install
# Start development server
pnpm devThis template comes pre-configured with comprehensive AI programming rules:
- Project-Level Configuration - Specific development conventions and patterns for this project
- Global Rules - User-level AI programming preferences and workflows
.cursor/rules/- Contains dedicated Cursor AI rule setscomponent-organization.mdc- Component organization standardsrouting.mdc- Routing pattern guidancecolor.mdc- Color system specificationsstyling.mdc- Styling guidelinesanimation.mdc- Animation implementation standardsstate-management.mdc- State management patterns
- File-Based Routing - Architecture designed for easy AI understanding and generation
- Component Architecture - Clear component layering and naming conventions
- State Management - Jotai-based state management patterns, easy for AI to understand and extend
src/
βββ components/ # Reusable UI components
β βββ ui/ # Base UI components (buttons, tooltips, etc.)
β βββ common/ # Common app components
βββ pages/ # File-based routing pages
βββ modules/ # Feature module components
βββ hooks/ # Custom React hooks
βββ lib/ # Utility functions and configurations
β βββ spring.ts # Optimized animation presets
βββ providers/ # Context providers
βββ styles/ # Global styles and Tailwind config
βββ assets/ # Static assets (fonts, images)
.cursor/
βββ rules/ # Cursor AI rule configurations
βββ component-organization.mdc
βββ routing.mdc
βββ color.mdc
βββ styling.mdc
βββ animation.mdc
βββ state-management.mdc
βββ development.mdc
- Multiple variants (primary, secondary, ghost, destructive)
- Animated loading states
- Framer Motion effects with optimized Spring presets
- Automatic dark/light mode detection
- Manual theme switching
- Persistent theme preferences
- Smooth transitions between themes
- Animated tooltips
- Icon buttons with hover effects
- Context menus
- Loading indicators
The template uses TailwindCSS 4 with custom configurations:
- Pastel color system - OKLCH color space with sRGB and P3 fallbacks
- Typography hierarchy standards
- Animation utility classes
- Built-in dark mode support
Path mapping configured for clean imports:
import { Button } from '~/components/ui/button/Button'
import { useDark } from '~/hooks/common/useDark'
import { Spring } from '~/lib/spring'AI-friendly code standard configurations:
- React best practices
- TypeScript strict rules
- Import sorting standards
- Code formatting consistency
- Clear Project Structure - Define clear file organization rules
- Convention over Configuration - Use consistent naming and structural patterns
- Context Optimization - Provide sufficient project information to help AI understand code intent
- Workflow Integration - Define clear development processes and quality check standards
Each .cursor/rules/*.mdc file demonstrates domain-specific AI guidance principles:
- Component Organization - How to build maintainable component architecture
- Routing Patterns - Best practices for file-based routing
- Styling System - Consistent styling guidelines
- State Management - Clear state management patterns
- Animation Standards - Optimized animation implementations with Spring presets
- Environment Setup - Configure Claude/Cursor rules
- Structure Understanding - AI quickly understands context through project structure
- Convention Adherence - Generate code according to established rules
- Quality Assurance - Automated checks and formatting
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Create a Pull Request
The project contains comprehensive AI programming guidance documentation:
- .cursor/rules/ - Cursor AI specialized rule collections
- Development Guide - Complete development workflow
- Architecture Documentation - System design and pattern descriptions
This template is open source and available under the MIT License.
2025 Β© Innei, Released under the MIT License.
Personal Website Β· GitHub @Innei
- Design inspiration from Vercel
- Icons by Mingcute
- Animations by Framer Motion
- Built with Vite and React
Ready to build something amazing? β‘