Block
1. What is a Block?
A Block is the smallest reusable unit of study content in Keystone. It carries one piece of authored material — rich PlateJS — together with its links to the MCQs that reference it.
If a Docket is a chapter, a Block is a paragraph or figure inside that chapter — addressable on its own, reorderable, and reusable.
2. Structure
A block is an independent content record, parented to a docket and scoped to a course:
BLOCK "Area of Circle — Intro" (BLK1A2B3C4D)
└─ Course: NEET
└─ Parent docket: DOC-001
└─ Type: PLATEJS
└─ Content:
[{ "type": "p", "children": [{ "text": "The area of a circle is the region enclosed…" }] }]
└─ MCQ links:
├─ Primary → MCQ9F8E (PYQ)
└─ Secondary → MCQ4D7C (DQ), MCQ2A1B (PYQ)
- Identity —
short_uid(BLK…), MongoDB_id, optional legacyold_uuid - Scope — every block has a
course_idand an originatingdocket_id - Content — PlateJS payload only; stored as plaintext (
content) plus at-rest ciphertext (conte) for learner-facing surfaces - MCQ links — denormalised both ways: each block knows the MCQs that point to it; each MCQ knows the blocks it references
- Ordering — the docket owns block order via its
block_idslist, not the block itself
3. Parameters of a Block
_id— Unique Idshort_uid— auto-generated unique ID likeBLK1A2B3C4D; used for cross-references from MCQs, AI runs, reviews, and deep-linkingdocket_id— originating / current parent docket; nullable when the block is detachedcourse_id— the course this block belongs to (NEET, UPSC, etc.); used for scoping and access controltitle— optional plaintext titlecontent— PlateJS payload (plaintext JSON); requiredconte— encryptedcontenttype— alwaysPLATEJSlinked_mcq_ids— denormalised list of all MCQ short UIDs that link to this block (any kind of link)pri_mcq_ids— MCQ short UIDs where this block is the primary link (i.e. the block came from the MCQ’s own L4 docket)sec_mcq_ids— MCQ short UIDs where this block is a secondary link (the block came from a different docket)pri_mcq_count— denormalised counts of primary-linked MCQs, split by type:pyq,dq,eqsec_mcq_count— denormalised counts of secondary-linked MCQs, split by type:pyq,dq,eqis_deleted— soft-delete flagcreated_at/updated_at— epoch-ms timestamps (UTC)created_by/updated_by— user IDs of the author and last editor