diff --git a/README.md b/README.md index f694b4fe..0779f8d2 100644 --- a/README.md +++ b/README.md @@ -530,10 +530,6 @@ everything-claude-code/ | |-- springboot-security/ # Spring Boot security (NEW) | |-- springboot-tdd/ # Spring Boot TDD (NEW) | |-- springboot-verification/ # Spring Boot verification (NEW) -| |-- quarkus-patterns/ # Quarkus REST, Panache, and messaging patterns (NEW) -| |-- quarkus-security/ # Quarkus JWT/OIDC and RBAC security (NEW) -| |-- quarkus-tdd/ # Quarkus testing with JUnit, REST Assured, and Dev Services (NEW) -| |-- quarkus-verification/ # Quarkus build, test, security, and native verification (NEW) | |-- configure-ecc/ # Interactive installation wizard (NEW) | |-- security-scan/ # AgentShield security auditor integration (NEW) | |-- java-coding-standards/ # Java coding standards (NEW) diff --git a/docs/tr/skills/quarkus-patterns/SKILL.md b/docs/tr/skills/quarkus-patterns/SKILL.md index ec9f18cb..ee5d12d8 100644 --- a/docs/tr/skills/quarkus-patterns/SKILL.md +++ b/docs/tr/skills/quarkus-patterns/SKILL.md @@ -8,7 +8,7 @@ origin: ECC Apache Camel ile bulut-native, event-driven servisler için Quarkus 3.x mimari ve API desenleri. -## Ne Zaman Aktif Edilir +## When to Use - JAX-RS veya RESTEasy Reactive ile REST API'leri oluşturma - Resource → service → repository katmanlarını yapılandırma @@ -21,7 +21,17 @@ Apache Camel ile bulut-native, event-driven servisler için Quarkus 3.x mimari v - Koşullu akış işleme uygulama - GraalVM native derleme ile çalışma -## Birden Fazla Bağımlılıklı Service Katmanı (Lombok) +## How It Works + +Quarkus servislerinde Resource -> service -> repository akışını CDI scope'ları, +`@Transactional` sınırları, Panache/Hibernate veri erişimi ve Camel/RabbitMQ +entegrasyonlarıyla birlikte uygulayın. Aşağıdaki örnekler event üretimi, +dosya işleme, özel logging context ve async yayınlama için kopyalanabilir +başlangıç noktaları sağlar. + +## Examples + +### Birden Fazla Bağımlılıklı Service Katmanı (Lombok) ```java @Slf4j @@ -79,6 +89,7 @@ public class As2ProcessingService { this.eventService.createSuccessEvent(documentInfo, "PERSISTENCE_BLOB_EVENT_TYPE"); + String originalFileName = documentInfo.getOriginalFileName(); BusinessRulesPayload payload = this.documentJobService.createDocumentAndJobEntities( documentInfo, originalFileName, structureIdPartner, flowProfile, invoiceValidationResult.getDocumentHash()); @@ -147,9 +158,10 @@ public class ProcessingService { ``` -## Event Service Deseni +### Event Service Deseni ```java +@Slf4j @ApplicationScoped @RequiredArgsConstructor public class EventService { diff --git a/docs/tr/skills/quarkus-security/SKILL.md b/docs/tr/skills/quarkus-security/SKILL.md index 161fad6c..8160c473 100644 --- a/docs/tr/skills/quarkus-security/SKILL.md +++ b/docs/tr/skills/quarkus-security/SKILL.md @@ -8,7 +8,7 @@ origin: ECC Kimlik doğrulama, yetkilendirme ve girdi doğrulama ile Quarkus uygulamalarını güvenli hale getirmek için en iyi uygulamalar. -## Ne Zaman Aktif Edilir +## When to Use - Kimlik doğrulama ekleme (JWT, OIDC, Basic Auth) - `@RolesAllowed` veya SecurityIdentity ile yetkilendirme uygulama @@ -19,7 +19,17 @@ Kimlik doğrulama, yetkilendirme ve girdi doğrulama ile Quarkus uygulamaların - Bağımlılıkları CVE için tarama - MicroProfile JWT veya SmallRye JWT ile çalışma -## Kimlik Doğrulama +## How It Works + +Quarkus güvenliğini katmanlı uygulayın: JWT/OIDC veya Basic Auth ile kimliği +doğrulayın, `SecurityIdentity` ve `@RolesAllowed` ile yetki kararlarını +merkezileştirin, Bean Validation ile girdileri sınırlandırın, CORS ve güvenlik +başlıklarını açıkça yapılandırın, gizli bilgileri Vault veya ortam değişkenleri +üzerinden yönetin. + +## Examples + +### Kimlik Doğrulama ### JWT Kimlik Doğrulama diff --git a/docs/tr/skills/quarkus-tdd/SKILL.md b/docs/tr/skills/quarkus-tdd/SKILL.md index 5ca100fd..ab809312 100644 --- a/docs/tr/skills/quarkus-tdd/SKILL.md +++ b/docs/tr/skills/quarkus-tdd/SKILL.md @@ -8,7 +8,7 @@ origin: ECC 80%+ kapsam (unit + integration) ile Quarkus 3.x servisleri için TDD rehberi. Apache Camel ile event-driven mimariler için optimize edilmiştir. -## Ne Zaman Kullanılır +## When to Use - Yeni özellikler veya REST endpoint'leri - Bug düzeltmeleri veya refactoring'ler @@ -19,14 +19,16 @@ origin: ECC - CompletableFuture async işlemlerini doğrulama - LogContext yayılımını test etme -## İş Akışı +## How It Works 1. Önce testleri yazın (başarısız olmalılar) 2. Geçmek için minimal kod uygulayın 3. Testleri yeşil tutarken refactor edin 4. JaCoCo ile kapsamı zorlayın (%80+ hedef) -## @Nested Organizasyonlu Unit Testler +## Examples + +### @Nested Organizasyonlu Unit Testler Kapsamlı ve okunabilir testler için bu yapılandırılmış yaklaşımı izleyin: @@ -370,8 +372,10 @@ class BusinessRulesRouteTest { }); camelContext.getRouteController().startRoute("document-processing"); - // Validator'ı exception fırlatacak şekilde mock'la - when(eventService.validate(any())).thenThrow(new ValidationException("Invalid document")); + // Error event oluşturma hatasını gerçek EventService API'si üzerinden simüle et + doThrow(new ValidationException("Invalid document")) + .when(eventService) + .createErrorEvent(any(), eq("VALIDATION_ERROR"), anyString()); // ACT producerTemplate.sendBody("direct:process-document", testPayload); diff --git a/skills/java-coding-standards/SKILL.md b/skills/java-coding-standards/SKILL.md index 5aa0f28d..f28c62e7 100644 --- a/skills/java-coding-standards/SKILL.md +++ b/skills/java-coding-standards/SKILL.md @@ -8,15 +8,7 @@ origin: ECC Standards for readable, maintainable Java (17+) code in Spring Boot and Quarkus services. -## Framework Detection - -Before applying standards, determine the framework from the build file: - -- Build file contains `quarkus` → apply **[QUARKUS]** conventions -- Build file contains `spring-boot` → apply **[SPRING]** conventions -- Neither detected → apply shared conventions only - -## When to Activate +## When to Use - Writing or reviewing Java code in Spring Boot or Quarkus projects - Enforcing naming, immutability, or exception handling conventions @@ -25,6 +17,16 @@ Before applying standards, determine the framework from the build file: - Structuring packages and project layout - **[QUARKUS]**: Working with CDI scopes, Panache entities, or reactive pipelines +## How It Works + +### Framework Detection + +Before applying standards, determine the framework from the build file: + +- Build file contains `quarkus` → apply **[QUARKUS]** conventions +- Build file contains `spring-boot` → apply **[SPRING]** conventions +- Neither detected → apply shared conventions only + ## Core Principles - Prefer clarity over cleverness @@ -33,6 +35,12 @@ Before applying standards, determine the framework from the build file: - Consistent naming and package structure - **[QUARKUS]**: Favor build-time over runtime processing; avoid runtime reflection where possible +## Examples + +The sections below show concrete Spring Boot, Quarkus, and shared Java examples +for naming, immutability, dependency injection, reactive code, exceptions, +project layout, logging, configuration, and tests. + ## Naming ```java