Owner Nikunj

Taxonomy

1. What is Taxonomy?

Taxonomy is the content classification system. It organises course content (MCQs, dockets) into a structured hierarchy so students can browse by subject and the platform can filter, search, and generate tests by topic.

Think of it as the table of contents of a course — every subject, chapter, and topic is a node that content attaches to.

2. Structure

Taxonomy has a fixed 3-level hierarchy, scoped to a single course:

L1  Subject       (e.g. Physics)        ← root node, has emoji
 └─ L2  Chapter   (e.g. Mechanics)
     └─ L3  Topic (e.g. Newton's Laws)  ← MCQs & dockets attach here
  • L1 — top-level subject; entry point on mobile / web
  • L2 — chapter under a subject
  • L3 — leaf topic; the actual tagging point for content
  • No more than 3 levels allowed
  • Every node belongs to exactly one course (UPSC, etc.) — no cross-course sharing

3. Parameters of a Taxonomy

  • id — unique ID
  • name — display name shown to users (e.g. “Mechanics”)
  • description — optional longer explainer
  • emoji — visual icon shown on mobile / web (mainly used on L1)
  • short_uid — auto-generated unique ID like TAX..., unique per course
  • internal_display_uid — human-friendly ID like TAX-001, used by admins
  • parent_id — ID of the parent node; default value means it’s an L1 root
  • course_id — the course this taxonomy belongs to (UPSC, etc.)
  • sort_order — numeric position among siblings; controls display order
  • status — publishing state: DRAFT / PUBLISHED / UNPUBLISHED / ARCHIVE
  • mcq_count — live counts of attached MCQs by type — pyq_count, dq_count, eq_count, each tracked total + published-only
  • docket_count — number of dockets attached to this taxonomy, published only
  • is_deleted — soft-delete flag
  • created_at / updated_at
  • created_by / updated_by

4. Lifecycle

Each taxonomy moves through a publishing status machine:

DRAFT ─┬─→ PUBLISHED ─┬─→ UNPUBLISHED ─→ PUBLISHED
       │              └─→ ARCHIVE
       └──────────────────→ ARCHIVE   (terminal)
  • DRAFT — created, not visible to students
  • PUBLISHED — live and visible
  • UNPUBLISHED — temporarily hidden, can return to PUBLISHED
  • ARCHIVE — permanently retired (terminal state)
  • Cascade — status changes on L1 or L2 propagate down to all descendants; L3 status is independent
  • Soft delete — deleting a taxonomy marks is_deleted=true; the record stays in the DB for recovery