From a381fc8e09520ff662430a81840983ddde577cf4 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 6 Sep 2025 15:29:43 +0000 Subject: [PATCH] docs: Update documentation to reflect refactoring changes --- TODO.md | 7 +++++++ internal/jobs/sync/README.md | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) 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