- Use PascalCase for component names
- Use camelCase for function, variable, and parameter names
- Use descriptive and semantic naming for all identifiers
- Organize code using a Next.js framework structure with app/ directory for pages/components
- Maintain separate directories for components, lib, public assets, etc.
- Keep configuration files (e.g., tailwind.config.ts, next.config.js) at the root level
- Use TypeScript throughout the codebase with type definitions in separate .d.ts files
- Implement functional components with hooks in React
- Use .tsx extension for component files
- Split components into smaller, reusable pieces
- Extract utility functions to separate files
- Include inline comments to explain complex logic or configurations
- Maintain a comprehensive README file with project information and setup instructions
- Keep documentation up-to-date, including installation instructions and repository URLs
- Implement consistent error handling and logging throughout the application
- Validate user inputs and API responses to prevent unexpected errors
- Utilize Next.js built-in optimizations
- Implement code splitting and lazy loading where appropriate
- Optimize API integrations and data fetching
- Use environment variables for sensitive information like API keys
- Implement proper input validation and sanitization
- Follow security best practices for authentication and authorization
- Use Tailwind CSS for styling with a custom configuration
- Maintain global styles in a separate globals.css file
- Use React context for global state management
- Utilize useState hook for local component state
- Follow semantic commit message conventions
- Maintain a .gitignore file to exclude unnecessary files from version control
- Use npm or yarn for package management
- Keep dependencies up-to-date and resolve conflicts promptly
- Implement unit tests for critical components and functions
- Aim for good test coverage across the application
- Use semantic HTML elements
- Implement ARIA attributes where necessary to enhance accessibility
- Maintain separate configurations for development and production environments
- Use a .env.example file to document required environment variables
- Follow Docker best practices for containerization
- Optimize Docker images for size and security