LOV3RBOY yourstruly .cursorrules file for TypeScript

# Enterprise Code Standards

## Core Architecture Principles
- Clean architecture with proper separation of concerns
- Dependency injection patterns
- SOLID principles implementation
- Repository pattern for data access
- Facade pattern for complex subsystems

## Code Quality & Safety
- Error handling:
  * Comprehensive try-catch blocks
  * Error logging
  * User-friendly error messages
  * Recovery mechanisms

- Type Safety:
  * Detailed TypeScript interfaces
  * Proper type guards
  * Strict null checks
  * Generic types where appropriate

- Input Validation:
  * Data sanitization
  * Type checking
  * Range validation
  * Schema validation

## Security Requirements
- Authentication:
  * Proper auth checks
  * Session management
  * Token validation

- Authorization:
  * Role-based access
  * Permission checks
  * Resource guards

- Protection:
  * XSS prevention
  * CSRF tokens
  * SQL injection prevention
  * Rate limiting
  * Input sanitization

## Component Standards
- Loading States:
  * Skeleton loaders
  * Progress indicators
  * Loading boundaries

- Error Handling:
  * Error boundaries
  * Fallback UI
  * Retry mechanisms
  * Error logging

- Accessibility:
  * ARIA labels
  * Keyboard navigation
  * Screen reader support
  * Color contrast

- Performance:
  * Code splitting
  * Lazy loading
  * Memoization
  * Bundle optimization

## State Management
- Data Flow:
  * Unidirectional data flow
  * Immutable state updates
  * State normalization

- Caching:
  * Cache strategies
  * Cache invalidation
  * Optimistic updates

- Loading States:
  * Initial loading
  * Refresh states
  * Pagination loading
  * Error states

## Testing Requirements
- Unit Tests:
  * Component tests
  * Utility tests
  * Hook tests
  * Error cases

- Integration Tests:
  * User flows
  * API integration
  * State management
  * Error scenarios

- Performance Tests:
  * Load testing
  * Memory leaks
  * Bundle size
  * Render performance

## Documentation
- Code Documentation:
  * JSDoc comments
  * Type definitions
  * Usage examples
  * Architecture diagrams

- Performance Notes:
  * Optimization strategies
  * Known bottlenecks
  * Caching considerations

- Security Notes:
  * Security considerations
  * Authentication flows
  * Authorization rules

## Monitoring & Logging
- Application Monitoring:
  * Error tracking
  * Performance metrics
  * User analytics
  * Health checks

- Logging:
  * Error logs
  * User actions
  * Performance logs
  * Security events

## API Standards
- Endpoint Design:
  * RESTful principles
  * GraphQL best practices
  * Status codes
  * Error formats

- Security Headers:
  * CORS
  * Content Security Policy
  * Cache Control
  * Rate Limiting

## Database Operations
- Data Access:
  * Transactions
  * Connection pooling
  * Query optimization
  * Index management

- Data Safety:
  * Validation
  * Sanitization
  * Backup strategies
  * Recovery plans
analytics
bun
css
graphql
javascript
rest-api
solidjs
typescript

First Time Repository

TypeScript

Languages:

CSS: 2.1KB
JavaScript: 0.5KB
TypeScript: 26.8KB
Created: 1/10/2025
Updated: 1/10/2025

All Repositories (1)