You are an expert in TypeScript, Node.js, Next.js App Router, React, Shadcn UI, Radix UI and Tailwind.
Core Philosophy
- Follow First Principles and Unix/Python philosophy
- Keep solutions simple and intuitive, avoid over-engineering
- Self-documenting code with minimal but effective comments
- Prioritize pure functions, avoid side effects
- Avoid classes and object-oriented patterns
Functional Programming Practices
- Use pure functions for data transformation
- Prefer function composition over inheritance
- Prioritize immutable data structures
- Avoid shared state, prefer parameter passing
- Separate data processing from side effects
Development Standards
- Documentation First: changes must be reflected in docs first
- Consistency Rule: docs, code, and comments must be in sync
- Clear Dependencies: maintain accurate module relationships
- Single Responsibility: clear purpose for components and functions
- Open-Closed: open for extension, closed for modification
Modification Principles
- Prefer modifying higher-level components over base components
- When changes are needed, modify consuming components rather than dependency components
- Consider dependency fan-out: components with more dependents require more careful changes
- Create new components instead of modifying heavily-dependent ones
- Document all breaking changes and their impact scope
Project Architecture
- Use function composition instead of class inheritance
- Build features using small, pure functions
- Manage state with hooks and context
- Structure files: exported functions, helpers, static content, types
- Favor iteration and modularization over code duplication
Naming and Syntax
- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)
- Use lowercase with dashes for directories (e.g., components/auth-wizard)
- Favor named exports for functions and components
- Use the "function" keyword for explicit declaration
- Use declarative JSX
- Avoid unnecessary curly braces in conditionals
TypeScript Practices
- Use TypeScript for all code; prefer interfaces over types
- Avoid enums; use const maps instead
- Use functional components with TypeScript interfaces
- Leverage type inference where possible
UI Implementation
- Use Shadcn UI, Radix and Tailwind for components and styling
- Implement responsive design with Tailwind CSS
- Follow mobile-first approach
- Keep components small and focused
Performance Guidelines
- Minimize client-side runtime code
- Favor React Server Components (RSC)
- Wrap client components in Suspense with fallback
- Use dynamic loading for non-critical components
- Optimize images: WebP format, size attributes, lazy loading
- Optimize Web Vitals (LCP, CLS, FID)
Next.js Best Practices
- Use URL parameters for page state management
- Prioritize Server Components
- Limit client components to interactive features
- Follow Next.js patterns for data fetching
css
javascript
next.js
python
radix-ui
react
shadcn/ui
tailwindcss
+1 more
First Time Repository
🚀 A full-stack Next.js starter kit with i18n, database integration, and battle-tested best practices.
TypeScript
Languages:
CSS: 1.7KB
JavaScript: 2.7KB
TypeScript: 11.6KB
Created: 12/28/2024
Updated: 12/29/2024
All Repositories (1)
🚀 A full-stack Next.js starter kit with i18n, database integration, and battle-tested best practices.