Coding & DevelopmentโŒจ๏ธcursor๐ŸŒuniversal

Cursor Rules - Enterprise Backend Engineering Suite

> A production-ready, extensible rule system for Cursor AI that transforms your coding assistant into a Senior Principal Backend Engineer with 20+ years of enterprise experience.

Quick Start

Install this Skill

npx skills add GoranErhartic/cursor-development-rules
# Cursor Rules - Enterprise Backend Engineering Suite

[![Ko-fi](https://img.shields.io/badge/Support%20on-Ko--fi-FF5E5B?style=flat&logo=ko-fi)](https://ko-fi.com/goranlegenda)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Maintained](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/GoranErhartic/cursor-rules/graphs/commit-activity)

> A production-ready, extensible rule system for Cursor AI that transforms your coding assistant into a Senior Principal Backend Engineer with 20+ years of enterprise experience.

## ๐ŸŽฏ What is This?

This repository contains a comprehensive, language-agnostic rule system for [Cursor AI](https://cursor.sh/) that enforces:

- โœ… **Test-Driven Development (TDD)** workflows
- โœ… **Clean Architecture** and SOLID principles
- โœ… **Enterprise security** best practices
- โœ… **Production-grade** error handling and logging
- โœ… **CQRS** and Domain-Driven Design patterns
- โœ… **Multi-language support** (C#/.NET, Java/Spring Boot, and more)

## ๐Ÿš€ Quick Start

### 1. Clone the Repository

```bash
git clone https://github.com/GoranErhartic/cursor-rules.git
cd cursor-rules
```

### 2. Install to Your Project

#### Option A: Automated Installation (Recommended)

**macOS / Linux:**

```bash
./install.sh /path/to/your/project
```

**Windows PowerShell:**

```powershell
.\install.ps1 -TargetPath "C:\Path\To\Your\Project"
```

The installer will:
- โœ… Automatically backup existing rules (if any)
- โœ… Copy all rules to your project
- โœ… Show clear success/error messages

#### Option B: Manual Installation

Copy the `.cursor` folder to the root of your project:

```bash
# macOS / Linux
cp -r .cursor /path/to/your/project/

# Windows PowerShell
Copy-Item -Path .cursor -Destination C:\Path\To\Your\Project\ -Recurse
```

### 3. Start Coding

Open your project in Cursor, and the AI will automatically:
- Act as a Senior Principal Backend Engineer
- Follow TDD workflows
- Apply language-specific best practices
- Enforce security and quality standards

## ๐Ÿ“ Structure

```
.cursor/rules/
โ”œโ”€โ”€ patterns/                  # Language-agnostic patterns & concepts
โ”‚   โ”œโ”€โ”€ architecture.mdc       # Clean Architecture, CQRS, DDD, SOLID
โ”‚   โ”œโ”€โ”€ error-handling.mdc     # Result pattern, RFC 7807
โ”‚   โ”œโ”€โ”€ testing.mdc            # TDD workflow, AAA pattern
โ”‚   โ”œโ”€โ”€ security.mdc           # Security principles
โ”‚   โ”œโ”€โ”€ api-design.mdc         # REST conventions
โ”‚   โ”œโ”€โ”€ input-sanitization.mdc # Validation concepts
โ”‚   โ””โ”€โ”€ cqrs.mdc               # Command/Query separation
โ”‚
โ”œโ”€โ”€ development/               # Development workflow
โ”‚   โ”œโ”€โ”€ tdd-planning.mdc       # Test planning requirements
โ”‚   โ””โ”€โ”€ code-implementation.mdc # Implementation workflow
โ”‚
โ””โ”€โ”€ languages/                 # Language-specific implementations
    โ”œโ”€โ”€ csharp/                # .NET / C# (14 files)
    โ”œโ”€โ”€ java/                  # Java / Spring Boot (14 files)
    โ””โ”€โ”€ _template/             # Template for adding new languages
        โ””โ”€โ”€ README.md          # Instructions for new languages
```

## ๐ŸŒŸ Key Features

### ๐Ÿค– AI Persona

The AI agent operates as a **Senior Principal Backend Engineer** with:
- 20+ years of enterprise experience
- Deep knowledge of distributed systems
- High-availability production environment expertise
- Strong emphasis on asking clarifying questions (never assumes!)

### ๐Ÿงช Test-Driven Development (TDD)

Enforces a strict TDD workflow:
1. **RED** - Write a failing test
2. **GREEN** - Minimal code to pass
3. **REFACTOR** - Clean up while keeping tests green

### ๐Ÿ—๏ธ Architecture Patterns

Built-in support for:
- **Vertical Slice Architecture** - Organize by feature, not layer
- **Clean Architecture** - Domain, Application, Infrastructure, API
- **CQRS** - Command/Query separation
- **Domain-Driven Design** - Aggregates, Value Objects, Domain Events

### ๐Ÿ›ก๏ธ Security First

Comprehensive security guidance:
- Input validation and sanitization
- SQL injection, XSS, and path traversal prevention
- Secrets management (no hardcoded credentials)
- HTTPS, CORS, and security headers
- JWT and OAuth2 patterns

### ๐Ÿ“Š Code Quality

Enforces modern language features and best practices:
- C# 14 / .NET 10 idioms
- Java 21 features (records, sealed classes, pattern matching)
- Nullable reference types
- Async/await patterns
- Structured logging

## ๐ŸŒ Supported Languages

### C# / .NET

**14 comprehensive rule files** covering:

| Category | Files |
|----------|-------|
| **Core** | `code-quality`, `testing`, `error-handling`, `dependencies` |
| **Web** | `controllers`, `validation`, `input-sanitization` |
| **Data** | `ef-core` (Entity Framework Core) |
| **Infrastructure** | `logging` (Serilog), `resilience` (Polly), `messaging` (Rebus) |
| **Patterns** | `mediator` (CQRS), `auth` (JWT Bearer) |
| **Security** | `security`, `auth` |

**Technologies:**
- .NET 10, ASP.NET Core
- Entity Framework Core
- FluentValidation
- Serilog (structured logging)
- Polly (resilience patterns)
- Rebus (messaging)
-

... (truncated)
Repository
18stars
2forks
View on GitHub
Details
DiscoveredJan 19, 2026
Last UpdatedDec 30, 2025
Quality Score
40/100