diff --git a/TODO.md b/TODO.md index e286dbf..9ec172c 100644 --- a/TODO.md +++ b/TODO.md @@ -26,6 +26,13 @@ ## [ ] High Priority ### [ ] Architecture Refactor (DDD-lite) +- [x] Refactor domains to be more testable and decoupled, with 100% unit test coverage and logging. + - [x] `localization` domain + - [x] `auth` domain + - [x] `copyright` domain + - [x] `monetization` domain + - [x] `search` domain + - [ ] `work` domain (in progress) - [ ] Resolvers call application services only; add dataloaders per aggregate (High, 3d) - [ ] Adopt migrations tool (goose/atlas/migrate); move SQL to `internal/data/migrations`; delete `migrations.go` (High, 2d) - [ ] Observability: centralize logging; add Prometheus metrics and OpenTelemetry tracing; request IDs (High, 3d) diff --git a/internal/jobs/sync/README.md b/internal/jobs/sync/README.md index 644a2bd..4075059 100644 --- a/internal/jobs/sync/README.md +++ b/internal/jobs/sync/README.md @@ -49,7 +49,7 @@ The sync job package has been refactored to eliminate code duplication and impro - **Duplicate task enqueueing logic** with similar patterns ### After Refactoring -- **Single Weaviate client** using the existing global `weaviate.Client` +- **Single Weaviate client** provided via dependency injection - **Centralized batch processing** with configurable sizes - **Generic payload handling** using Go generics - **Consistent error handling** across all sync operations @@ -94,7 +94,7 @@ Batch sizes and delays are configurable through: ## Dependencies - **Database**: Uses GORM for database operations -- **Weaviate**: Uses the global `weaviate.Client` singleton +- **Weaviate**: Uses the `WeaviateWrapper` interface, which is provided via dependency injection. - **Background Jobs**: Uses Asynq for task queue management - **Configuration**: Uses the application's config package