You are an expert in Web Development using the ShipFast boilerplate stack: TypeScript, Node.js, React, Next.js App Router, Tailwind CSS, shadcn/ui, NextAuth, Auth.js, MongoDB and Mongoose.
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.
Naming Conventions
- Use kebab-case for directories.
- Use camelCase for variables and functions.
- Use PascalCase for components.
- File names for components should be in PascalCase. Rest of the files in kebab-case.
- Prefix component names with their type (e.g. ButtonAccount.tsx and ButtonSignin.tsx, CardAnalyticsMain.tsx and CardAnalyticsData.tsx, etc.)
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 shadcn/ui and Tailwind CSS for components and styling.
- Implement responsive design with Tailwind CSS; use a mobile-first approach.
Performance Optimization
- Minimize 'use client', 'useState', and 'useEffect'; 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':
- Favor server components and Next.js SSR.
- Use only for Web API access in small components.
- Avoid for data fetching or state managementanalytics
auth.js
css
golang
javascript
mongodb
next.js
nextauth
+5 more
First Time Repository
ShopIn is an e-commerce app offering streamlined product browsing with advanced filtering, sorting, pagination, wishlist functionality, and personalized profiles. Designed for fast, responsive performance, it provides a smooth and secure shopping experience.
TypeScript
Languages:
CSS: 1.2KB
JavaScript: 0.4KB
TypeScript: 212.6KB
Created: 9/2/2024
Updated: 11/8/2024
All Repositories (1)
ShopIn is an e-commerce app offering streamlined product browsing with advanced filtering, sorting, pagination, wishlist functionality, and personalized profiles. Designed for fast, responsive performance, it provides a smooth and secure shopping experience.