{
  "app_name": "Simple Calculator",
  "pages": [
    {
      "page_id": "calculator",
      "page_title": "Calculator",
      "route_path": "/",
      "route_params": [],
      "image_indices": [],
      "description": "Single-page calculator application with all functionality on one screen. The layout consists of: (1) A display module at the top showing the current expression in a smaller secondary line (e.g. '5 + 3') and the main display showing the current input or result, right-aligned, with auto-sizing font for longer numbers, defaulting to '0'. (2) A memory button row with MC, MR, M+, M- buttons, with a visual dot indicator when memory contains a value. (3) A control row with AC, CE, Backspace (⌫), and % buttons. (4) A number pad grid with digits 0-9, decimal point (.), and +/- toggle button. (5) An operator column on the right side with ÷, ×, -, +, and = buttons. Operators are visually distinct (primary blue color) and show highlighted/active state when selected. (6) A copy button near the display to copy the current result to clipboard, with a brief tooltip confirmation 'Copied!' on success. (7) A history toggle button (clock icon) in the top-right corner that opens a slide-out drawer/panel on the right side showing the last 50 calculations in reverse chronological order. Each history entry displays the full expression (e.g. '5 + 3 = 8') with a timestamp. Clicking a history entry loads that result into the calculator display. The history panel has a 'Clear History' button at the bottom. The calculator supports full keyboard input: number keys 0-9, operators +, -, *, /, Enter for equals, Escape for AC, Backspace for delete, and period for decimal. Division by zero shows 'Cannot divide by zero' error message in the display. Error state requires AC to clear. Results exceeding 15 digits display in scientific notation. The interface uses an 8px grid system, 44x44px minimum touch targets, smooth 300ms transitions for button presses and panel animations, and supports both light and dark themes.",
      "navigates_to": []
    }
  ],
  "shared_state": [
    {
      "key": "calculatorState",
      "type": "{ currentDisplay: string; previousValue: number | null; currentOperator: string | null; awaitingOperand: boolean; isResultDisplayed: boolean; memory: number }",
      "initial_value": "{ \"currentDisplay\": \"0\", \"previousValue\": null, \"currentOperator\": null, \"awaitingOperand\": false, \"isResultDisplayed\": false, \"memory\": 0 }",
      "description": "Current state of the calculator including display value, pending operation, and memory storage"
    },
    {
      "key": "sessionHistory",
      "type": "Array<{ id: string; operand1: number; operator: string; operand2: number; result: number; timestamp: string; expression: string }>",
      "initial_value": "[]",
      "description": "List of calculations performed in the current session, persisted across interactions within the same page session"
    }
  ],
  "default_route": "calculator",
  "design_system": {
    "theme_mode": "light",
    "density": "comfortable",
    "color_primary": "#1677ff",
    "color_success": "#52c41a",
    "color_warning": "#faad14",
    "color_error": "#ff4d4f",
    "color_bg_container": "#ffffff",
    "color_bg_layout": "#f0f2f5",
    "color_text": "#000000e0",
    "color_border": "#d9d9d9",
    "font_family": "Inter, -apple-system, sans-serif",
    "font_size_base": 14,
    "border_radius": 8,
    "component_overrides": {
      "Button": {
        "borderRadius": 8,
        "controlHeight": 56
      }
    }
  }
}
