Commit Graph

2 Commits

Author SHA1 Message Date
google-labs-jules[bot]
8d2ff8a97e docs: create comprehensive GraphQL API documentation
Creates a new, comprehensive guide for the GraphQL API in `api/README.md`. This documentation details all available queries, mutations, and types, providing clear examples and explanations for developers.

This addresses the most critical gap in the project's documentation, which was previously sparse and only covered a single query. The new documentation is structured for clarity and will serve as a vital resource for both internal and external developers.
2025-10-05 10:38:30 +00:00
google-labs-jules[bot]
a96d3a0ece feat: Implement trending works feature and add API documentation
This commit introduces a new trending works feature to the application and adds documentation for the new API endpoint.

The feature includes:
- A new `Trending` domain model to store ranked works.
- An `UpdateTrending` method in the `AnalyticsService` that calculates a trending score for each work based on views, likes, and comments.
- A background job that runs hourly to update the trending works.
- A new `trendingWorks` query in the GraphQL API to expose the trending works.
- New tests for the trending feature, and fixes for existing tests.

This commit also includes a refactoring of the analytics repository to use a more generic `IncrementWorkCounter` method, and enhancements to the `WorkStats` and `TranslationStats` models with new metrics like `readingTime`, `complexity`, and `sentiment`.

Finally, this commit adds a new `api/README.md` file with documentation for the `trendingWorks` query.
2025-09-07 20:53:59 +00:00