{
  "page_ir": {
    "page_id": "loan_calculator",
    "page_goal": "Single-page loan calculator application. Contains an input form section with fields: Principal Amount (currency input, default $250,000, range $1,000–$10,000,000), Annual Interest Rate (percentage input, default 6.5%, range 0%–50%), and Loan Term with a unit selector toggle for months/years (default 360 months, range 1–600 months). Inline validation displays error messages for out-of-range or invalid inputs. A prominent 'Calculate' button triggers computation, and a 'Reset' button restores defaults. The results display section shows three stat cards: Monthly Payment (large emphasized font), Total Interest Paid, and Total Amount Paid, all formatted as currency with thousands separators. Below results, a collapsible 'Show Amortization Schedule' section expands to reveal a paginated table with columns: Payment # , Payment Date, Payment Amount, Principal Portion, Interest Portion, Remaining Balance. The table highlights the milestone row where principal portion exceeds interest portion. An 'Export CSV' button allows downloading the schedule. A visual pie/donut chart shows the breakdown of total principal vs total interest. A disclaimer footer notes calculations are estimates for informational purposes. Responsive layout adapts from mobile (stacked) to desktop (side-by-side input/results). Tooltips on info icons explain terms like APR and amortization.",
    "style": {
      "tone": "professional",
      "theme": "light",
      "density": "comfortable",
      "color_intent": null
    },
    "accessibility": {
      "required_labels": [],
      "skip_navigation": true,
      "focus_management": true,
      "announce_changes": []
    },
    "responsive": {
      "breakpoints": {
        "sm": 640,
        "md": 768,
        "lg": 1024,
        "xl": 1280
      },
      "collapse_rules": [],
      "hidden_on_small": [],
      "stack_on_small": []
    },
    "constraints": [],
    "seo_title": null,
    "seo_description": null
  },
  "data_ir": {
    "types": {},
    "state": {
      "isLoading": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "error": {
        "type": "string",
        "initial": null,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "loan_calculator": {
        "type": "object",
        "initial": null,
        "required": false,
        "constraints": {},
        "item_type": null
      }
    },
    "derived": {}
  },
  "data_fetch_ir": {
    "endpoints": {
      "fetch_data": {
        "endpoint_id": "fetch_data",
        "module": null,
        "endpoint": "/",
        "method": "GET",
        "path_params": {},
        "query_params": {},
        "body": null,
        "fields": [],
        "response_target": "loan_calculators",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": "isLoading",
        "error_field": "error"
      },
      "fetch_defaults_id": {
        "endpoint_id": "fetch_defaults_id",
        "module": null,
        "endpoint": "/{defaults_id}",
        "method": "PUT",
        "path_params": {
          "defaults_id": "$route.params.defaults_id"
        },
        "query_params": {},
        "body": null,
        "fields": [],
        "response_target": "loan_calculator",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": "isLoading",
        "error_field": "error"
      },
      "fetch_calculation_id": {
        "endpoint_id": "fetch_calculation_id",
        "module": null,
        "endpoint": "/{calculation_id}",
        "method": "DELETE",
        "path_params": {
          "calculation_id": "$route.params.calculation_id"
        },
        "query_params": {},
        "body": null,
        "fields": [],
        "response_target": "loan_calculator",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": "isLoading",
        "error_field": "error"
      },
      "fetch_calculation_id_details": {
        "endpoint_id": "fetch_calculation_id_details",
        "module": null,
        "endpoint": "/{calculation_id}/details",
        "method": "GET",
        "path_params": {
          "calculation_id": "$route.params.calculation_id"
        },
        "query_params": {},
        "body": null,
        "fields": [],
        "response_target": "loan_calculator",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": "isLoading",
        "error_field": "error"
      },
      "fetch_calculation_id_generate_schedule": {
        "endpoint_id": "fetch_calculation_id_generate_schedule",
        "module": null,
        "endpoint": "/{calculation_id}/generate-schedule",
        "method": "POST",
        "path_params": {
          "calculation_id": "$route.params.calculation_id"
        },
        "query_params": {},
        "body": null,
        "fields": [],
        "response_target": "loan_calculator",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": "isLoading",
        "error_field": "error"
      },
      "fetch_calculation_id_schedule_entries": {
        "endpoint_id": "fetch_calculation_id_schedule_entries",
        "module": null,
        "endpoint": "/{calculation_id}/schedule-entries",
        "method": "GET",
        "path_params": {
          "calculation_id": "$route.params.calculation_id"
        },
        "query_params": {},
        "body": null,
        "fields": [],
        "response_target": "loan_calculator",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": "isLoading",
        "error_field": "error"
      }
    }
  },
  "data_model_ir": {
    "entities": {},
    "relationships": []
  },
  "behaviour_ir": {
    "events": {},
    "actions": {},
    "feedback": {}
  },
  "component_ir": {
    "library": "antd",
    "theme": {
      "primaryColor": null,
      "secondaryColor": null,
      "successColor": null,
      "warningColor": null,
      "errorColor": null,
      "fontFamily": null,
      "fontSize": null,
      "borderRadius": null
    },
    "components": {
      "pageContainer": {
        "type": "div",
        "label": "Page Container",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "style": {
            "padding": "24px"
          }
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "pageHeader": {
        "type": "Typography.Title",
        "label": "Loan Calculator",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "level": 2,
          "children": "Loan Calculator"
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "errorAlert": {
        "type": "Alert",
        "label": "Error",
        "description": null,
        "bind": "state.error",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "error",
          "showIcon": true
        },
        "dynamic_props": {
          "message": "state.error"
        },
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": "state.error !== null",
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "detailCard": {
        "type": "Card",
        "label": "LoanCalculator Details",
        "description": null,
        "bind": "state.loan_calculator",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Loan Calculator"
        },
        "dynamic_props": {
          "loading": "state.isLoading"
        },
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "detailDescriptions": {
        "type": "Descriptions",
        "label": "Details",
        "description": null,
        "bind": "state.loan_calculator",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "bordered": true,
          "column": 2
        },
        "dynamic_props": {},
        "styles": {},
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      }
    }
  },
  "layout_ir": {
    "root": "pageContainer",
    "children": {
      "pageContainer": [
        "pageHeader",
        "errorAlert",
        "detailCard"
      ],
      "detailCard": [
        "detailDescriptions"
      ]
    },
    "layout": {
      "pageContainer": {
        "type": "vertical",
        "gap": 16,
        "padding": "24px",
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      }
    },
    "layout_zones": [
      {
        "zone_id": "main",
        "component": "pageContainer",
        "anchor": "center",
        "size_hint": "full-width",
        "z_layer": "base",
        "notes": ""
      }
    ],
    "responsive_overrides": []
  },
  "navigation_ir": {
    "tabs": [],
    "modals": {},
    "drawers": {},
    "routes": [],
    "breadcrumb": null,
    "default_tab": null
  },
  "realtime_ir": {
    "timers": {},
    "polling": {}
  },
  "metadata": {
    "ir_version": "3.5",
    "generated_at": "",
    "source_prompt": null,
    "schema_session_id": null,
    "warnings": [
      "MINIMAL FALLBACK IR: generated after 3 failed LLM attempts. Contains essential endpoints and a basic UI skeleton."
    ]
  },
  "page_data_contract": null,
  "schema_ir": null
}
