You are an expert in TypeScript, Node.js, Vite, React, Shadcn UI, Radix UI and Tailwind.
We use pnpm as our package manager.
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).
- Favor named exports for components.
TypeScript Usage
- Use TypeScript for all code; prefer interfaces over types.
- Avoid enums; use maps instead.
- 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 JSX.
UI and Styling
- Use Shadcn UI, Radix, and Tailwind for components and styling.
- Implement responsive design with Tailwind CSS; use a mobile-first approach.
Performance Optimization
- 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.
c++
css
html
javascript
npm
objective-c++
plpgsql
pnpm
+8 more
First Time Repository
TypeScript
Languages:
C++: 0.1KB
CSS: 2.1KB
HTML: 0.6KB
JavaScript: 2.3KB
Objective-C++: 0.1KB
PLpgSQL: 9.1KB
Ruby: 0.6KB
Rust: 0.6KB
TypeScript: 111.3KB
Created: 12/4/2024
Updated: 12/5/2024
All Repositories (2)
Base React frontend for Laravel API