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 IDname— display name shown to users (e.g. “Mechanics”)description— optional longer explaineremoji— visual icon shown on mobile / web (mainly used on L1)short_uid— auto-generated unique ID likeTAX..., unique per courseinternal_display_uid— human-friendly ID likeTAX-001, used by adminsparent_id— ID of the parent node; default value means it’s an L1 rootcourse_id— the course this taxonomy belongs to (UPSC, etc.)sort_order— numeric position among siblings; controls display orderstatus— publishing state:DRAFT/PUBLISHED/UNPUBLISHED/ARCHIVEmcq_count— live counts of attached MCQs by type —pyq_count,dq_count,eq_count, each tracked total + published-onlydocket_count— number of dockets attached to this taxonomy, published onlyis_deleted— soft-delete flagcreated_at/updated_atcreated_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