Skip to content

Category Management

Category Management is used to create and maintain category structures for fast browsing on home and category pages.

Entry Path

  • Left navigation -> Category Management

Core Actions

  • Create category: set name, color, and description.
  • Edit category: update naming and display style.
  • Bind books: add or remove books for each category.
  • Pagination & filtering: handle large category sets efficiently.
  • AI categorization: run one-click category assignment for a selected storage source.

AI Categorization

Entry Path

  • Top section of Category Management: choose storage source, then click Generate Preset Categories.

Flow

  1. Choose target storage source.
  2. Click Generate Preset Categories.
  3. Confirm task scope in the confirmation card and start.

Status Reflection

  • Task status is authoritative on the server side.
  • After page refresh, task state (running/completed/failed) is restored from backend task info.
  • The page can show category totals, pending book count, last run time, and token usage (if available).

Limits

  • Admin-only operation.
  • Large libraries are processed asynchronously; check task list for progress and failures.

Technical Settings

1. Explicit Authorization Model

  • Except admins, regular users can only view categories that are explicitly authorized and enabled (enabled=1).
  • Authorization mappings are stored in user_category_access.

2. Sorting Consistency

  • All clients (Web/Flutter) use sort_order ascending as primary sort key.
  • When sort_order is identical, id (descending) or name is used as secondary fallback.

3. Backend Data Constraints

  • Metadata table (book_category): stores category metadata such as name, description, sort weight, and enabled state.
  • Relation table (book_category_item): stores category-book mappings with optional custom order inside category.
  • Permission table (user_category_access): stores per-user category visibility.

Notes

  • Keep category names concise for better home-page readability.
  • Deleting a category removes only category relations, not the underlying books.
  • Bulk category-book operations may take several seconds for large sets.