./schema

Entity Schema & Content Model

DSA Playbook structures algorithmic patterns, debug traces, and problem metadata into robust, version-controlled JSON/JS modules with dynamic API fallback.

Question Object Structure

Every question or pattern problem conforms to a strict JSON schema ensuring step-by-step visualizations and code rendering across all client views.

{
  "id": "two-sum",
  "title": "Two Sum",
  "diff": "Easy",
  "src": "LeetCode",
  "url": "https://leetcode.com/problems/two-sum/",
  "summary": "Find two numbers that add up to target.",
  "desc": "Given an array of integers nums and an integer target...",
  "trace": [
    {
      "values": [2, 7, 11, 15],
      "pointers": [{"index": 0, "label": "i"}],
      "vars": [{"label": "target", "value": 9}],
      "note": "Start iteration at index 0."
    }
  ],
  "code": "public int[] twoSum(int[] nums, int target) { ... }"
}

Pattern & Topic Registry (`SITE_TOPICS`)

Topics are registered centrally in lib/topics-config.js, governing top navigation, mobile drawers, and landing page topic cards automatically.

User Progress & Authentication

Progress states (DONE, PROGRESS, ATTEMPTED) sync securely with the backend API (`/api/v1/progress`) with offline localStorage graceful fallback.