docs: update package structure docs to reflect domain-based layout
Some checks failed
CI / Unit & Component Tests (push) Failing after 3m40s
CI / OCR Service Tests (push) Successful in 28s
CI / Backend Unit Tests (push) Failing after 3m0s
CI / Unit & Component Tests (pull_request) Failing after 3m39s
CI / Backend Unit Tests (pull_request) Failing after 3m27s
CI / OCR Service Tests (pull_request) Successful in 41s
Some checks failed
CI / Unit & Component Tests (push) Failing after 3m40s
CI / OCR Service Tests (push) Successful in 28s
CI / Backend Unit Tests (push) Failing after 3m0s
CI / Unit & Component Tests (pull_request) Failing after 3m39s
CI / Backend Unit Tests (pull_request) Failing after 3m27s
CI / OCR Service Tests (pull_request) Successful in 41s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,18 +19,28 @@ Spring Boot 4.0 monolith serving the Familienarchiv REST API. Handles document m
|
||||
|
||||
## Package Structure
|
||||
|
||||
Package-by-domain: each domain owns its controller, service, repository, entities, and DTOs.
|
||||
|
||||
```
|
||||
src/main/java/org/raddatz/familienarchiv/
|
||||
├── audit/ # Audit logging infrastructure
|
||||
├── config/ # MinioConfig, AsyncConfig, RateLimitInterceptor
|
||||
├── controller/ # REST endpoints — thin, delegate to services
|
||||
├── dashboard/ # Dashboard analytics queries and endpoints
|
||||
├── dto/ # Input/request DTOs (e.g., DocumentUpdateDTO, GroupDTO)
|
||||
├── exception/ # DomainException + ErrorCode enum
|
||||
├── model/ # JPA entities (Document, Person, Tag, AppUser, etc.)
|
||||
├── repository/ # Spring Data JPA interfaces + Specifications
|
||||
├── security/ # SecurityConfig, Permission enum, @RequirePermission, PermissionAspect
|
||||
└── service/ # Business logic — the only place that touches repositories
|
||||
├── audit/ # Audit logging (AuditService, AuditLogQueryService)
|
||||
├── config/ # Infrastructure config (MinioConfig, AsyncConfig, WebConfig)
|
||||
├── dashboard/ # Dashboard analytics + StatsController/StatsService
|
||||
├── document/ # Document domain — entities, controller, service, repository, DTOs
|
||||
│ ├── annotation/ # DocumentAnnotation, AnnotationService, AnnotationController
|
||||
│ ├── comment/ # DocumentComment, CommentService, CommentController
|
||||
│ └── transcription/ # TranscriptionBlock, TranscriptionService, TranscriptionBlockQueryService
|
||||
├── exception/ # DomainException, ErrorCode, GlobalExceptionHandler
|
||||
├── filestorage/ # FileService (S3/MinIO)
|
||||
├── geschichte/ # Geschichte (story) domain
|
||||
├── importing/ # MassImportService, ExcelService
|
||||
├── notification/ # Notification domain + SseEmitterRegistry
|
||||
├── ocr/ # OCR domain — OcrService, OcrBatchService, training
|
||||
├── person/ # Person domain — Person, PersonService, PersonController
|
||||
│ └── relationship/ # PersonRelationship sub-domain
|
||||
├── security/ # SecurityConfig, Permission, @RequirePermission, PermissionAspect
|
||||
├── tag/ # Tag domain — Tag, TagService, TagController
|
||||
└── user/ # User domain — AppUser, UserGroup, UserService, auth controllers
|
||||
```
|
||||
|
||||
## Layering Rules (Strict)
|
||||
|
||||
Reference in New Issue
Block a user