1. - You are an expert in TypeScript, Node.js, Next.js App Router, React, Shadcn UI, and Tailwind and Framer Motion.
    2. - Code Style and Structure
    3. - Write concise, technical TypeScript code with accurate examples.
    4. - Use functional and declarative programming patterns; avoid classes.
    5. - Prefer iteration and modularization over code duplication.
    6. - Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
    7. - Structure files: exported component, subcomponents, helpers, static content, types.
    8. - Naming Conventions
    9. - All components should go in src/components and be named like new-component.tsx
    10. - Use lowercase with dashes for directories (e.g., components/auth-wizard).
    11. - Favor named exports for components.
    12. - TypeScript Usage
    13. - Use TypeScript for all code; prefer interfaces over types.
    14. - Avoid enums; use maps instead.
    15. - Use functional components with TypeScript interfaces.
    16. - Syntax and Formatting
    17. - Use the "function" keyword for pure functions.
    18. - Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.
    19. - Use declarative JSX.
    20. - UI and Styling
    21. - Use Shadcn UI, and Tailwind for components and styling.
    22. - Implement responsive design with Tailwind CSS; use a mobile-first approach.
    23. - Performance Optimization
    24. - Minimize 'use client', 'useEffect', and 'setState'; favor React Server Components (RSC).
    25. - Wrap client components in Suspense with fallback.
    26. - Use dynamic loading for non-critical components.
    27. - Optimize images: use WebP format, include size data, implement lazy loading.
    28. - Key Conventions
    29. - Use 'nuqs' for URL search parameter state management.
    30. - Optimize Web Vitals (LCP, CLS, FID).
    31. - Limit 'use client':
    32. - Favor server components and Next.js SSR.
    33. - Use only for Web API access in small components.
    34. - Avoid for data fetching or state management.
    35. - Follow Next.js docs for Data Fetching, Rendering, and Routing.
    36. - While creating placeholder images as a part of your seed data, use https://placekitten.com/
    37. - Place both the /app and /components folders under a /src directory. This organization offers several benefits:
    38. - It helps maintain a clean and organized project structure.
    39. - It allows for easier navigation and management of components and pages.
    40. - It adheres to common industry standards, making it easier for other developers to understand and contribute to the project.
    41. - It provides a clear separation between application logic (in /src/app) and UI components (in /src/components), improving code readability and reusability.
    42. - It simplifies the process of creating new pages and components, as you can easily find the corresponding files in the /src directory.
    43. - It makes the project more modular and easier to scale as the application grows.
    44. - It adheres to the principle of separation of concerns, where different aspects of the application are handled by different directories.
    45. ## Components Organization
    46. Within the /src/components folder, consider organizing components by type or feature:
    47. By Type: Group components like forms, buttons, layout elements, etc.
    48. By Feature: For larger applications, group components related to specific features or domains
    49. For example:
    50. /src/components
    51. ├── /ui
    52. ├── /Button
    53. ├── /Modal
    54. └── /Card
    55. ├── /forms
    56. ├── /TextField
    57. └── /Select
    58. └── /layout
    59. ├── /Navbar
    60. └── /Footer
    61. - Private Components: For components used only within specific pages, you can create a _components folder within the relevant /app subdirectory.
    62. - Shared Components: The /src/components folder should contain reusable components used across multiple pages or features.
    63. - Modular Approach: As your project grows, consider adopting a more modular structure, where each feature or domain has its own folder containing components, hooks, and utilities specific to that feature.