CAT Mock Shell — how papers plug into Cetking Universe
Live since 9 Oct 2026 (PR #166, "go live" by Ravneet 1:07 AM IST).
Live paper: CAT 2026 Expected Paper — https://cetking-platform.vercel.app/mocks/cat/cat-2026-expected
(slug cat-2026-expected, status live, 24 / 22 / 22). The paper row exists; its questions are still being
created by Ravneet, so every slot shows "Not in this paper yet" until they are loaded.
General address: /mocks/cat/<slug>. Test paper: /mocks/cat/cat-2026-demo (6 samples, draft).
What it is
- The exam screen is
public/mock-shell/cat.html— Ravneet's CAT shell (Digialm layout: VARC → DILR → QA, 40:00 per section / 53:20 PwD, palette states, TITA pad, mouse-only left-to-right calculator). Do not redesign the chrome. OnlyloadPaper(),sectionSeconds()andfinish()were changed. app/mocks/cat/[slug]/page.tsxshows the shell full-window under a Universe address (noindex).GET /api/mocks/<slug>/paper→ sections + questions without the answer key; adds the signed-in student's first name.POST /api/mocks/<slug>/submit→ scores on the server (MCQ +3/−1, TITA +3/0, TITA "20" = "20.0"), saves tomock_attemptswith the Cetking ID only (no name/phone), returns section scores.- Code:
lib/mocks/papers.ts(Supabase reads/writes),lib/mocks/score.ts(marking, pure).
Supabase (Cetking Learn, Mocky + Questions universes)
| Table | One row = | Key columns |
|---|---|---|
mock_papers |
one paper | slug (URL), title, kind full_mock/pyq/sectional, status draft/live/retired, sections jsonb [{id,name,n,seconds,pwd_seconds}] |
question_sets |
one shared passage / DILR set / chart | set_code unique, section, set_type, stimulus_html |
mock_paper_items |
one question slot | paper_id, section, qno (1-based in section), qtype mcq/tita, set_id, stem_html, options (array of option TEXT; [] for TITA), correct (option text or TITA value; null = not scored), negative 1/0, blueprint tags sub_section, topic, g_strategy, difficulty, optional question_bank_id / pyq_code |
mock_attempts |
one submitted attempt | paper_id, cetking_id, answers, review_marks, seen, section_scores, total_score |
All four have RLS on and no public policies — only the server (service key) reads them.
Loading the CAT 2026 Expected Paper
- The
mock_papersrowcat-2026-expectedalready exists — add questions to it; do not create a new paper. - For each RC passage / DILR set, insert a
question_setsrow. - Insert the questions into
mock_paper_itemsin order, linkingset_id; tag each with its blueprintsub_section/topic(Content Universes V2.0 names: Summary, Paragraph, Evidence, Critical Reasoning; Arrangement, Caselet, Graphs, Schedule & Routing; Arithmetic, Modern Maths, Algebra, Geo Mensu, TS&W, Numbers). Expected mix: VARC 24 (16 RC + 8 non-RC), DILR 22 (5 sets), QA 22 (Arithmetic 6, Modern 5, Algebra 4, Geo Mensu 3, TS&W 2, Numbers 2). - Questions appear on the live page as soon as they are inserted; empty slots keep showing "Not in this paper yet".
- More papers later: new
mock_papersrow with its own slug (e.g.cat-2026-expected-2,cat-2025-slot1).
The cat-2026-demo paper is only a test plug; delete it once the Expected Paper has questions.
Not in this pass
Rav Singh AI mock analysis from mock_attempts, solutions review screen, resume-after-refresh, a link from the
/mocks page, phone layout (shell needs ≥1100px). No proctoring, pause, strikethrough, dark mode or group tabs (dropped from scope).