{
  "appName": "My Chores",
  "startPage": "myChoresPage",
  "menu": [
    {
      "label": "My Chores",
      "mapsTo": "myChoresPage"
    },
    {
      "label": "Add a Chore",
      "mapsTo": "addChorePage"
    },
    {
      "label": "Manage Rooms",
      "mapsTo": "manageRoomsPage"
    },
    {
      "label": "Manage Family",
      "mapsTo": "manageFamilyPage"
    }
  ],
  "pages": {
    "myChoresPage": {
      "component": "page",
      "title": "My Chores",
      "content": [
        {
          "component": "summary",
          "label": "Total Chores",
          "value": "{COUNT(choreReader)}",
          "icon": "home",
          "styleHint": {
            "color": "primary"
          }
        },
        {
          "component": "text",
          "content": "No chores yet! Set up your rooms and family members, then add your first chore.",
          "styleHint": {
            "variant": "body",
            "align": "center",
            "color": "grey"
          },
          "visibleWhen": {
            "source": "choreReader",
            "countEquals": 0
          }
        },
        {
          "component": "list",
          "dataSource": "choreReader",
          "searchable": true,
          "rowColorField": "status",
          "rowColorMap": {
            "To Do": "orange",
            "In Progress": "blue",
            "Done": "green"
          },
          "columns": [
            {
              "header": "Chore",
              "field": "choreName",
              "sortable": true
            },
            {
              "header": "Room",
              "field": "room",
              "sortable": true,
              "filterable": true
            },
            {
              "header": "Assigned To",
              "field": "assignedTo",
              "sortable": true,
              "filterable": true
            },
            {
              "header": "Frequency",
              "field": "frequency",
              "sortable": true,
              "filterable": true
            },
            {
              "header": "Due Date",
              "field": "dueDate",
              "sortable": true
            },
            {
              "header": "Status",
              "field": "status",
              "sortable": true,
              "filterable": true,
              "colorMap": {
                "Done": "green",
                "In Progress": "blue",
                "To Do": "orange"
              }
            }
          ],
          "defaultSort": {
            "field": "dueDate",
            "direction": "desc"
          },
          "rowActions": [
            {
              "label": "Start",
              "action": "update",
              "dataSource": "choreUpdater",
              "matchField": "_id",
              "values": {
                "status": "In Progress"
              },
              "hideWhen": {
                "field": "status",
                "notEquals": "To Do"
              },
              "showMessage": "Chore started!"
            },
            {
              "label": "Mark Done",
              "action": "update",
              "dataSource": "choreUpdater",
              "matchField": "_id",
              "values": {
                "status": "Done"
              },
              "hideWhen": {
                "field": "status",
                "notEquals": "In Progress"
              },
              "showMessage": "Chore completed!"
            },
            {
              "label": "Delete",
              "action": "delete",
              "dataSource": "choreDeleter",
              "matchField": "_id",
              "showMessage": "Chore deleted!"
            }
          ],
          "onRowTap": {
            "action": "navigate",
            "target": "editChorePage",
            "populateForm": "editChoreForm"
          }
        },
        {
          "component": "button",
          "label": "Add a Chore",
          "onClick": [
            {
              "action": "navigate",
              "target": "addChorePage"
            }
          ],
          "styleHint": {
            "emphasis": "primary",
            "icon": "add_circle"
          }
        }
      ]
    },
    "addChorePage": {
      "component": "page",
      "title": "Add a Chore",
      "content": [
        {
          "component": "text",
          "content": "Fill in the details for your new chore.",
          "styleHint": {
            "variant": "body"
          }
        },
        {
          "component": "form",
          "id": "choreForm",
          "fields": [
            {
              "name": "choreName",
              "label": "Chore Name",
              "type": "text",
              "required": true,
              "placeholder": "e.g. Vacuum the floor"
            },
            {
              "name": "room",
              "label": "Room",
              "type": "select",
              "required": true,
              "optionsFrom": {
                "dataSource": "roomReader",
                "valueField": "roomName"
              }
            },
            {
              "name": "assignedTo",
              "label": "Assigned To",
              "type": "select",
              "required": true,
              "optionsFrom": {
                "dataSource": "familyReader",
                "valueField": "memberName"
              }
            },
            {
              "name": "frequency",
              "label": "Frequency",
              "type": "select",
              "required": true,
              "options": [
                "Daily",
                "Weekly",
                "Bi-Weekly",
                "Monthly",
                "As Needed"
              ]
            },
            {
              "name": "dueDate",
              "label": "Due Date",
              "type": "date",
              "required": true,
              "default": "+7d"
            },
            {
              "name": "status",
              "label": "Status",
              "type": "select",
              "default": "To Do",
              "options": [
                "To Do",
                "In Progress",
                "Done"
              ]
            },
            {
              "name": "notes",
              "label": "Notes",
              "type": "multiline",
              "placeholder": "Any extra details..."
            }
          ]
        },
        {
          "component": "button",
          "label": "Add Chore",
          "onClick": [
            {
              "action": "submit",
              "dataSource": "choreStore",
              "target": "choreForm"
            },
            {
              "action": "showMessage",
              "message": "Chore added!"
            },
            {
              "action": "navigate",
              "target": "myChoresPage"
            }
          ],
          "styleHint": {
            "emphasis": "primary",
            "icon": "add_circle"
          }
        }
      ]
    },
    "editChorePage": {
      "component": "page",
      "title": "Edit Chore",
      "content": [
        {
          "component": "form",
          "id": "editChoreForm",
          "fields": [
            {
              "name": "choreName",
              "label": "Chore Name",
              "type": "text",
              "required": true
            },
            {
              "name": "room",
              "label": "Room",
              "type": "select",
              "required": true,
              "optionsFrom": {
                "dataSource": "roomReader",
                "valueField": "roomName"
              }
            },
            {
              "name": "assignedTo",
              "label": "Assigned To",
              "type": "select",
              "required": true,
              "optionsFrom": {
                "dataSource": "familyReader",
                "valueField": "memberName"
              }
            },
            {
              "name": "frequency",
              "label": "Frequency",
              "type": "select",
              "required": true,
              "options": [
                "Daily",
                "Weekly",
                "Bi-Weekly",
                "Monthly",
                "As Needed"
              ]
            },
            {
              "name": "dueDate",
              "label": "Due Date",
              "type": "date"
            },
            {
              "name": "status",
              "label": "Status",
              "type": "select",
              "options": [
                "To Do",
                "In Progress",
                "Done"
              ]
            },
            {
              "name": "notes",
              "label": "Notes",
              "type": "multiline"
            }
          ]
        },
        {
          "component": "button",
          "label": "Save Changes",
          "onClick": [
            {
              "action": "update",
              "dataSource": "choreUpdater",
              "target": "editChoreForm",
              "matchField": "_id"
            },
            {
              "action": "showMessage",
              "message": "Chore updated!"
            },
            {
              "action": "navigate",
              "target": "myChoresPage"
            }
          ],
          "styleHint": {
            "emphasis": "primary",
            "icon": "save"
          }
        },
        {
          "component": "button",
          "label": "Back",
          "onClick": [
            {
              "action": "navigate",
              "target": "myChoresPage"
            }
          ],
          "styleHint": {
            "emphasis": "secondary",
            "icon": "arrow_back",
            "variant": "outlined"
          }
        }
      ]
    },
    "manageRoomsPage": {
      "component": "page",
      "title": "Manage Rooms",
      "content": [
        {
          "component": "text",
          "content": "Add rooms in your home so you can reference them when creating chores.",
          "styleHint": {
            "variant": "body"
          }
        },
        {
          "component": "form",
          "id": "roomForm",
          "fields": [
            {
              "name": "roomName",
              "label": "Room Name",
              "type": "text",
              "required": true,
              "placeholder": "e.g. Kitchen"
            }
          ]
        },
        {
          "component": "button",
          "label": "Add Room",
          "onClick": [
            {
              "action": "submit",
              "dataSource": "roomStore",
              "target": "roomForm"
            },
            {
              "action": "showMessage",
              "message": "Room added!"
            }
          ],
          "styleHint": {
            "emphasis": "primary",
            "icon": "add_circle"
          }
        },
        {
          "component": "text",
          "content": "{COUNT(roomReader)} rooms",
          "styleHint": {
            "variant": "subheading"
          }
        },
        {
          "component": "text",
          "content": "No rooms added yet. Add your first room above.",
          "styleHint": {
            "variant": "body",
            "align": "center",
            "color": "grey"
          },
          "visibleWhen": {
            "source": "roomReader",
            "countEquals": 0
          }
        },
        {
          "component": "list",
          "dataSource": "roomReader",
          "searchable": true,
          "columns": [
            {
              "header": "Room",
              "field": "roomName"
            }
          ],
          "rowActions": [
            {
              "label": "Delete",
              "action": "delete",
              "dataSource": "roomDeleter",
              "matchField": "_id",
              "showMessage": "Room deleted!"
            }
          ]
        }
      ]
    },
    "manageFamilyPage": {
      "component": "page",
      "title": "Manage Family",
      "content": [
        {
          "component": "text",
          "content": "Add family members so you can assign chores to them.",
          "styleHint": {
            "variant": "body"
          }
        },
        {
          "component": "form",
          "id": "familyForm",
          "fields": [
            {
              "name": "memberName",
              "label": "Name",
              "type": "text",
              "required": true,
              "placeholder": "e.g. Mom"
            }
          ]
        },
        {
          "component": "button",
          "label": "Add Family Member",
          "onClick": [
            {
              "action": "submit",
              "dataSource": "familyStore",
              "target": "familyForm"
            },
            {
              "action": "showMessage",
              "message": "Family member added!"
            }
          ],
          "styleHint": {
            "emphasis": "primary",
            "icon": "add_circle"
          }
        },
        {
          "component": "text",
          "content": "{COUNT(familyReader)} family members",
          "styleHint": {
            "variant": "subheading"
          }
        },
        {
          "component": "text",
          "content": "No family members yet. Add someone above.",
          "styleHint": {
            "variant": "body",
            "align": "center",
            "color": "grey"
          },
          "visibleWhen": {
            "source": "familyReader",
            "countEquals": 0
          }
        },
        {
          "component": "list",
          "dataSource": "familyReader",
          "searchable": true,
          "columns": [
            {
              "header": "Name",
              "field": "memberName"
            }
          ],
          "rowActions": [
            {
              "label": "Delete",
              "action": "delete",
              "dataSource": "familyDeleter",
              "matchField": "_id",
              "showMessage": "Family member deleted!"
            }
          ]
        }
      ]
    }
  },
  "dataSources": {
    "choreStore": {
      "url": "local://chores",
      "method": "POST"
    },
    "choreReader": {
      "url": "local://chores",
      "method": "GET",
      "fields": [
        {
          "name": "choreName",
          "type": "text"
        },
        {
          "name": "room",
          "type": "select"
        },
        {
          "name": "assignedTo",
          "type": "select"
        },
        {
          "name": "frequency",
          "type": "select"
        },
        {
          "name": "dueDate",
          "type": "date"
        },
        {
          "name": "status",
          "type": "select"
        },
        {
          "name": "notes",
          "type": "multiline"
        }
      ],
      "seedData": [
        {
          "choreName": "Wash dishes",
          "room": "Kitchen",
          "assignedTo": "Alex",
          "frequency": "Daily",
          "dueDate": "2026-03-13",
          "status": "To Do"
        },
        {
          "choreName": "Vacuum floors",
          "room": "Living Room",
          "assignedTo": "Sam",
          "frequency": "Weekly",
          "dueDate": "2026-03-15",
          "status": "To Do"
        },
        {
          "choreName": "Clean toilet",
          "room": "Bathroom",
          "assignedTo": "Dad",
          "frequency": "Weekly",
          "dueDate": "2026-03-14",
          "status": "To Do"
        },
        {
          "choreName": "Take out trash",
          "room": "Kitchen",
          "assignedTo": "Mom",
          "frequency": "Daily",
          "dueDate": "2026-03-13",
          "status": "Done"
        }
      ]
    },
    "choreUpdater": {
      "url": "local://chores",
      "method": "PUT"
    },
    "choreDeleter": {
      "url": "local://chores",
      "method": "DELETE"
    },
    "roomStore": {
      "url": "local://rooms",
      "method": "POST"
    },
    "roomReader": {
      "url": "local://rooms",
      "method": "GET",
      "fields": [
        {
          "name": "roomName",
          "type": "text"
        }
      ],
      "seedData": [
        {
          "roomName": "Kitchen"
        },
        {
          "roomName": "Living Room"
        },
        {
          "roomName": "Bathroom"
        },
        {
          "roomName": "Bedroom"
        },
        {
          "roomName": "Garage"
        }
      ]
    },
    "roomDeleter": {
      "url": "local://rooms",
      "method": "DELETE"
    },
    "familyStore": {
      "url": "local://familyMembers",
      "method": "POST"
    },
    "familyReader": {
      "url": "local://familyMembers",
      "method": "GET",
      "fields": [
        {
          "name": "memberName",
          "type": "text"
        }
      ],
      "seedData": [
        {
          "memberName": "Mom"
        },
        {
          "memberName": "Dad"
        },
        {
          "memberName": "Alex"
        },
        {
          "memberName": "Sam"
        }
      ]
    },
    "familyDeleter": {
      "url": "local://familyMembers",
      "method": "DELETE"
    }
  },
  "help": {
    "overview": "Track household chores, assign them to family members, and mark them done. Manage your rooms and family members to keep everything organized. Tap any chore to edit its details.",
    "pages": {
      "myChoresPage": "View all your chores here. Tap Mark Done to complete a chore, or tap any row to edit it. Filter by room, person, or status. Color-coded: green = Done, blue = In Progress, orange = To Do.",
      "addChorePage": "Fill in the chore details and tap Add Chore to save it. Due date defaults to 7 days from now. Room and Assigned To are populated from your Manage pages.",
      "editChorePage": "Edit any field on the chore and press Save Changes.",
      "manageRoomsPage": "Add and manage the rooms in your home. Use these names when adding chores.",
      "manageFamilyPage": "Add and manage family members. Use these names when assigning chores."
    }
  },
  "settings": {
    "defaultFrequency": {
      "label": "Default frequency for new chores",
      "type": "select",
      "options": [
        "Daily",
        "Weekly",
        "Bi-Weekly",
        "Monthly",
        "As Needed"
      ],
      "default": "Weekly"
    }
  },
  "tour": [
    {
      "title": "Welcome to My Chores!",
      "content": "This app helps you track household chores and assign them to family members."
    },
    {
      "title": "Your Chore List",
      "content": "All chores show here with color-coded status. Tap any row to edit it. Mark Done hides once the chore is complete. Filter by room, person, or status.",
      "page": "myChoresPage"
    },
    {
      "title": "Add Chores",
      "content": "Create new chores with a room, person, frequency, and due date. The due date defaults to 7 days from now.",
      "page": "addChorePage"
    },
    {
      "title": "Manage Rooms & Family",
      "content": "Set up your rooms and family members so you can reference them when creating chores.",
      "page": "manageRoomsPage"
    }
  ]
}