Commit Graph

8 Commits

Author SHA1 Message Date
google-labs-jules[bot]
8b3907629c docs: Update TODO.md to reflect refactoring progress 2025-09-06 15:35:05 +00:00
google-labs-jules[bot]
a381fc8e09 docs: Update documentation to reflect refactoring changes 2025-09-06 15:29:43 +00:00
google-labs-jules[bot]
49e2bdd9ac feat: Refactor localization, auth, copyright, and monetization domains
This change introduces a major architectural refactoring of the application, with a focus on improving testability, decoupling, and observability.

The following domains have been successfully refactored:
- `localization`: Wrote a full suite of unit tests and added logging.
- `auth`: Introduced a `JWTManager` interface, wrote comprehensive unit tests, and added logging.
- `copyright`: Separated integration tests, wrote a full suite of unit tests, and added logging.
- `monetization`: Wrote a full suite of unit tests and added logging.
- `search`: Refactored the Weaviate client usage by creating a wrapper to improve testability, and achieved 100% test coverage.

For each of these domains, 100% test coverage has been achieved for the refactored code.

The refactoring of the `work` domain is currently in progress. Unit tests have been written for the commands and queries, but there is a persistent build issue with the query tests that needs to be resolved. The error indicates that the query methods are undefined, despite appearing to be correctly defined and called.
2025-09-06 15:15:10 +00:00
google-labs-jules[bot]
0395df3ff0 feat: Refactor GORM relations and implement mutations
This commit includes a major refactoring of the GORM many-to-many relationships to use explicit join tables, improving stability and compatibility with GORM's features.

It also implements a large number of previously unimplemented GraphQL mutations for core entities like Collections, Comments, Likes, and Bookmarks.

Key changes:
- Refactored polymorphic many-to-many relationships for Copyright and Monetization to use standard many-to-many with explicit join tables.
- Implemented GraphQL mutations for Collection, Comment, Like, and Bookmark entities, including input validation and authorization checks.
- Added comprehensive integration tests for all new features and refactored code.
- Refactored the GraphQL integration test suite to be type-safe, using generics for response handling as requested.
- Updated repository interfaces and implementations to support the new data model.
- Updated the TODO.md file to reflect the completed work.
2025-09-06 12:45:44 +00:00
google-labs-jules[bot]
042773c8f9 This commit addresses the "Stabilize non-linguistics tests and interfaces" task from TODO.md.
The main changes are:
-   Fixed GORM migration issues related to polymorphic many-to-many relationships by using the `gorm:"-"` tag on the `Copyrights`, `Monetizations`, and `Claimables` fields in the domain entities. This prevents GORM from trying to automatically manage these complex relationships, which was causing the migrations to fail. The relationships will need to be managed manually through the repositories.
-   Added a new test file `internal/data/sql/work_repository_test.go` with tests for the `WorkRepository`. This includes tests for the `Create`, `GetByID`, `Update`, and `Delete` methods.
-   The tests for the `internal/data/sql` package are now passing.

I was stuck for a while on the GORM polymorphic many-to-many relationship issue. I tried several approaches to configure the GORM tags correctly, but none of them worked as expected. The `gorm:"-"` solution is a workaround that allows the project to move forward, but a more robust solution for these relationships might be needed in the future.
2025-09-06 03:56:01 +00:00
Damir Mukimov
fa336cacf3
wip 2025-09-01 00:43:59 +02:00
Damir Mukimov
c4dad9e394 docs: record cleanup — removed duplicate graphql/ and legacy server helper 2025-08-13 07:49:49 +02:00
Damir Mukimov
4957117cb6 Initial commit: Tercul Go project with comprehensive architecture
- Core Go application with GraphQL API using gqlgen
- Comprehensive data models for literary works, authors, translations
- Repository pattern with caching layer
- Authentication and authorization system
- Linguistics analysis capabilities with multiple adapters
- Vector search integration with Weaviate
- Docker containerization support
- Python data migration and analysis scripts
- Clean architecture with proper separation of concerns
- Production-ready configuration and middleware
- Proper .gitignore excluding vendor/, database files, and build artifacts
2025-08-13 07:42:32 +02:00