parvizrovshanaliyev DataMigrationSystem .cursorrules file for C#

{
    "formatOnSave": true,
    "defaultFormatter": "csharp",
    "rulers": [100],
    "tabSize": 4,
    "insertSpaces": true,
    "trimTrailingWhitespace": true,
    "insertFinalNewline": true,
    "bracketSpacing": true,
    "maxLineLength": 100,
    "organizeImports": true,
    
    "csharp": {
        "style": {
            "indentationSize": 4,
            "bracesOnNewLine": true,
            "newLinesForBracesInMethods": true,
            "newLinesForBracesInProperties": true,
            "newLinesForBracesInAccessors": true,
            "newLinesForBracesInAnonymousMethods": true,
            "newLinesForBracesInControlBlocks": true,
            "newLinesForBracesInAnonymousTypes": true,
            "newLinesForBracesInObjectCollectionArrayInitializers": true,
            "newLinesForBracesInLambdaExpressionBody": true,
            "preferExpressionBodiedMembers": true,
            "orderingRules": {
                "systemUsingDirectivesFirst": true,
                "usingDirectivesPlacement": "outsideNamespace",
                "blankLinesBetweenUsingGroups": 1
            },
            "namingRules": {
                "allowedHungarianPrefixes": [],
                "includeInferredTupleElementNames": true,
                "tupleElementNameCasing": "PascalCase",
                "interfacePrefix": "I",
                "asyncSuffix": "Async",
                "testMethodNaming": "{Feature}_{Scenario}_{ExpectedResult}"
            },
            "cleanCode": {
                "maxMethodLength": 20,
                "maxClassLength": 200,
                "maxParameterCount": 3,
                "maxCyclomaticComplexity": 10,
                "enforceNullableAnnotations": true,
                "enforceAsyncSuffix": true,
                "enforceExceptionSuffix": true,
                "maxInheritanceDepth": 3,
                "maxNestedBlocks": 3,
                "enforceImmutability": true
            }
        },
        "diagnostics": {
            "suppressWarnings": [],
            "treatWarningsAsErrors": true,
            "enableAnalyzers": true,
            "analyzers": {
                "enableAll": true,
                "exclude": []
            }
        },
        "codeGeneration": {
            "generateXmlDocumentation": true,
            "preferThrowExpression": true,
            "preferConditionalDelegateCall": true,
            "preferPatternMatching": true,
            "preferNullPropagation": true,
            "domainDrivenDesign": {
                "enforceValueObjects": true,
                "enforceAggregateRoots": true,
                "enforceDomainEvents": true,
                "enforceEntityBehavior": true,
                "enforceInvariants": true,
                "enforceEncapsulation": true
            }
        },
        "testing": {
            "namingConvention": "MethodName_Scenario_ExpectedResult",
            "requiredCoverage": 80,
            "enforceTestCategories": true,
            "categories": [
                "Unit",
                "Integration",
                "Performance",
                "Security"
            ]
        }
    },

    "folders": {
        "exclude": [
            "**/bin",
            "**/obj",
            "**/node_modules",
            "**/.git",
            "**/dist",
            "**/coverage",
            "**/logs",
            "**/.vs",
            "**/.idea",
            "**/TestResults",
            "**/packages",
            "**/artifacts",
            "**/.docker"
        ]
    },

    "search": {
        "exclude": [
            "**/bin",
            "**/obj",
            "**/node_modules",
            "**/.git",
            "**/dist",
            "**/coverage",
            "**/*.min.js",
            "**/*.min.css",
            "**/generated",
            "**/migrations",
            "**/TestResults",
            "**/packages",
            "**/artifacts",
            "**/.docker"
        ],
        "useGitIgnore": true,
        "followSymlinks": false
    },

    "editor": {
        "wordWrap": "off",
        "rulers": [100],
        "guides": {
            "indentation": true,
            "brackets": true,
            "highlightActiveIndentation": true,
            "highlightActiveBracket": true
        },
        "suggestSelection": "first",
        "formatOnPaste": true,
        "formatOnType": true,
        "autoClosingBrackets": "always",
        "autoClosingQuotes": "always",
        "autoSurround": "quotes",
        "trimAutoWhitespace": true,
        "autoIndent": true,
        "renderWhitespace": "boundary",
        "renderControlCharacters": true,
        "detectIndentation": false,
        "cleanArchitecture": {
            "enforceLayerDependencies": true,
            "domainLayerPattern": "**/Domain/**",
            "applicationLayerPattern": "**/Application/**",
            "infrastructureLayerPattern": "**/Infrastructure/**",
            "presentationLayerPattern": "**/Presentation/**",
            "enforceFeatureModules": true,
            "enforceLayerIsolation": true,
            "maxDependencyDepth": 1
        }
    },

    "files": {
        "associations": {
            "*.csproj": "xml",
            "*.props": "xml",
            "*.targets": "xml",
            "*.xaml": "xml",
            "*.cshtml": "html",
            "*.razor": "razor",
            "*.json": "jsonc",
            "*.md": "markdown",
            "*.yml": "yaml",
            "*.yaml": "yaml",
            "Dockerfile*": "dockerfile",
            "*.feature": "gherkin",
            "*.proto": "protobuf",
            "*.graphql": "graphql",
            "*.bicep": "bicep",
            "*.tf": "terraform"
        },
        "exclude": {
            "**/bin": true,
            "**/obj": true,
            "**/.git": true,
            "**/node_modules": true,
            "**/logs": true,
            "**/.vs": true,
            "**/.idea": true,
            "**/TestResults": true,
            "**/packages": true,
            "**/artifacts": true,
            "**/.docker": true
        },
        "watcherExclude": {
            "**/node_modules/**": true,
            "**/dist/**": true,
            "**/coverage/**": true,
            "**/TestResults/**": true,
            "**/artifacts/**": true,
            "**/.docker/**": true
        },
        "trimTrailingWhitespace": true,
        "insertFinalNewline": true,
        "trimFinalNewlines": true
    },

    "git": {
        "enableSmartCommit": true,
        "confirmSync": true,
        "autofetch": true,
        "enableStatusBarSync": true,
        "branchNaming": {
            "mainBranch": "main",
            "developBranch": "develop",
            "featurePrefix": "feature/",
            "releasePrefix": "release/",
            "hotfixPrefix": "hotfix/",
            "bugfixPrefix": "bugfix/",
            "enforceNamingConvention": true,
            "maxBranchNameLength": 50
        },
        "commitMessage": {
            "enforceConventionalCommits": true,
            "types": [
                "feat",
                "fix",
                "docs",
                "style",
                "refactor",
                "perf",
                "test",
                "build",
                "ci",
                "chore",
                "revert"
            ],
            "maxSubjectLength": 72,
            "maxBodyLineLength": 100
        }
    },

    "terminal": {
        "integrated": {
            "shell": {
                "windows": "powershell.exe"
            },
            "scrollback": 5000,
            "confirmOnExit": true,
            "copyOnSelection": true,
            "enablePersistence": true,
            "fontSize": 12,
            "fontFamily": "Cascadia Code, Consolas, monospace"
        }
    },

    "cleanArchitecture": {
        "enforceLayering": true,
        "layers": {
            "domain": {
                "allowed": [],
                "pattern": "**/Domain/**",
                "enforceAggregateRules": true,
                "enforceValueObjectRules": true
            },
            "application": {
                "allowed": ["domain"],
                "pattern": "**/Application/**",
                "enforceCQRSPattern": true,
                "enforceValidation": true,
                "coreVsFeature": {
                    "coreApplicationRules": {
                        "allowedContent": [
                            "Common behaviors (logging, validation, caching)",
                            "Base interfaces and abstractions",
                            "Common CQRS infrastructure",
                            "Shared pipeline behaviors",
                            "Global error handling",
                            "Common validation rules",
                            "Base command/query handlers",
                            "Application-wide services",
                            "Shared DTOs and models",
                            "Common authentication/authorization behaviors"
                        ],
                        "pattern": "**/Core/DataMigration.Application/**",
                        "enforceSharedConcerns": true
                    },
                    "featureApplicationRules": {
                        "allowedContent": [
                            "Feature-specific business logic",
                            "Feature-specific commands/queries",
                            "Feature-specific DTOs",
                            "Feature-specific validation rules",
                            "Feature-specific services",
                            "Feature domain logic"
                        ],
                        "pattern": "**/Features/**/Application/**",
                        "enforceFeatureIsolation": true,
                        "mustInheritFromCore": true
                    },
                    "enforceLayerSeparation": true,
                    "preventDuplication": true
                }
            },
            "infrastructure": {
                "allowed": ["domain", "application"],
                "pattern": "**/Infrastructure/**",
                "enforceRepositoryPattern": true,
                "enforceUnitOfWork": true
            },
            "presentation": {
                "allowed": ["domain", "application"],
                "pattern": "**/Presentation/**",
                "enforceControllerNaming": true,
                "enforceRESTfulPrinciples": true
            }
        },
        "patterns": {
            "entities": "**/Domain/Entities/**",
            "valueObjects": "**/Domain/ValueObjects/**",
            "aggregates": "**/Domain/Aggregates/**",
            "repositories": "**/Domain/Repositories/**",
            "services": "**/Domain/Services/**",
            "events": "**/Domain/Events/**",
            "exceptions": "**/Domain/Exceptions/**",
            "specifications": "**/Domain/Specifications/**",
            "factories": "**/Domain/Factories/**"
        },
        "validation": {
            "enforceFluentValidation": true,
            "enforceDataAnnotations": true,
            "enforceCustomValidators": true
        },
        "security": {
            "enforceAuthorizationHandlers": true,
            "enforceSecurityHeaders": true,
            "enforceCSRFProtection": true,
            "enforceXSSProtection": true,
            "enforceSensitiveDataHandling": true,
            "enforceSecureDataTransfer": true,
            "enforceSecureConfiguration": true,
            "securityHeaders": {
                "HSTS": true,
                "XFrameOptions": true,
                "ContentSecurityPolicy": true,
                "XContentTypeOptions": true,
                "ReferrerPolicy": true
            },
            "dataProtection": {
                "enforceEncryption": true,
                "enforceKeyRotation": true,
                "enforceSecureStorage": true
            },
            "authentication": {
                "requireMFA": true,
                "enforcePasswordPolicy": true,
                "enforceSessionManagement": true
            }
        },
        "performance": {
            "enforceResponseTime": true,
            "maxResponseTime": 500,
            "enforceResourceLimits": true,
            "monitoring": {
                "enableMetrics": true,
                "enableTracing": true,
                "enableHealthChecks": true,
                "enablePerformanceCounters": true,
                "sla": {
                    "availability": 99.9,
                    "responseTime": {
                        "p95": 500,
                        "p99": 1000
                    },
                    "errorRate": {
                        "max": 0.1
                    }
                },
                "metrics": {
                    "collection": {
                        "interval": 15,
                        "retention": {
                            "raw": 7,
                            "aggregated": 90
                        }
                    },
                    "thresholds": {
                        "cpu": 80,
                        "memory": 85,
                        "disk": 90,
                        "connections": 1000
                    }
                },
                "observability": {
                    "tracing": {
                        "sampleRate": 0.1,
                        "exportBatchSize": 512,
                        "exportInterval": 5
                    },
                    "metrics": {
                        "customMetrics": [
                            "migration_duration",
                            "records_processed",
                            "error_count",
                            "throughput"
                        ],
                        "dimensions": [
                            "project_id",
                            "source_type",
                            "target_type"
                        ]
                    },
                    "alerting": {
                        "rules": [
                            {
                                "name": "HighErrorRate",
                                "threshold": 5,
                                "window": "5m",
                                "severity": "critical"
                            },
                            {
                                "name": "SlowMigration",
                                "threshold": 1000,
                                "window": "15m",
                                "severity": "warning"
                            }
                        ]
                    }
                }
            },
            "caching": {
                "enforceResponseCaching": true,
                "enforceDistributedCaching": true,
                "enforceOutputCaching": true
            },
            "optimization": {
                "enforceAsyncIO": true,
                "enforcePagination": true,
                "enforceCompression": true,
                "enforceConnectionPooling": true
            }
        },
        "api": {
            "versioning": {
                "enforceVersioning": true,
                "strategy": "url",
                "format": "v{version}",
                "supported": ["v1"],
                "deprecated": [],
                "sunset": {
                    "warningPeriod": 90,
                    "enforceHeaders": true
                }
            },
            "documentation": {
                "enforceOpenApi": true,
                "enforceXmlComments": true,
                "enforceExamples": true,
                "enforceResponseTypes": true
            },
            "errorHandling": {
                "standardizedResponses": true,
                "detailedDevelopmentErrors": true,
                "sanitizedProductionErrors": true,
                "errorCodes": {
                    "validation": "4xx",
                    "business": "4xx",
                    "security": "4xx",
                    "system": "5xx"
                }
            }
        },
        "dataManagement": {
            "retention": {
                "enforceRetentionPolicy": true,
                "policies": {
                    "auditLogs": 365,
                    "systemLogs": 90,
                    "userActivity": 180,
                    "backups": {
                        "daily": 30,
                        "weekly": 90,
                        "monthly": 365
                    }
                }
            },
            "backup": {
                "enforceBackupStrategy": true,
                "schedule": {
                    "full": "0 0 * * 0",
                    "differential": "0 0 * * 1-6",
                    "transactionLog": "0 */4 * * *"
                },
                "retention": {
                    "full": 90,
                    "differential": 30,
                    "transactionLog": 7
                }
            },
            "disasterRecovery": {
                "enforceRecoveryPlan": true,
                "rpo": 4,
                "rto": 2,
                "testingSchedule": "0 0 1 */3 *",
                "documentation": {
                    "enforceRunbooks": true,
                    "enforceContactList": true,
                    "enforceEscalationProcedures": true
                }
            },
            "database": {
                "enforceIndexStrategy": true,
                "indexing": {
                    "enforceClusteredIndexes": true,
                    "enforceNonClusteredIndexes": true,
                    "enforceColumnstoreIndexes": true,
                    "maxIndexesPerTable": 10,
                    "rebuildThreshold": 30,
                    "reorganizeThreshold": 10
                },
                "performance": {
                    "enforceQueryOptimization": true,
                    "maxQueryDuration": 30,
                    "enforceParameterization": true,
                    "enforceStatistics": true
                }
            }
        }
    }
} 
c#
css
docker
express.js
golang
graphql
html
nestjs
+1 more

First Time Repository

Data Migration System

C#

Languages:

C#: 128.6KB
CSS: 5.2KB
HTML: 7.3KB
Created: 1/3/2025
Updated: 1/8/2025

All Repositories (1)