{
  "page_ir": {
    "page_id": "home",
    "page_goal": "Single-page application for submitting name and email, displaying all submissions in a table below the form",
    "style": {
      "tone": "functional",
      "theme": "light",
      "density": "comfortable",
      "color_intent": "neutral with primary accent"
    },
    "accessibility": {
      "required_labels": [
        "Name",
        "Email",
        "Submit",
        "Submissions Table"
      ],
      "skip_navigation": true,
      "focus_management": true,
      "announce_changes": []
    },
    "responsive": {
      "breakpoints": {
        "sm": 576,
        "md": 768,
        "lg": 992
      },
      "collapse_rules": [
        "form_section stacks vertically on sm"
      ],
      "hidden_on_small": [],
      "stack_on_small": []
    },
    "constraints": [
      "No navigation to other pages",
      "Form clears after successful submission",
      "Table auto-updates on new submission"
    ],
    "seo_title": null,
    "seo_description": null
  },
  "data_ir": {
    "types": {},
    "state": {
      "submitting": {
        "type": "boolean",
        "initial": false,
        "required": false,
        "constraints": {},
        "item_type": null
      },
      "loadingSubmissions": {
        "type": "boolean",
        "initial": true,
        "required": false,
        "constraints": {},
        "item_type": null
      }
    },
    "derived": {}
  },
  "data_fetch_ir": {
    "endpoints": {
      "3e76aa828e434b3b8b2e9d98aab4ed8f": {
        "endpoint_id": "3e76aa828e434b3b8b2e9d98aab4ed8f",
        "module": "Submissions",
        "endpoint": "/api/submissions/",
        "method": "GET",
        "path_params": {},
        "query_params": {
          "limit": 1000,
          "offset": 0
        },
        "body": null,
        "fields": [
          "id",
          "name",
          "email",
          "created_at",
          "updated_at"
        ],
        "response_target": "submissions",
        "response_transform": null,
        "trigger": "on_mount",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      },
      "153e2cf47f1847d993ad202539451df6": {
        "endpoint_id": "153e2cf47f1847d993ad202539451df6",
        "module": "Submissions",
        "endpoint": "/api/submissions/",
        "method": "POST",
        "path_params": {},
        "query_params": {},
        "body": {
          "name": "$form.name",
          "email": "$form.email"
        },
        "fields": [
          "id",
          "name",
          "email",
          "created_at",
          "updated_at"
        ],
        "response_target": "submissions",
        "response_transform": null,
        "trigger": "manual",
        "depends_on": [],
        "debounce_ms": null,
        "loading_field": null,
        "error_field": null
      }
    }
  },
  "data_model_ir": {
    "entities": {
      "submission": {
        "name": "Submission",
        "backend_module": "Submissions",
        "fields": [
          "id",
          "name",
          "email",
          "created_at",
          "updated_at"
        ],
        "computed": [],
        "display_fields": [
          "id",
          "name",
          "email",
          "created_at"
        ],
        "search_fields": [],
        "filters": [],
        "default_sort": null,
        "default_sort_dir": "asc"
      }
    },
    "relationships": []
  },
  "behaviour_ir": {
    "events": {
      "onFormSubmitStart": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.submitting",
            "expr": "true"
          }
        ],
        "description": ""
      },
      "onFormSubmitEnd": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.submitting",
            "expr": "false"
          }
        ],
        "description": ""
      },
      "onSubmissionsLoaded": {
        "type": "mutation",
        "updates": [
          {
            "target": "state.loadingSubmissions",
            "expr": "false"
          }
        ],
        "description": ""
      }
    },
    "actions": {
      "8bc7a89dabc84e7482aedf57aee8eeb4": {
        "action_id": "8bc7a89dabc84e7482aedf57aee8eeb4",
        "trigger": "form_submit",
        "target_component_id": "submission_form",
        "operation": "create",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [
          {
            "rule_id": "val_0",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"name\", \"message\": \"Please enter your name\", \"rule_id\": \"val_name_required\", \"type\": \"required\"}",
            "message": "{\"field\": \"name\", \"message\": \"Please enter your name\", \"rule_id\": \"val_name_required\", \"type\": \"required\"}"
          },
          {
            "rule_id": "val_1",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"name\", \"message\": \"Name must be at most 100 characters\", \"rule_id\": \"val_name_max\", \"type\": \"max_length\", \"value\": 100}",
            "message": "{\"field\": \"name\", \"message\": \"Name must be at most 100 characters\", \"rule_id\": \"val_name_max\", \"type\": \"max_length\", \"value\": 100}"
          },
          {
            "rule_id": "val_2",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"email\", \"message\": \"Please enter your email\", \"rule_id\": \"val_email_required\", \"type\": \"required\"}",
            "message": "{\"field\": \"email\", \"message\": \"Please enter your email\", \"rule_id\": \"val_email_required\", \"type\": \"required\"}"
          },
          {
            "rule_id": "val_3",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"email\", \"message\": \"Please enter a valid email address\", \"rule_id\": \"val_email_format\", \"type\": \"email\"}",
            "message": "{\"field\": \"email\", \"message\": \"Please enter a valid email address\", \"rule_id\": \"val_email_format\", \"type\": \"email\"}"
          },
          {
            "rule_id": "val_4",
            "field": null,
            "type": "custom",
            "value": null,
            "expression": "{\"field\": \"email\", \"message\": \"Email must be at most 255 characters\", \"rule_id\": \"val_email_max\", \"type\": \"max_length\", \"value\": 255}",
            "message": "{\"field\": \"email\", \"message\": \"Email must be at most 255 characters\", \"rule_id\": \"val_email_max\", \"type\": \"max_length\", \"value\": 255}"
          }
        ],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.submitting",
            "expr": "false"
          }
        ],
        "api_endpoint": "153e2cf47f1847d993ad202539451df6",
        "api_body": "{ name: formValues.name, email: formValues.email }",
        "side_effects": [
          {
            "type": "toast",
            "config": {
              "message": "Submission created successfully!",
              "type": "success"
            }
          },
          {
            "type": "refresh",
            "config": {
              "target": "fetchSubmissions"
            }
          },
          {
            "type": "reset_state",
            "config": {
              "target": "submission_form"
            }
          }
        ],
        "then": null,
        "catch": null,
        "data_action": null
      },
      "46250816a69b4966a2a9e3a29595968f": {
        "action_id": "46250816a69b4966a2a9e3a29595968f",
        "trigger": "button_click",
        "target_component_id": "submissions_table",
        "operation": "read",
        "description": "",
        "payload": {},
        "guard": null,
        "requires_confirmation": false,
        "confirmation_message": null,
        "validation_rules": [],
        "validation_messages": {},
        "updates": [
          {
            "target": "state.loadingSubmissions",
            "expr": "false"
          }
        ],
        "api_endpoint": "3e76aa828e434b3b8b2e9d98aab4ed8f",
        "api_body": null,
        "side_effects": [],
        "then": null,
        "catch": null,
        "data_action": null
      }
    },
    "feedback": {
      "8bc7a89dabc84e7482aedf57aee8eeb4": {
        "action_id": "8bc7a89dabc84e7482aedf57aee8eeb4",
        "loading_indicator": "spinner",
        "loading_text": null,
        "success_message": "Submission created successfully!",
        "error_message": "Failed to create submission. Please try again.",
        "ui_updates": [
          "clear_form_fields",
          "focus_name_field"
        ]
      },
      "46250816a69b4966a2a9e3a29595968f": {
        "action_id": "46250816a69b4966a2a9e3a29595968f",
        "loading_indicator": "skeleton",
        "loading_text": null,
        "success_message": null,
        "error_message": "Failed to load submissions.",
        "ui_updates": []
      }
    }
  },
  "component_ir": {
    "library": "antd",
    "theme": {
      "primaryColor": "#1677ff",
      "secondaryColor": "#000000",
      "successColor": null,
      "warningColor": null,
      "errorColor": null,
      "fontFamily": "sans-serif",
      "fontSize": null,
      "borderRadius": 6
    },
    "components": {
      "main_container": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "minHeight": "100vh",
          "width": "100%",
          "padding": "24px",
          "backgroundColor": "#f5f5f5"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "content_wrapper": {
        "type": "div",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "dynamic_props": {},
        "styles": {
          "maxWidth": "900px",
          "margin": "0 auto",
          "width": "100%"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "page_title": {
        "type": "Typography.Title",
        "label": "Todo Task Submissions",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "level": 2
        },
        "dynamic_props": {},
        "styles": {
          "marginBottom": "24px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "form_card": {
        "type": "Card",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "New Submission"
        },
        "dynamic_props": {},
        "styles": {
          "marginBottom": "24px"
        },
        "dynamic_styles": {},
        "class_name": null,
        "dynamic_class": null,
        "transitions": [],
        "visible_when": null,
        "disabled_when": null,
        "repeat": null,
        "slots": {},
        "a11y_role": null,
        "a11y_label": null
      },
      "submission_form": {
        "type": "Form",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "layout": "vertical",
          "name": "submission_form",
          "autoComplete": "off"
        },
        "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
      },
      "name_field": {
        "type": "Form.Item",
        "label": "Name",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "name",
          "rules": [
            {
              "required": true,
              "message": "Please enter your name"
            },
            {
              "max": 100,
              "message": "Name must be at most 100 characters"
            }
          ]
        },
        "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
      },
      "name_input": {
        "type": "Input",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Enter your name",
          "maxLength": 100,
          "allowClear": true
        },
        "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
      },
      "email_field": {
        "type": "Form.Item",
        "label": "Email",
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "name": "email",
          "rules": [
            {
              "required": true,
              "message": "Please enter your email"
            },
            {
              "type": "email",
              "message": "Please enter a valid email address"
            },
            {
              "max": 255,
              "message": "Email must be at most 255 characters"
            }
          ]
        },
        "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
      },
      "email_input": {
        "type": "Input",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "placeholder": "Enter your email",
          "maxLength": 255,
          "allowClear": true
        },
        "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
      },
      "submit_button_wrapper": {
        "type": "Form.Item",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {},
        "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
      },
      "submit_button": {
        "type": "Button",
        "label": "Submit",
        "description": null,
        "bind": null,
        "onClick": "submitForm",
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "type": "primary",
          "htmlType": "submit",
          "loading": "$state.submitting",
          "block": false
        },
        "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
      },
      "table_card": {
        "type": "Card",
        "label": null,
        "description": null,
        "bind": null,
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "title": "Submissions"
        },
        "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
      },
      "submissions_table": {
        "type": "Table",
        "label": "Submissions Table",
        "description": null,
        "bind": "appContext.submissions",
        "onClick": null,
        "onChange": null,
        "onSubmit": null,
        "onHover": null,
        "onKeyPress": null,
        "props": {
          "rowKey": "id",
          "loading": "$state.loadingSubmissions",
          "pagination": {
            "pageSize": 20
          },
          "locale": {
            "emptyText": "No submissions yet. Submit the form above to get started."
          },
          "columns": [
            {
              "title": "ID",
              "dataIndex": "id",
              "key": "id",
              "width": 280,
              "ellipsis": true
            },
            {
              "title": "Name",
              "dataIndex": "name",
              "key": "name"
            },
            {
              "title": "Email",
              "dataIndex": "email",
              "key": "email"
            },
            {
              "title": "Created At",
              "dataIndex": "created_at",
              "key": "created_at",
              "render": "formatDateTime",
              "sorter": true,
              "defaultSortOrder": "descend"
            }
          ]
        },
        "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": "main_container",
    "children": {
      "main_container": [
        "content_wrapper"
      ],
      "content_wrapper": [
        "page_title",
        "form_card",
        "table_card"
      ],
      "form_card": [
        "submission_form"
      ],
      "submission_form": [
        "name_field",
        "email_field",
        "submit_button_wrapper"
      ],
      "name_field": [
        "name_input"
      ],
      "email_field": [
        "email_input"
      ],
      "submit_button_wrapper": [
        "submit_button"
      ],
      "table_card": [
        "submissions_table"
      ]
    },
    "layout": {
      "main_container": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "content_wrapper": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "form_card": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "submission_form": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "name_field": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "email_field": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "submit_button_wrapper": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "columns": null,
        "column_template": null,
        "row_template": null,
        "align_items": null,
        "justify_content": null,
        "wrap": false,
        "min_height": null,
        "overflow": null
      },
      "table_card": {
        "type": "vertical",
        "gap": 0,
        "padding": null,
        "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": "form_zone",
        "component": "form_card",
        "anchor": "top-left",
        "size_hint": "full-width",
        "z_layer": "base",
        "notes": "Submission form at the top of the page"
      },
      {
        "zone_id": "table_zone",
        "component": "table_card",
        "anchor": "top-left",
        "size_hint": "full-width",
        "z_layer": "base",
        "notes": "Submissions table below the form"
      }
    ],
    "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": []
  },
  "page_data_contract": null,
  "schema_ir": null
}
