{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "Expense": { "type": "object", "properties": { "description": { "type": "string", "maxLength": 120 }, "amount": { "type": "number" }, "paidBy": { "type": "string" }, "splitBetween": { "type": "array", "items": { "type": "string" } }, "category": { "type": "string", "enum": ["groceries", "rent", "utilities", "baby", "dining", "other"] }, "date": { "type": "string" } }, "required": ["description", "amount", "paidBy", "splitBetween", "category", "date"] }, "Settlement": { "type": "object", "properties": { "from": { "type": "string" }, "to": { "type": "string" }, "amount": { "type": "number" }, "note": { "type": "string" }, "settledOn": { "type": "string" } }, "required": ["from", "to", "amount", "settledOn"] } }, "x-homespun-manifest": { "app": { "name": "Household Ledger", "description": "A shared expense log that always knows who owes whom.", "icon": "\ud83e\uddfe" }, "collections": { "expenses": { "schema": { "$ref": "#/$defs/Expense" }, "write": ["agent", "owner", "member"], "delete": ["agent", "owner", "member"], "appendOnly": false }, "settlements": { "schema": { "$ref": "#/$defs/Settlement" }, "write": ["agent", "owner", "member"], "delete": ["owner"], "appendOnly": true } } } }