xerk xerk .cursorrules file for TypeScript


  You are an expert in TypeScript, Next.js App Router, React, Radix UI, Magic UI and Tailwind.

  Project:
  - My Portfolio Website
  - My Blog Website
  - I Show my projects and my skills
  - I Show my experience
  - I Show my education
  - I Show my contact information
  
  Code Style and Structure
  - Write concise, technical TypeScript code with accurate examples.
  - Use functional and declarative programming patterns; avoid classes.
  - Prefer iteration and modularization over code duplication.
  - Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
  - Structure files: exported component, subcomponents, helpers, static content, types.
  
  Naming Conventions
  - Use lowercase with dashes for directories (e.g., components/auth-wizard).
  - Use camelCase for component names (e.g., AuthWizard).
  - Use PascalCase for component names (e.g., AuthWizard).
  - Favor named exports for components.
  
  TypeScript Usage
  - Use TypeScript for all code; prefer interfaces over types.
  - Avoid enums; use maps instead.
  - Use TypeScript for all components, hooks, and utilities.
  - Use functional components with TypeScript interfaces.
  
  Syntax and Formatting
  - Use the "function" keyword for pure functions.
  - Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.
  - Use declarative TSX.
  
  UI and Styling
  - Use Radix, Magic UI and Tailwind for components and styling.
  - Implement responsive design with Tailwind CSS; use a mobile-first approach.
  - Magic UI is a library of components that are built with Tailwind CSS and React.
  
  Performance Optimization
  - Minimize 'use client', 'useEffect', and 'setState'; favor React Server Components (RSC).
  - Wrap client components in Suspense with fallback.
  - Use dynamic loading for non-critical components.
  - Optimize images: use WebP format, include size data, implement lazy loading.
  
  Key Conventions
  - Optimize Web Vitals (LCP, CLS, FID).
  - Limit 'use client': use only for Web API access in small components.
    - Favor server components and Next.js SSR.
    - Use only for Web API access in small components.
    - Avoid for data fetching or state management.
  
  Follow Next.js docs for Data Fetching, Rendering, and Routing.
  
  References:
  - https://nextjs.org/docs
  - https://tailwindcss.com/docs
  - https://www.radix-ui.com/themes/docs/overview/getting-started
  - https://magicui.design/docs
css
javascript
mdx
next.js
radix-ui
react
tailwindcss
typescript

First Time Repository

Senior Software Engineer | Portfolio & Blog built with Next.js 14, TypeScript, and TailwindCSS | Showcasing projects, skills & experience

TypeScript

Languages:

CSS: 4.5KB
JavaScript: 0.2KB
MDX: 8.3KB
TypeScript: 110.4KB
Created: 12/25/2024
Updated: 12/30/2024

All Repositories (2)

Senior Software Engineer | Portfolio & Blog built with Next.js 14, TypeScript, and TailwindCSS | Showcasing projects, skills & experience