Skip to content
CAT Study Hub

How to add a paper

Every page under /papers is generated from one JSON file per paper in content/papers/. Adding a paper is a content change, not a code change — no route, component or import needs to be touched.

  1. 1. Scaffold the file. From the project root:
    Code
    npm run add-paper -- --id 2027-nov-dbe --title "Computer Applications Technology" --year 2027 --board DBE --term November
    npm run add-paper -- --id 2027-nov-dbe --title "Computer Applications Technology" --year 2027 --board DBE --term November
    This copies content/papers/_template.json to content/papers/2027-nov-dbe.json with those fields filled in.
  2. 2. Fill in the content. Open the new file and add the scenario, files table, exam rules and every question/sub-question — prompt, worked steps, code/formula blocks and the “why this earns the marks” explanation. The full schema is documented in content/README.md.
  3. 3. Validate it.
    Code
    npm run validate
    npm run validate
    This checks the file against the schema and confirms sub-question marks sum to each question’s marks, question marks sum to the paper’s total, there are no duplicate ids, and every noteLinks entry points at a real notes heading. It also runs automatically before npm run build.
  4. 4. Preview it. npm run dev and open the new paper, question and topic pages it just created.