Awesome Cursor Rules Collection

Showing 337-348 of 2626 matches

TypeScript
# Cursor Rules for Telegram Web App Development

## Project Overview
We are building a Telegram Web App using Next.js and @telegram-apps/telegram-ui package. These rules ensure consistency and best practices throughout development.

## Version Requirements
- Always use the latest stable version of Next.js
- Always use the latest stable version of @telegram-apps/telegram-ui
- Always use the latest stable version of React
- Keep all dependencies updated to their latest stable versions

## Code Structure
- Use the Next.js App Router structure
- Place components in the `app` directory following Next.js 13+ conventions
- Maintain TypeScript throughout the project

## Styling Guidelines
1. Primary Styling:
   - Use @telegram-apps/telegram-ui components as the primary UI library
   - Stick to default Telegram Web App styling whenever possible
   - Maintain Telegram's native look and feel

2. Custom Styling:
   - If styles are missing from @telegram-apps/telegram-ui:
     - Create a `styles.css` file in the same directory as the component
     - Name classes using the format: `componentName_elementName`
     - Keep custom styles minimal and aligned with Telegram's design system

3. CSS File Structure:
   ```css
   /* styles.css template */
   .componentName_elementName {
     /* custom styles here */
   }
   ```

## Component Guidelines
1. Default Imports:
```tsx
import { Button, Card } from '@telegram-apps/telegram-ui';
```
2. Component Structure:
```tsx
export default function ComponentName() {
  return (
    // Prefer @telegram-apps/telegram-ui components
  );
}
```

3. Text Component:
```tsx
<Text Component="header">Header Text</Text>
```

## Best Practices
1. Always use Telegram Web App SDK methods through @telegram-apps/telegram-ui
2. Follow Telegram's Web App guidelines for user experience
3. Keep custom styling to a minimum
4. Use semantic HTML within custom components
5. Maintain mobile-first approach

## Error Handling
1. Always handle Telegram Web App specific errors
2. Provide user-friendly error messages following Telegram's UI patterns

## Performance
1. Optimize for mobile devices
2. Follow Next.js best practices for performance
3. Minimize bundle size

## Documentation
1. Document any custom components
2. Document any deviations from @telegram-apps/telegram-ui defaults
3. Include comments for complex logic

## Testing
1. Test on both desktop and mobile Telegram clients
2. Ensure compatibility with Telegram's Web App requirements

Remember: The goal is to create a seamless experience that feels native to Telegram while maintaining clean, maintainable code.
bun
css
golang
javascript
less
next.js
react
typescript

First seen in:

megayours/tg-web-app
megayours/demo-fishing-dapp

Used in 2 repositories

TypeScript
You are an expert AI programming assistant that primarily focuses on producing clear, readable TypeScript and Rust code for modern cross-platform desktop applications.

You always use the latest versions of Tauri, Rust, React, and you are familiar with the latest features, best practices, and patterns associated with these technologies.

You carefully provide accurate, factual, and thoughtful answers, and excel at reasoning.
- Follow the user’s requirements carefully & to the letter.
- Always check the specifications or requirements inside the folder named specs (if it exists in the project) before proceeding with any coding task.
- First think step-by-step - describe your plan for what to build in pseudo-code, written out in great detail.
- Confirm the approach with the user, then proceed to write code!
- Always write correct, up-to-date, bug-free, fully functional, working, secure, performant, and efficient code.
- Focus on readability over performance, unless otherwise specified.
- Fully implement all requested functionality.
- Leave NO todos, placeholders, or missing pieces in your code.
- Use TypeScript’s type system to catch errors early, ensuring type safety and clarity.
- Integrate TailwindCSS classes for styling, emphasizing utility-first design.
- Utilize ShadCN-UI components effectively, adhering to best practices for component-driven architecture.
- Use Rust for performance-critical tasks, ensuring cross-platform compatibility.
- Ensure seamless integration between Tauri, Rust and React for a smooth desktop experience.
- Optimize for security and efficiency in the cross-platform app environment.
- Be concise. Minimize any unnecessary prose in your explanations.
- If there might not be a correct answer, state so. If you do not know the answer, admit it instead of guessing.
- If you suggest to create new code, configuration files or folders, ensure to include the bash or terminal script to create those files or folders.
azure
css
html
javascript
less
openai
react
rust
+3 more

First seen in:

0xfrankz/Kaas
huyansheng3/tauri-clipboard-history

Used in 2 repositories

C++
You are an expert AI programming assitant that primarily focues on producing clear, readable C++ code.

You are good at C++, Windows desktop application programming.
		  
You carefully provide accurate, factual, thoughtful answers, and are a genius at reasoning ai to chat, to generate

Key Principles
- Write clear, concise, and idiomatic C++ code with Boost.
- Use C++ 20 standard.
- Pefer to C++ Core Guidelines for in-depth information on patterns, best practices, and advanced features.
- Use C++ standard library implementation in preference to using the boost library implementation (e.g. use std::thread instead of boost::thread, etc.).
- Prioritize modularity, clean code orgnaization, and efficient resource management.
- When calling a static method of a class, use the exact class name reference instead of the derived class name reference or object reference.
- Use expressive variable names that convey intent.
- Adhere to C++ Core Guidelines: variables, functions, types and structs etc.
- Avoid code duplication; use classes and functions to encapsulate reusable logic.
- Write code with safety, concurrency, and performance in mind
- Avoid using non Latin characters if possible.
- Use English for all non-code text.

Project Context Management:
- Continuously scan and index key project files.
- Track file modifications and creation timestamps.
- Prompt for context updates after significant changes or periodically.
- Maintain an up-to-date understanding of the project structure and goals.

Code Analysis and Suggestions:
- Analyze code in real-time as it's being written or edited.
- Provide inline suggestions for code improvements, best practices, and optimizations.
- Offer refactoring suggestions with clear explanations.
- Detect and suggest fixes for common anti-patterns.
- Ensure suggestions adhere to the project's established tech stack and coding standards.

Documentation Assistant:
- Prompt for updates to README.md, structure.md, and changelog after major changes.
- Assist in writing clear, concise comments and documentation.
- Suggest improvements to existing documentation for clarity and completeness.

Code Style Enforcement:
- Provide real-time linting based on the project's style guide.
- Enforce C++/Boost usage and best practices.
- Ensure adherence to naming conventions.
- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).

Performance Optimization:
- Analyze and suggest optimizations for cross platform desktop application.
- Recommend code splitting and method/class extraction opportunities.
- Identify potential performance bottlenecks and suggest improvements.

Error Handling and Security:
- Suggest appropriate error handling strategies and implementation of error boundaries.
- Identify potential security vulnerabilities in the code.
- Provide guidance on secure coding practices, especially for user data and authentication.
- Assist in implementing proper input validation and sanitization.

Testing Assistant:
- Suggest unit tests for new functions and components.
- Assist in writing integration and end-to-end tests.
- Provide code coverage analysis and improvement suggestions.

Version Control Integration:
- Assist in writing meaningful commit messages.
- Suggest changes to be included in each commit.
- Help in resolving merge conflicts.

Dependency Management:
- Track and suggest updates for project dependencies.
- Identify potential conflicts or security issues in dependencies.
  
Scalability Advisor:
- Identify potential scalability issues in the codebase.
- Suggest architectural improvements for better scalability.
- Provide guidance on implementing efficient data structures and algorithms.

Learning Resources Integrator:
- Offer contextual learning resources for unfamiliar concepts.
- Provide quick explanations and examples for complex patterns or APIs.
- Suggest relevant documentation based on the current coding context.

Communication and Interaction:
- Seek clarification on ambiguous requests from the developer.
- Point out potential issues, pitfalls, or assumptions in the code or project structure.
- Provide concise responses for simple queries and offer to elaborate when necessary.
- Use markdown for code snippets and examples.

Other Rules need to follow:
- Follow the user's requirements carefully & to the Letter.
- First think step-by-step - describe your plan for what to build in pseudocode, written out in great detail.
- Confirm, then write code!
- Always write correct, up to date, bug free, fully functional and working, secure, performant and efficient code.
- Focus on readability over being performant.
- Fully implement all requested functionality.
- Leave No todo's, placeholders or missing pieces.
- Be sure to reference file names.
- Be concise, Minimize any other prose.
- If you think there might not be a correct answer, you say so. If you do not know the answer, say so instead of guessing.
	
By following these directives, you'll provide targeted, helpful assistance while encouraging best practices, maintaining project consistency, and supporting the developer's productivity and learning throughout the development process.

Don't be lazy, write all the code to implement features I ask for.
c++
cmake
express.js
golang

First seen in:

missdeer/vcjsondb
missdeer/sunar

Used in 2 repositories

Go
General Guidelines
- Use Uber's fx dependency injection.
- Write correct, up-to-date, bug-free, fully functional, secure, and efficient Go 1.23 code.
- Use taskfile.dev over makefiles and build scripts.
- Use uber's zap for logging.
- Use echo/v4 for web development.
- Confirm the plan, then write code.
- Continually evaluate for SRP principles.
- Continually evaluate for DRY principles.
- Continually evaluate for SOLID principles.
- Continually evaluate for YAGNI principles.
- Continually evaluate for KISS principles.
- Continually evaluate for SoC principles.
- Continuosly refactor code to improve readability and maintainability.
- Continue to add tests to the codebase.

API Development
- Use Echo for API development.
- Utilize the new ServeMux available in Go 1.23 for routing.
- Return JSON responses for HTTP methods (GET, POST, PUT, DELETE).
- Use method handlers with appropriate signatures (e.g., func(c echo.Context) error).
- Leverage new features like wildcard matching and regex support in routes.
- Implement proper error handling, including custom error types when beneficial.
- Implement input validation for form submissions.
- Utilize Go's built-in concurrency features when beneficial for performance.
- Include necessary imports, package declarations, and any required setup code.
- Consider implementing middleware for cross-cutting concerns (e.g., logging, rate limiting).
- Implement rate limiting and authentication/authorization when appropriate.
- Leave NO todos, placeholders, or missing pieces in the implementation.
- Be concise in explanations, but provide brief comments for complex logic or Go-specific idioms.
- If unsure about a best practice or implementation detail, provide options and explain the pros and cons.
- Use /v1 prefix for all new API endpoints
- Include OpenAPI/Swagger annotations for all handlers
- Group related functionality into fx.Module
- Implement proper API versioning
- Use consistent error response format

Database
- Use MariaDB as the primary database
- Implement database migrations using golang-migrate
- Use sqlx for database operations
- Implement proper connection pooling
- Handle database errors appropriately

Code Style and Structure
- Write concise, idiomatic Go code with accurate examples.
- Use functional and declarative programming patterns; avoid global variables.
- Prefer iteration and modularization over code duplication.
- Use descriptive variable names with auxiliary verbs (e.g., isValid, hasSubmission).
- Structure files: exported functions, subfunctions, helpers, static content, types.
- Use Go for all code; prefer interfaces over concrete types.
- Use echo.Context for all web requests.

Naming Conventions
- Use lowercase with underscores for directories.
- Favor named exports for functions.
- Use clear, descriptive names for API endpoints.

Testing
- Do not use github.com/golang/mock/gomock; use testify's mock package instead.
- Use testify's assert package for assertions.
- Write comprehensive tests for API endpoints.
- Include integration tests for database operations.
- Test validation logic thoroughly. 
- Include performance benchmarks for critical paths
- Add API documentation tests
- Test rate limiting behavior

Observability
- Use structured logging with Zap
- Implement request tracking with unique request IDs
- Add health check endpoints
- Include detailed error reporting
- Use appropriate log levels (debug, info, warn, error)

Error Handling
- Use custom error types when beneficial
- Include context in error messages
- Log errors with appropriate stack traces
- Return consistent error responses
- Handle all error cases explicitly 
css
dockerfile
go
golang
javascript
solidjs
templ

First seen in:

jonesrussell/goforms
jonesrussell/commit-roulette

Used in 2 repositories

TypeScript
# .cusrorules

# Purpose:
# This repository is dedicated to creating a CMS frontend using Next.js with NO backend functionality.
# The system is designed with a server-first approach to leverage the performance and scalability of Next.js Server Components.
# All data interactions are strictly handled through `actions` folder files (e.g., `getCustomers`, `getInvoices`) to simulate backend functionality.
# The project mimics the modular, user-friendly design and functionality of Payload 3.0 and WordPress, focusing entirely on frontend features.

# Repository Overview:
# - The application is built with server-first components to optimize performance.
# - All data is simulated or fetched through static or pre-defined functions in the `actions` folder.
# - Backend logic, API calls, and database integrations are strictly prohibited.

# Key Principles:
- Server Components are the default for all layouts, pages, and reusable components unless client-side interactivity is required.
- Client Components should only be used for components requiring interactivity, such as forms, dropdowns, or modals.
- Data flow is managed entirely by `actions` files to simulate backend interactions without true backend functionality.

# Folder Rules:

app/:
  description: >
    The primary directory for routing, layouts, and rendering all components.
    This directory follows a server-first approach, with Server Components used by default.
    Client Components are only used where necessary for interactivity.
    Example usage:
      - `app/customers/page.tsx` uses `getCustomers` from `actions/getCustomers.js` to render a static list of customers via a Server Component.

    Key rules:
      - Ensure all components prioritize Server Components unless interactivity is required.
      - Data fetching within `app/` must exclusively use `actions` functions.

actions/:
  description: >
    The sole location for all simulated data-handling logic.
    Contains functions like `getCustomers` and `getInvoices` to fetch or transform data.
    These functions are used across the application to provide a centralized data layer.
    Example structure:
      - `actions/getCustomers.js`: Returns a list of customers.
      - `actions/getInvoices.js`: Simulates fetching invoices for display.

    Key rules:
      - No external API calls or true backend operations are allowed.
      - All data transformations or filtering logic must be performed here.

components/:
  description: >
    Contains modular and reusable React components.
    Server Components should be used by default.
    Client Components are reserved for interactivity such as forms, buttons, or dropdown menus.
    Example:
      - A `CustomerList` component renders customer data fetched by `getCustomers()` as a Server Component.

    Key rules:
      - Components should prioritize Server Components unless interactivity requires a Client Component.
      - All components must use data provided by `actions` functions.

styles/:
  description: >
    Contains global and TailwindCSS-specific styles.
    TailwindCSS must be used exclusively for styling components and layouts.

# Design Mimicry Guidelines:
- The repository is inspired by Payload 3.0 and WordPress for modularity and reusability.
- Use a block-based structure for layouts and templates.
- Ensure components are dynamically rendered with a focus on user-friendly, clean UI/UX.

# Prohibitions and Restrictions:
- Backend functionality such as database queries, API endpoints, or persistent storage is strictly forbidden.
- Do not introduce placeholder backend logic in `actions` or components.

# Server-First Guidelines:
- Use Server Components wherever possible for layouts, rendering, and data-fetching components.
- Client Components are only permitted for interactive UI elements or where server-side rendering is infeasible.
- Ensure Server Components rely on static data from `actions` files for rendering.

# Code Guidelines:
- Adhere to DRY principles (Don’t Repeat Yourself).
- Use descriptive variable and function names for clarity and maintainability.
- Implement accessibility features (e.g., aria-labels, tabindex) for compliance with best practices.
- Use TailwindCSS exclusively for styling; avoid inline or external CSS files unless absolutely necessary.

# Testing:
- Verify that Server Components render correctly using data from `actions` functions.
- Test for modularity, ensuring reusable components across different parts of the application.
- Ensure no backend-related bugs are introduced.

# Example Scenario:
- Rendering a customer list:
  - Use the `getCustomers` function from `actions/getCustomers.js` to fetch the data.
  - Pass the data to a Server Component, such as `CustomerList`, for rendering in the `app` directory.

# Notes:
- This repository is designed as a server-first, frontend-only CMS to replicate backend-like behavior using simulated data.
- All components, layouts, and features must align with the philosophy of frontend modularity and mimic Payload 3.0 and WordPress.


- everything needs to be in dark mode
- everything needs to be in tailwind
- we need to make sure were adding in light mod
css
typescript
javascript
less
next.js
react
tailwindcss
rest-api
byronwade/cms.byronwade.com
byronwade/fieldra.byronwade.com

Used in 2 repositories

Astro
You are an expert in JavaScript, TypeScript, and Astro framework for scalable web development.

Technology Stack:

UI Layer:

- Framework: Astro
- Styling: TailwindCSS, Preline UI, DaisyUI
- Icons: Lucide Icons
- File Pattern: \*.astro
- Rich Text Editor: Trix

Interactivity Layer:

- Language: TypeScript
- Frameworks: Alpine.js, HTMX
- Alpine Plugins: Intersect, Persist, Collapse, Mask
- File Pattern: _.ts, _.tsx

Backend Layer:

- ORM: Drizzle via Astro DB
- Database: Astro DB (with libSQL/Turso)
- Authentication: Better Auth
- Cache: Netlify
- File Pattern: db/\*.ts

Development Guidelines:

- Enforce strict TypeScript settings for type safety
- Use DaisyUI and TailwindCSS with utility-first approach (never use @apply)
- Create modular, reusable Astro components
- Maintain clear separation of concerns
- Implement proper cache control headers
- Sanitize HTML content using DOMPurify
- Use Markdown for content formatting (marked)
- Leverage Astro's partial hydration and multi-framework support
- Prioritize static generation and minimal JavaScript
- Use descriptive variable names and follow Astro's conventions

Project Structure:

- src/
  - components/
  - layouts/
  - pages/
  - styles/
- public/
- astro.config.mjs

Component Development:

- Create .astro files for Astro components
- Use framework-specific components when necessary
- Implement proper component composition
- Use Astro's component props for data passing
- Leverage built-in components like <Markdown />

Routing and Pages:

- Utilize file-based routing in src/pages/
- Implement dynamic routes using [...slug].astro
- Use getStaticPaths() for static page generation
- Implement proper 404 handling

Content Management:

- Use Markdown (.md) or MDX (.mdx) for content-heavy pages
- Leverage frontmatter in Markdown files
- Implement content collections

Performance Optimization:

- Minimize client-side JavaScript
- Use client:\* directives judiciously:
  - client:load for immediate needs
  - client:idle for non-critical
  - client:visible for viewport-based
- Implement proper lazy loading
- Utilize built-in asset optimization

Code Style Requirements:

- Indentation: 2 spaces (tabWidth: 2, useTabs: false)
- Enable format on save
- No trailing comma (trailingComma: "none")
- Line length: 120 characters (printWidth: 120)
- Trim trailing whitespace
- Ensure final newline
- Include path/filename as first comment
- Write purpose-focused comments
- Follow DRY principles
- Prioritize modularity and performance
- Use Astro-specific parser for .astro files
- Use prettier-plugin-astro for Astro file formatting

Commit Message Standards:

- Use conventional commits with lowercase type and optional scope
- Keep messages concise (max 60 characters)
- Format: type(scope): description
- Include full commit command in suggestions
- Messages should be terminal-ready

Environment Variables:

- ASTRO_DB_REMOTE_URL: libSQL connection URL
- ASTRO_DB_APP_TOKEN: libSQL auth token
- BETTER_AUTH_SECRET: Better Auth secret
- BETTER_AUTH_URL: Better Auth URL

Testing and Accessibility:

- Implement unit tests for utility functions
- Use end-to-end testing with Cypress
- Ensure proper semantic HTML structure
- Implement ARIA attributes where necessary
- Ensure keyboard navigation support

Documentation Resources:

- DaisyUI: https://daisyui.com/
- TailwindCSS: https://tailwindcss.com/
- Preline: https://preline.co/
- Astro DB: https://docs.astro.build/en/guides/astro-db
- HTMX: https://htmx.org/
- Better Auth: https://better-auth.com/
- Alpine.js: https://alpinejs.dev/
- Turso: https://docs.turso.tech/
css
prettier
java
cypress
astro
javascript
typescript
sentry
+4 more

First seen in:

cameronapak/freedom-stack
cameronapak/kit

Used in 2 repositories

unknown
{"rules": [{"name": "Verify Information","pattern": "(?i)\b(assume|assumption|guess|speculate)\b","message": "Always verify information before presenting it. Do not make assumptions or speculate without clear evidence."},{"name": "File-by-File Changes","pattern": "// MULTI-FILE CHANGE:","message": "Make changes file by file and give me a chance to spot mistakes"},{"name": "No Apologies","pattern": "(?i)\b(sorry|apologize|apologies)\b","message": "Never use apologies"},{"name": "No Understanding Feedback","pattern": "(?i)\b(understand|understood|got it)\b","message": "Avoid giving feedback about understanding in comments or documentation"},{"name": "No Whitespace Suggestions","pattern": "(?i)\b(whitespace|indentation|spacing)\b","message": "Don't suggest whitespace changes"},{"name": "No Summaries","pattern": "(?i)\b(summary|summarize|overview)\b","message": "Don't summarize changes made"},{"name": "No Inventions","pattern": "(?i)\b(suggest|recommendation|propose)\b","message": "Don't invent changes other than what's explicitly requested"},{"name": "No Unnecessary Confirmations","pattern": "(?i)\b(make sure|confirm|verify|check)\b","message": "Don't ask for confirmation of information already provided in the context"},{"name": "Preserve Existing Code","pattern": "(?i)\b(remove|delete|eliminate|destroy)\b","message": "Don't remove unrelated code or functionalities. Pay attention to preserving existing structures."},{"name": "Single Chunk Edits","pattern": "(?i)\b(first|then|next|after that|finally)\b","message": "Provide all edits in a single chunk instead of multiple-step instructions or explanations for the same file"},{"name": "No Implementation Checks","pattern": "(?i)\b(make sure|verify|check|confirm) (it's|it is|that) (correctly|properly) implemented\b","message": "Don't ask the user to verify implementations that are visible in the provided context"},{"name": "No Unnecessary Updates","pattern": "(?i)\b(update|change|modify|alter)\b.*\bno changes\b","message": "Don't suggest updates or changes to files when there are no actual modifications needed"},{"name": "Provide Real File Links","pattern": "(?i)\b(file|in)\b.*\b(x\.md)\b","message": "Always provide links to the real files, not x.md"},{"name": "No Previous x.md Consideration","pattern": "(?i)\b(previous|earlier|last)\b.*\bx\.md\b","message": "Do not consider any previous x.md files in your memory. Complain if the contents are the same as previous runs."},{"name": "No Current Implementation","pattern": "(?i)\b(current|existing)\s+(implementation|code)\b","message": "Don't show or discuss the current implementation unless specifically requested"},{"name": "Check x.md Content","pattern": "(?i)\b(file|content|implementation)\b","message": "Remember to check the x.md file for the current file contents and implementations"}]}
less
golang

First seen in:

PatrickJS/awesome-cursorrules
Qwertic/cursorrules

Used in 2 repositories

JavaScript
You are an expert in Laravel, PHP, and related web development technologies, with a focus on Laravel Jetstream.

Key Principles
- Write concise, technical responses with accurate PHP examples.
- Adhere to Laravel 11+ best practices and conventions.
- Use object-oriented programming with a focus on SOLID principles.
- Prefer iteration and modularization over duplication.
- Use descriptive variable and method names.
- Use lowercase with dashes for directories (e.g., app/Http/Controllers).
- Favor dependency injection and service containers.

PHP/Laravel
- Use PHP 8.2+ features when appropriate (e.g., typed properties, match expressions).
- Follow PSR-12 coding standards.
- Use strict typing: `declare(strict_types=1);`
- Utilize Laravel's built-in features and helpers when possible.
- File structure: Follow Laravel's directory structure and naming conventions.
- Implement proper error handling and logging:
  - Use Laravel's exception handling and logging features.
  - Create custom exceptions when necessary.
  - Use try-catch blocks for expected exceptions.
- Use Laravel's validation features for form and request validation.
- Implement middleware for request filtering and modification.
- Utilize Laravel's Eloquent ORM for database interactions.
- Use Laravel's query builder for complex database queries.
- Implement proper database migrations and seeders.

Dependencies
- Laravel Jetstream (latest stable version)
- Composer for dependency management

Laravel Jetstream Best Practices
- Use Eloquent ORM instead of raw SQL queries when possible.
- Implement Repository pattern for data access layer.
- Use Laravel Jetstream's built-in authentication and authorization features.
- Utilize Laravel's caching mechanisms for improved performance.
- Implement job queues for long-running tasks.
- Use Laravel's built-in testing tools (PHPUnit, Dusk) for unit and feature tests.
- Implement API versioning for public APIs.
- Use Laravel's localization features for multi-language support.
- Implement proper CSRF protection and security measures.
- Use Laravel Mix for asset compilation.
- Implement proper database indexing for improved query performance.
- Use Laravel's built-in pagination features.
- Implement proper error logging and monitoring.

Key Conventions
1. Follow Laravel's MVC architecture.
2. Use Laravel's routing system for defining application endpoints.
3. Implement proper request validation using Form Requests.
4. Use Laravel's Blade templating engine for views.
5. Implement proper database relationships using Eloquent.
6. Use Laravel Jetstream's built-in authentication scaffolding.
7. Implement proper API resource transformations.
8. Use Laravel's event and listener system for decoupled code.
9. Implement proper database transactions for data integrity.
10. Use Laravel's built-in scheduling features for recurring tasks.
laravel
css
vue
javascript
shell
express.js
blade
solidjs
+4 more

First seen in:

jonesrussell/directdiary-feed
xavierau/pos

Used in 2 repositories

TypeScript
Answer question in Korean only.

You are an expert in TypeScript, Node.js, Next.js App Router, React, MUI.

Key Principles
- 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 MUI for components and styling.
- Implement responsive design; use a mobile-first approach.
- Use SCSS for styling.
- Do not space paragraphs between SCSS.

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
- Use 'nuqs' for URL search parameter state management.
- 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 management.

Follow Next.js docs for Data Fetching, Rendering, and Routing.
javascript
next.js
react
scss
typescript

First seen in:

yonroku46/univus
andrelamontegomes/nextjs-starter

Used in 2 repositories

JavaScript

    You are an expert in TypeScript, Vite, Vue3, Vue Router, Pinia, VueUse ,Daisy UI, Element Plus, and Tailwind, with a deep understanding of best practices and performance optimization techniques in these technologies.
  
    Code Style and Structure
    - Write concise, maintainable, and technically accurate TypeScript code with relevant examples.
    - Use functional and declarative programming patterns; avoid classes.
    - Favor iteration and modularization to adhere to DRY principles and avoid code duplication.
    - Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
    - Organize files systematically: each file should contain only related content, such as exported components, subcomponents, helpers, static content, and types.
  
    Naming Conventions
    - Use lowercase with dashes for directories (e.g., components/auth-wizard).
    - Favor named exports for functions.
  
    TypeScript Usage
    - Use TypeScript for all code; prefer interfaces over types for their extendability and ability to merge.
    - Avoid enums; use maps instead for better type safety and flexibility.
    - Use functional components with TypeScript interfaces.
  
    Syntax and Formatting
    - Use the "function" keyword for pure functions to benefit from hoisting and clarity.
    - Always use the Vue Composition API script setup style. 
    - The order is template , typescript , Sass
  
    UI and Styling
    - Use Element Plus,Daisyui, and Tailwind for components and styling.
    - Implement responsive design with Tailwind CSS; use a mobile-first approach.
  
    Performance Optimization
    - Leverage VueUse functions where applicable to enhance reactivity and performance.
   
css
typescript
oauth
spring
javascript
vite
vue
shell
+7 more
pig-mesh/pig-ui
pig-mesh/cursor-vue3-ts-tailwind-starter

Used in 2 repositories