Cotton code
1436 lines · 37.8 KB · JSONRaw
[  {    "id": "family",    "name": "Family",    "description": null,    "picture": null,    "position": 0,    "tools": [      "todos",      "calendar",      "people",      "photos",      "notebook"    ]  },  {    "id": "partner",    "name": "Me & partner",    "description": null,    "picture": null,    "position": 1,    "tools": [      "todos",      "calendar",      "notebook"    ]  },  {    "id": "friends",    "name": "Friends",    "description": null,    "picture": null,    "position": 2,    "tools": [      "calendar",      "people",      "photos",      "notebook"    ]  },  {    "id": "tech-team",    "name": "Tech team",    "description": null,    "picture": null,    "position": 3,    "tools": [      "todos",      "calendar",      "notebook"    ]  },  {    "id": "yoga-studio",    "name": "Yoga studio",    "description": null,    "picture": null,    "position": 4,    "tools": [      "todos",      "calendar",      "people",      {        "package": "yoga"      },      {        "package": "yoga_studio"      },      {        "package": "yoga_classes"      },      {        "package": "yoga_trainers"      },      {        "package": "yoga_membership"      },      {        "package": "yoga_checkins"      },      {        "package": "yoga_sales"      },      {        "package": "yoga_clients"      },      {        "package": "yoga_memberships"      },      {        "package": "yoga_expenses"      }    ]  },  {    "id": "yoga-trainer",    "name": "Yoga trainer",    "description": null,    "picture": null,    "position": 5,    "tools": [      "todos",      "calendar",      {        "package": {          "tool": {            "views": [              {                "id": "training_sessions",                "label": "Sessions",                "is_default": true,                "visibility": "owner",                "read": {                  "table": "training_sessions"                }              }            ],            "id": "training_sessions",            "name": "Sessions",            "picture": "tool-calendar",            "card_stock": "sage",            "tables": [              "training_sessions"            ],            "instructions": "",            "automations": [],            "author": {              "device": "cotton",              "name": "Cotton"            },            "signature": null,            "purpose": "Training sessions and the work planned for each."          },          "tables": [            {              "id": "training_sessions",              "name": "Session",              "plural": "Sessions",              "picture": null,              "builtin": false,              "engine": null,              "columns": [                {                  "key": "title",                  "type": "text",                  "required": true                },                {                  "key": "student",                  "name": "Student",                  "type": "link",                  "link_to": "students"                },                {                  "key": "starts_at",                  "name": "Starts",                  "type": "date"                },                {                  "key": "duration",                  "name": "Minutes",                  "type": "number"                },                {                  "key": "notes",                  "name": "Notes",                  "type": "longtext"                }              ],              "title": "title",              "date": "starts_at",              "project": null,              "order": null,              "slip": {                "title": "title",                "subtitle": "notes",                "trailing": "starts_at",                "photo": null              },              "tile": {                "face": "slip-list"              },              "page": [                {                  "heading": null,                  "columns": [                    "title",                    "student",                    "starts_at",                    "duration",                    "notes"                  ]                }              ]            }          ]        }      },      {        "package": {          "tool": {            "views": [              {                "id": "students",                "label": "Students",                "is_default": true,                "visibility": "owner",                "read": {                  "table": "students"                }              }            ],            "id": "students",            "name": "Students",            "picture": "tool-people",            "card_stock": "rose",            "tables": [              "students"            ],            "instructions": "",            "automations": [],            "author": {              "device": "cotton",              "name": "Cotton"            },            "signature": null,            "purpose": "Students and how to reach them."          },          "tables": [            {              "id": "students",              "name": "Student",              "plural": "Students",              "picture": null,              "builtin": false,              "engine": null,              "columns": [                {                  "key": "title",                  "type": "text",                  "required": true                },                {                  "key": "email",                  "name": "Email",                  "type": "text"                },                {                  "key": "phone",                  "name": "Phone",                  "type": "text"                },                {                  "key": "notes",                  "name": "Notes",                  "type": "longtext"                }              ],              "title": "title",              "date": null,              "project": null,              "order": null,              "slip": {                "title": "title",                "subtitle": "notes",                "trailing": null,                "photo": null              },              "tile": {                "face": "slip-list"              },              "page": [                {                  "heading": null,                  "columns": [                    "title",                    "email",                    "phone",                    "notes"                  ]                }              ]            }          ]        }      },      {        "package": {          "tool": {            "views": [              {                "id": "progress",                "label": "Progress",                "is_default": true,                "visibility": "owner",                "read": {                  "table": "progress"                }              }            ],            "id": "progress",            "name": "Progress",            "picture": "tool-goals",            "card_stock": "sage",            "tables": [              "progress"            ],            "instructions": "",            "automations": [],            "author": {              "device": "cotton",              "name": "Cotton"            },            "signature": null,            "purpose": "Students’ progress and their next steps."          },          "tables": [            {              "id": "progress",              "name": "Progress entry",              "plural": "Progress",              "picture": null,              "builtin": false,              "engine": null,              "columns": [                {                  "key": "title",                  "type": "text",                  "required": true                },                {                  "key": "student",                  "name": "Student",                  "type": "link",                  "link_to": "students"                },                {                  "key": "date",                  "name": "Date",                  "type": "date"                },                {                  "key": "notes",                  "name": "Notes",                  "type": "longtext"                }              ],              "title": "title",              "date": "date",              "project": null,              "order": null,              "slip": {                "title": "title",                "subtitle": "notes",                "trailing": "date",                "photo": null              },              "tile": {                "face": "slip-list"              },              "page": [                {                  "heading": null,                  "columns": [                    "title",                    "student",                    "date",                    "notes"                  ]                }              ]            }          ]        }      },      {        "package": {          "tool": {            "views": [              {                "id": "payments",                "label": "Payments",                "is_default": true,                "visibility": "owner",                "read": {                  "table": "payments"                }              }            ],            "id": "payments",            "name": "Payments",            "picture": "tool-money",            "card_stock": "tan",            "tables": [              "payments"            ],            "instructions": "",            "automations": [],            "author": {              "device": "cotton",              "name": "Cotton"            },            "signature": null,            "purpose": "Payments received and what they cover."          },          "tables": [            {              "id": "payments",              "name": "Payment",              "plural": "Payments",              "picture": null,              "builtin": false,              "engine": null,              "columns": [                {                  "key": "title",                  "type": "text",                  "required": true                },                {                  "key": "student",                  "name": "Student",                  "type": "link",                  "link_to": "students"                },                {                  "key": "amount",                  "name": "Amount",                  "type": "amount"                },                {                  "key": "date",                  "name": "Date",                  "type": "date"                },                {                  "key": "paid",                  "name": "Paid",                  "type": "bool"                },                {                  "key": "notes",                  "name": "Notes",                  "type": "longtext"                }              ],              "title": "title",              "date": "date",              "project": null,              "order": null,              "slip": {                "title": "title",                "subtitle": "notes",                "trailing": "date",                "photo": null              },              "tile": {                "face": "slip-list"              },              "page": [                {                  "heading": null,                  "columns": [                    "title",                    "student",                    "amount",                    "date",                    "paid",                    "notes"                  ]                }              ]            }          ]        }      }    ]  },  {    "id": "teaching",    "name": "Teaching",    "description": null,    "picture": null,    "position": 6,    "tools": [      "todos",      "calendar",      {        "package": {          "tool": {            "views": [              {                "id": "lessons",                "label": "Lessons",                "is_default": true,                "visibility": "owner",                "read": {                  "table": "lessons"                }              }            ],            "id": "lessons",            "name": "Lessons",            "picture": "tool-notes",            "card_stock": "cream",            "tables": [              "lessons"            ],            "instructions": "",            "automations": [],            "author": {              "device": "cotton",              "name": "Cotton"            },            "signature": null,            "purpose": "Lessons and the time planned for them."          },          "tables": [            {              "id": "lessons",              "name": "Lesson",              "plural": "Lessons",              "picture": null,              "builtin": false,              "engine": null,              "columns": [                {                  "key": "title",                  "type": "text",                  "required": true                },                {                  "key": "starts_at",                  "name": "Starts",                  "type": "date"                },                {                  "key": "subject",                  "name": "Subject",                  "type": "text"                },                {                  "key": "notes",                  "name": "Notes",                  "type": "longtext"                }              ],              "title": "title",              "date": "starts_at",              "project": null,              "order": null,              "slip": {                "title": "title",                "subtitle": "notes",                "trailing": "starts_at",                "photo": null              },              "tile": {                "face": "slip-list"              },              "page": [                {                  "heading": null,                  "columns": [                    "title",                    "starts_at",                    "subject",                    "notes"                  ]                }              ]            }          ]        }      },      {        "package": {          "tool": {            "views": [              {                "id": "students",                "label": "Students",                "is_default": true,                "visibility": "owner",                "read": {                  "table": "students"                }              }            ],            "id": "students",            "name": "Students",            "picture": "tool-people",            "card_stock": "rose",            "tables": [              "students"            ],            "instructions": "",            "automations": [],            "author": {              "device": "cotton",              "name": "Cotton"            },            "signature": null,            "purpose": "Students and how to reach them."          },          "tables": [            {              "id": "students",              "name": "Student",              "plural": "Students",              "picture": null,              "builtin": false,              "engine": null,              "columns": [                {                  "key": "title",                  "type": "text",                  "required": true                },                {                  "key": "email",                  "name": "Email",                  "type": "text"                },                {                  "key": "phone",                  "name": "Phone",                  "type": "text"                },                {                  "key": "notes",                  "name": "Notes",                  "type": "longtext"                }              ],              "title": "title",              "date": null,              "project": null,              "order": null,              "slip": {                "title": "title",                "subtitle": "notes",                "trailing": null,                "photo": null              },              "tile": {                "face": "slip-list"              },              "page": [                {                  "heading": null,                  "columns": [                    "title",                    "email",                    "phone",                    "notes"                  ]                }              ]            }          ]        }      },      {        "package": {          "tool": {            "views": [              {                "id": "assignments",                "label": "Assignments",                "is_default": true,                "visibility": "owner",                "read": {                  "table": "assignments"                }              }            ],            "id": "assignments",            "name": "Assignments",            "picture": "tool-documents",            "card_stock": "cream",            "tables": [              "assignments"            ],            "instructions": "",            "automations": [],            "author": {              "device": "cotton",              "name": "Cotton"            },            "signature": null,            "purpose": "Work assigned to students and when it is due."          },          "tables": [            {              "id": "assignments",              "name": "Assignment",              "plural": "Assignments",              "picture": null,              "builtin": false,              "engine": null,              "columns": [                {                  "key": "title",                  "type": "text",                  "required": true                },                {                  "key": "student",                  "name": "Student",                  "type": "link",                  "link_to": "students"                },                {                  "key": "due_at",                  "name": "Due",                  "type": "date"                },                {                  "key": "done",                  "name": "Done",                  "type": "bool"                },                {                  "key": "notes",                  "name": "Notes",                  "type": "longtext"                }              ],              "title": "title",              "date": "due_at",              "project": null,              "order": null,              "slip": {                "title": "title",                "subtitle": "notes",                "trailing": "due_at",                "photo": null              },              "tile": {                "face": "slip-list"              },              "page": [                {                  "heading": null,                  "columns": [                    "title",                    "student",                    "due_at",                    "done",                    "notes"                  ]                }              ]            }          ]        }      },      {        "package": {          "tool": {            "views": [              {                "id": "attendance",                "label": "Attendance",                "is_default": true,                "visibility": "owner",                "read": {                  "table": "attendance"                }              }            ],            "id": "attendance",            "name": "Attendance",            "picture": "tool-todos",            "card_stock": "sage",            "tables": [              "attendance"            ],            "instructions": "",            "automations": [],            "author": {              "device": "cotton",              "name": "Cotton"            },            "signature": null,            "purpose": "Who attended each class or lesson."          },          "tables": [            {              "id": "attendance",              "name": "Attendance",              "plural": "Attendance",              "picture": null,              "builtin": false,              "engine": null,              "columns": [                {                  "key": "title",                  "type": "text",                  "required": true                },                {                  "key": "student",                  "name": "Student",                  "type": "link",                  "link_to": "students"                },                {                  "key": "class",                  "name": "Class",                  "type": "text"                },                {                  "key": "date",                  "name": "Date",                  "type": "date"                },                {                  "key": "present",                  "name": "Present",                  "type": "bool"                },                {                  "key": "notes",                  "name": "Notes",                  "type": "longtext"                }              ],              "title": "title",              "date": "date",              "project": null,              "order": null,              "slip": {                "title": "title",                "subtitle": "notes",                "trailing": "date",                "photo": null              },              "tile": {                "face": "slip-list"              },              "page": [                {                  "heading": null,                  "columns": [                    "title",                    "student",                    "class",                    "date",                    "present",                    "notes"                  ]                }              ]            }          ]        }      }    ]  },  {    "id": "home-kitchen",    "name": "Home kitchen",    "description": null,    "picture": null,    "position": 7,    "tools": [      "todos",      "calendar",      "messages",      "people",      "photos",      "notebook",      {        "package": "kitchen"      },      {        "package": "kitchen_orders"      },      {        "package": "kitchen_plans"      },      {        "package": "kitchen_customers"      },      {        "package": "kitchen_money"      },      {        "package": "kitchen_cook"      },      {        "package": "kitchen_about"      }    ]  },  {    "id": "screenwriting",    "name": "Screenwriting",    "description": null,    "picture": null,    "position": 8,    "tools": [      "todos",      "calendar",      "messages",      "people",      "photos",      "notebook",      {        "package": {          "tool": {            "views": [              {                "id": "screenplay_scene",                "label": "Scenes",                "is_default": true,                "visibility": "owner",                "read": {                  "table": "screenplay_scene"                }              }            ],            "id": "scenes",            "name": "Scenes",            "picture": {              "photo": "photo:f1b6f1787aff6bfdf2d00ff5913ac22008e84556ba2812d13daf6360b6e6698d"            },            "card_stock": "tan",            "tables": [              "screenplay_scene"            ],            "instructions": "Scenes is every scene of the screenplays here, one card each: its slugline, its length in pages and what it is for. The scenes come from the script itself — write and move them in the screenplay.",            "automations": [],            "author": {              "device": "cotton",              "name": "Cotton"            },            "signature": null,            "purpose": "Scenes, their order and the story they tell."          },          "tables": []        }      },      {        "package": {          "tool": {            "views": [              {                "id": "screenplay_character",                "label": "Characters",                "is_default": true,                "visibility": "owner",                "read": {                  "table": "screenplay_character"                }              }            ],            "id": "characters",            "name": "Characters",            "picture": {              "photo": "photo:84596da2838bb9b16a381014ea70b202b104c18e9edd451b8b301f14bf91f89a"            },            "card_stock": "slate",            "tables": [              "screenplay_character"            ],            "instructions": "Characters is everyone who speaks or is named in the screenplays here, with their aliases and a short bio. The script names them; write the bio here.",            "automations": [],            "author": {              "device": "cotton",              "name": "Cotton"            },            "signature": null,            "purpose": "Your characters and where they appear."          },          "tables": []        }      },      {        "package": {          "tool": {            "views": [              {                "id": "beat",                "label": "Beats",                "is_default": true,                "visibility": "owner",                "read": {                  "table": "beat"                }              }            ],            "id": "beats",            "name": "Beats",            "picture": {              "photo": "photo:2b0cd0233b874f32731a5a9a7a738efa3454d7cc45d582281464df5d2589a4d0"            },            "card_stock": "cream",            "tables": [              "beat"            ],            "instructions": "Beats is the story as index cards, laid out by act and sequence, each pointing at the scene it became.",            "automations": [],            "author": {              "device": "cotton",              "name": "Cotton"            },            "signature": null,            "purpose": "Story beats arranged by act and sequence."          },          "tables": [            {              "id": "beat",              "name": "Beat",              "plural": "Beats",              "picture": null,              "builtin": false,              "engine": null,              "columns": [                {                  "key": "name",                  "name": "Beat",                  "type": "text",                  "required": true,                  "placeholder": "She finds the letter in the coat"                },                {                  "key": "screenplay",                  "name": "Screenplay",                  "type": "link",                  "link_to": "screenplay"                },                {                  "key": "act",                  "name": "Act",                  "type": "choice",                  "choices": [                    "one",                    "two",                    "three"                  ],                  "format": "words"                },                {                  "key": "sequence",                  "name": "Sequence",                  "type": "number"                },                {                  "key": "summary",                  "name": "What happens",                  "type": "longtext",                  "markdown": true                },                {                  "key": "scene",                  "name": "Became",                  "type": "link",                  "link_to": "screenplay_scene"                },                {                  "key": "status",                  "name": "Status",                  "type": "choice",                  "choices": [                    "idea",                    "placed",                    "written",                    "cut"                  ],                  "format": "words",                  "tones": {                    "idea": "amber",                    "placed": "amber",                    "written": "green",                    "cut": "red"                  }                }              ],              "title": "name",              "date": null,              "project": null,              "order": null,              "slip": {                "title": "name",                "subtitle": [                  "sequence",                  "status"                ],                "trailing": "scene",                "photo": null,                "toggle": null              },              "tile": {                "face": "slip-list"              },              "page": [                {                  "heading": null,                  "columns": [                    "name",                    "screenplay",                    "status"                  ],                  "actions": [                    {                      "label": "Placed",                      "sets": {                        "status": "placed"                      }                    },                    {                      "label": "Written",                      "sets": {                        "status": "written"                      }                    },                    {                      "label": "Cut",                      "sets": {                        "status": "cut"                      }                    }                  ]                },                {                  "heading": "Where",                  "columns": [                    "act",                    "sequence",                    "scene"                  ]                },                {                  "heading": "What happens",                  "columns": [                    "summary"                  ]                }              ],              "sort": {                "column": "sequence",                "descending": false,                "tie": "name"              },              "group": {                "column": "act",                "sections": [                  {                    "heading": null,                    "values": []                  },                  {                    "heading": "Act one",                    "values": [                      "one"                    ]                  },                  {                    "heading": "Act two",                    "values": [                      "two"                    ]                  },                  {                    "heading": "Act three",                    "values": [                      "three"                    ]                  }                ]              },              "empty": {                "title": "No beats yet",                "message": "One index card per beat, laid out by act; point each at the scene it became."              },              "create": {                "label": "Add a beat"              },              "instructions": "One row per beat — an index card of the story, before or beside the script. act is one, two or three; sequence orders the beats inside the story; scene is the scene the beat became, once it is written; status runs idea → placed → written, or cut."            }          ]        }      },      {        "package": {          "tool": {            "views": [              {                "id": "reader_note",                "label": "Readers' notes",                "is_default": true,                "visibility": "owner",                "read": {                  "table": "reader_note"                }              }            ],            "id": "readers_notes",            "name": "Readers' notes",            "picture": {              "photo": "photo:8ff05235ab3e3531144d27792f291cbfd3a1f939f250a45aa0ae086fe6c85603"            },            "card_stock": "rose",            "tables": [              "reader_note"            ],            "instructions": "Readers' notes is the feedback each draft got: who said it, what they said, and what was done about it.",            "automations": [],            "author": {              "device": "cotton",              "name": "Cotton"            },            "signature": null,            "purpose": "Feedback on drafts and the changes it suggests."          },          "tables": [            {              "id": "reader_note",              "name": "Reader's note",              "plural": "Readers' notes",              "picture": null,              "builtin": false,              "engine": null,              "columns": [                {                  "key": "name",                  "name": "Note",                  "type": "text",                  "required": true,                  "placeholder": "The second act sags after the wedding"                },                {                  "key": "screenplay",                  "name": "Screenplay",                  "type": "link",                  "link_to": "screenplay"                },                {                  "key": "draft",                  "name": "Draft",                  "type": "link",                  "link_to": "screenplay_draft"                },                {                  "key": "reader",                  "name": "By",                  "type": "link",                  "link_to": "person"                },                {                  "key": "given_on",                  "name": "Given on",                  "type": "date"                },                {                  "key": "detail",                  "name": "What they said",                  "type": "longtext",                  "markdown": true                },                {                  "key": "status",                  "name": "Status",                  "type": "choice",                  "choices": [                    "open",                    "taking",                    "declined",                    "done"                  ],                  "format": "words",                  "tones": {                    "open": "amber",                    "taking": "amber",                    "declined": "red",                    "done": "green"                  }                },                {                  "key": "response",                  "name": "What was done",                  "type": "longtext",                  "markdown": true                }              ],              "title": "name",              "date": "given_on",              "project": null,              "order": null,              "slip": {                "title": "name",                "subtitle": [                  "reader",                  "draft"                ],                "trailing": "status",                "photo": null,                "toggle": null              },              "tile": {                "face": "slip-list"              },              "page": [                {                  "heading": null,                  "columns": [                    "name",                    "reader",                    "status"                  ],                  "actions": [                    {                      "label": "Taking it",                      "sets": {                        "status": "taking"                      }                    },                    {                      "label": "Done",                      "sets": {                        "status": "done"                      }                    },                    {                      "label": "Declined",                      "sets": {                        "status": "declined"                      }                    }                  ]                },                {                  "heading": "On",                  "columns": [                    "screenplay",                    "draft",                    "given_on"                  ]                },                {                  "heading": "What they said",                  "columns": [                    "detail"                  ]                },                {                  "heading": "What was done",                  "columns": [                    "response"                  ]                }              ],              "sort": {                "column": "given_on",                "descending": true,                "tie": "name"              },              "group": {                "column": "status",                "sections": [                  {                    "heading": null,                    "values": [                      "open",                      "taking"                    ]                  },                  {                    "heading": "Done",                    "values": [                      "done"                    ],                    "closed": true                  },                  {                    "heading": "Declined",                    "values": [                      "declined"                    ],                    "closed": true                  }                ]              },              "empty": {                "title": "No notes yet",                "message": "Feedback on a draft lands here, one note at a time, with what was done about it."              },              "create": {                "label": "Add a note"              },              "instructions": "One row per piece of feedback on a draft: who gave it (reader, a person), which draft, what they said, and what was done about it (status open → taking → done, or declined)."            }          ]        }      }    ]  },  {    "id": "library",    "name": "Library",    "description": "Books you are reading, films to watch and the music you keep.",    "picture": null,    "position": 9,    "tools": [      "todos",      "people",      "notebook",      "books",      "cinemas",      "music"    ]  },  {    "id": "blank",    "name": "Blank",    "description": null,    "picture": null,    "position": 10,    "tools": []  },  {    "id": "cotton-product",    "name": "Cotton product",    "description": "What people report from every Cotton app.",    "picture": null,    "position": 11,    "tools": [      {        "package": "app_reports"      }    ]  }]