Skip to content

feat(puzzles): implement puzzle categorization hierarchy and tag system - #460

Open
Ranjeet2063 wants to merge 1 commit into
MindFlowInteractive:mainfrom
Ranjeet2063:feat/puzzle-categorization-tags-system
Open

Ranjeet2063 wants to merge 1 commit into
MindFlowInteractive:mainfrom
Ranjeet2063:feat/puzzle-categorization-tags-system

Conversation

@Ranjeet2063

Copy link
Copy Markdown

Closes #450

Description

This pull request implements the puzzle categorization and tag system with hierarchy navigation, multi-tag filtering, search support, category analytics, and recommendation mechanisms.

Summary of Changes

  • Category Hierarchy Structure:
    • Enhanced Category entity with parent/child relations (parentId, parent, children), slug, icon, displayOrder, and isActive fields.
    • Implemented getHierarchy() in CategoriesService to construct nested category trees.
  • Analytics & Recommendations:
    • Implemented getCategoryAnalytics(id?) calculating total puzzles, completions, average ratings, difficulty breakdown, and popularity score.
    • Implemented getRecommendations(limit) ranking categories by activity and popularity score.
  • Multi-Tag System & Trending Tags:
    • Implemented getTrendingTags(limit) in TagsService ordering tags by usage frequency.
    • Implemented getRecommendedTags(seeds, limit) for related tag suggestions.
    • Added filterPuzzlesByMultiTags(tags, matchAll) supporting both conjunction and disjunction tag filtering.
  • Search & Filtering API:
    • Added searchPuzzlesByCategory() in CategoriesService supporting child category aggregation, multi-tag filtering, and keyword search.
    • Added CategoryFilterDto and CategoryAnalyticsDto with class-validator/transformer validations.
  • API Endpoints:
    • Exposed GET /categories/hierarchy, GET /categories/recommendations, GET /categories/:id/analytics, GET /categories/:id/puzzles on CategoriesController.
    • Exposed GET /tags/trending, GET /tags/recommendations on TagsController.
  • Unit Testing:
    • Added comprehensive test suite in src/puzzles/tests/puzzle-categorization-tags.spec.ts (100% passing).
    • Verified regression safety with existing tags.service.spec.ts.

Copilot AI balanced review requested due to automatic review settings October 10, 2026 02:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Puzzle Categorization and Tag System

2 participants