InnoQLS

Schema Reference

Review schemas define how the SME review page looks and behaves. Each schema is a JSON document stored in the form_schemas collection. Schemas are assigned to managers, and their SMEs inherit them.

Schema Structure

A schema has three top-level keys:

{
  "fields": { ... },   // Field definitions (what exists)
  "tabs":   [ ... ]    // Layout structure (how it's arranged)
}

Plus metadata stored alongside:

Fields

The fields object defines every field available in the form. Each key is a unique field identifier, and the value describes how it behaves.

"fields": {
  "question": {
    "label": "Question",
    "type": "display",
    "editable": true,
    "katex": true
  },
  "is_google_proof": {
    "label": "Google-proof?",
    "type": "boolean"
  },
  "feedback_comment": {
    "label": "Feedback",
    "type": "text",
    "placeholder": "Optional comments..."
  }
}

Every field must have label and type. Additional options depend on the type.

approval_field

Set "approval_field" at the top level of the schema (alongside fields and tabs) to indicate which boolean field represents the final approval decision. This is used by the Reports dashboard to calculate approved/rejected counts.

"approval_field": "good_to_go"

If not set, the system defaults to looking for a field named good_to_go.

Field Types

display Rich Content Display

Shows content from the reviewed item (e.g., question, solution, answer). Supports mathematical notation rendering, inline editing with word-level diff, and tool buttons.

OptionValue TypeDefaultDescription
editablebooleanfalseShow edit button. SME can modify the text.
katexbooleanfalseRender mathematical notation using KaTeX, a math typesetting library (e.g. $x^2$ displays as x²). Enable this for fields that contain math formulas or equations.
collapsiblebooleanfalseSection can be collapsed/expanded.

The field key must match a field name in the source document (e.g., "question" reads from the item's question property). If you need to show related data (e.g., book info), ensure the data pipeline flattens it into the document as a top-level field.

boolean Checkbox

A standard checkbox for yes/no criteria. Checked = Yes, unchecked = No. Supports keyboard shortcuts: Tab to cycle between checkboxes, Y/N to check/uncheck.

OptionValue TypeDefaultDescription
labelstringThe label shown next to the checkbox.

All boolean fields are collected as criteria in the review submission. Checked = "Yes", unchecked = "No".

select Dropdown

A dropdown menu for choosing from a predefined list of options.

OptionValue TypeDefaultDescription
optionsarray[]List of choices shown in the dropdown.
"difficulty": {
  "label": "Difficulty Level",
  "type": "select",
  "options": ["Easy", "Medium", "Hard"]
}
text Text Input

A multi-line textarea for free-form input (e.g., feedback comments).

OptionValue TypeDefaultDescription
placeholderstring""Placeholder text shown when empty.

Tabs

Tabs split the review form into steps. The SME progresses through tabs using Previous/Next buttons. The submit button appears on the last tab.

"tabs": [
  {
    "key": "review",
    "label": "Review",
    "layout": "split",
    "groups": [ ... ]
  },
  {
    "key": "decision",
    "label": "Decision",
    "layout": "single",
    "groups": [ ... ]
  }
]
PropertyTypeDescription
keystringUnique identifier for the tab.
labelstringDisplay name shown in the tab bar.
layoutstringPanel layout: "split" or "single". See Layouts.
groupsarrayGroups of fields within this tab.

If the schema has no tabs, the review page renders all fields in a single split view (display fields on the left, input fields on the right).

Groups

Groups organize fields within a tab. Each group has a heading and a position that determines where it appears on screen.

"groups": [
  {
    "key": "qsa",
    "label": "QSA",
    "position": "left",
    "fields": ["question", "solution", "answer", "book_info", "passage"]
  },
  {
    "key": "rubric",
    "label": "Quality Checklist",
    "position": "right",
    "fields": ["is_google_proof", "is_target_level", "..."]
  }
]
PropertyTypeDescription
keystringUnique identifier for the group.
labelstringHeading shown above the group. Leave empty for no heading.
positionstring"left", "right", or "full". See Layouts.
fieldsarrayOrdered list of field keys to render in this group.

Layouts & Positions

Tab Layouts

Group Positions

Full Example

A complete OTS QSA Review schema with two tabs:

{
  "fields": {
    "question":           {"label": "Question",           "type": "display",   "editable": true, "katex": true},
    "solution":           {"label": "Solution",           "type": "display",   "editable": true, "katex": true, "collapsible": true},
    "answer":             {"label": "Answer",             "type": "display",   "editable": true, "katex": true},
    "book_info":          {"label": "Book",               "type": "display"},
    "passage":            {"label": "Concept Passage",    "type": "display",   "collapsible": true, "katex": true},
    "is_google_proof":    {"label": "Google-proof?",      "type": "boolean"},
    "is_target_level":    {"label": "Target level?",      "type": "boolean"},
    "is_self_contained":  {"label": "Self-contained?",    "type": "boolean"},
    "conditions_stated":  {"label": "Conditions stated?", "type": "boolean"},
    "factually_correct":  {"label": "Factually correct?", "type": "boolean"},
    "detailed_reasoning": {"label": "Detailed reasoning?","type": "boolean"},
    "latex_correct":      {"label": "LaTeX correct?",     "type": "boolean"},
    "grammar_correct":    {"label": "Grammar correct?",   "type": "boolean"},
    "structure_correct":  {"label": "Structure correct?",  "type": "boolean"},
    "feedback_comment":   {"label": "Feedback",           "type": "text", "placeholder": "Optional comments or suggestions..."},
    "good_to_go":         {"label": "Good to Go?",        "type": "boolean"}
  },
  "tabs": [
    {
      "key": "review",
      "label": "Review",
      "layout": "split",
      "groups": [
        {
          "key": "qsa",
          "label": "QSA",
          "position": "left",
          "fields": ["question", "solution", "answer", "book_info", "passage"]
        },
        {
          "key": "rubric",
          "label": "Quality Checklist",
          "position": "right",
          "fields": [
            "is_google_proof", "is_target_level", "is_self_contained",
            "conditions_stated", "factually_correct", "detailed_reasoning",
            "latex_correct", "grammar_correct", "structure_correct"
          ]
        }
      ]
    },
    {
      "key": "decision",
      "label": "Decision",
      "layout": "single",
      "groups": [
        {
          "key": "final",
          "label": "Final Review",
          "position": "full",
          "fields": ["feedback_comment", "good_to_go"]
        }
      ]
    }
  ]
}
This application is in beta and running on a development server. Features may be incomplete or contain bugs.