This PR standardizes the cursor-based pagination system across the xConfess backend. It replaces ad-hoc pagination logic in the Confessions, Comments, and Messages modules with a consistent, stable, and performant infrastructure using base64-encoded cursors.
- Created
CursorPaginationDtofor standardized query input. - Created
CursorPaginatedResponseDtofor consistent API responses. - Implemented
encodeCursor/decodeCursorutilities for stable base64 cursors.
- Updated
getConfessionsandgetConfessionsByTagto support cursor-based filtering. - Enhanced
AnonymousConfessionRepositorywith standardized find methods. - Maintained backward compatibility for legacy offset-based pagination (
pageparameter).
- Refactored
CommentServiceto eliminate ad-hoc base64 logic. - Standardized the response format for all comment listing endpoints.
- Consolidated
GetMessagesQueryDtoand stabilized thefindAllThreadsForUserlogic. - Standardized thread list and message history endpoints.
- Verified that cursors are stable across concurrent updates.
- Confirmed that
hasMoreandnextCursorare accurately calculated. - Ensured that Swagger/OpenAPI documentation reflects the new paginated structure.
- API consumers should migrate from
page-based navigation tonextCursor-based navigation for improved performance on large datasets.
#731