Skip to main content

Overview

The topic tagging system manages how posts are associated with topics (tags) and how those associations are queried. There are two distinct tag storage systems with different semantics.

Two Post Types, Two Tag Systems

Canonical posts are external media (tweets, YouTube videos, articles) that exist independently. Multiple users can tag the same canonical post.

Tag Storage Tables

Tag Facets

Tags can have metadata facets for filtered discovery:
  • Sport: e.g., “Pickleball”, “Football”
  • Level: e.g., “Professional”, “Collegiate”
These enable endpoints like GET /api/explore/sport/{sport_name}/topics to filter topics by sport.

Tag Groups

Tags can be organized into hierarchical groups using an adjacency list model. Groups have:
  • A parent_id for tree structure (e.g., league → team)
  • display_order for sibling ordering
  • Members linked via TagGroupMember

Topic Relationships

Directed relationships between tags model real-world connections:
Used for grouping topics on explore pages (e.g., showing players grouped by team).