{
  "id": "task",
  "slug": "task",
  "title": "Project & Task Manager Backend",
  "description": "Kanban-style project management: projects, tasks, subtasks, labels, comments, attachments, and milestones. Preview then clone into Apito Console.",
  "version": "1.0.0",
  "checksum": "sha256:task-v1-2026-07-24",
  "status": "verified",
  "edition": "both",
  "project_type": "general",
  "database_intent": "sqlite",
  "source": "console projectTemplates task + schema-generation/sample/todo.json patterns",
  "reviewed_at": "2026-07-24",
  "architecture_notes": "Project owns tasks and milestones. Tasks have subtasks, labels, comments, and attachments. Assignees are app users.",
  "models": [
    {
      "name": "project",
      "label": "Project",
      "scope": "general",
      "fields": [
        { "identifier": "name", "label": "Name", "field_type": "text", "required": true },
        { "identifier": "description", "label": "Description", "field_type": "multiline" },
        { "identifier": "status", "label": "Status", "field_type": "list", "options": ["active", "on_hold", "done"], "required": true }
      ]
    },
    {
      "name": "task",
      "label": "Task",
      "scope": "general",
      "fields": [
        { "identifier": "title", "label": "Title", "field_type": "text", "required": true },
        { "identifier": "description", "label": "Description", "field_type": "multiline" },
        { "identifier": "status", "label": "Status", "field_type": "list", "options": ["todo", "in_progress", "done"], "required": true },
        { "identifier": "priority", "label": "Priority", "field_type": "list", "options": ["low", "medium", "high"] },
        { "identifier": "due_date", "label": "Due Date", "field_type": "date" }
      ]
    },
    {
      "name": "subtask",
      "label": "Subtask",
      "scope": "general",
      "fields": [
        { "identifier": "title", "label": "Title", "field_type": "text", "required": true },
        { "identifier": "done", "label": "Done", "field_type": "boolean", "input_type": "bool" }
      ]
    },
    {
      "name": "label",
      "label": "Label",
      "scope": "general",
      "fields": [
        { "identifier": "name", "label": "Name", "field_type": "text", "required": true },
        { "identifier": "color", "label": "Color", "field_type": "text" }
      ]
    },
    {
      "name": "comment",
      "label": "Comment",
      "scope": "general",
      "fields": [
        { "identifier": "body", "label": "Body", "field_type": "multiline", "required": true }
      ]
    },
    {
      "name": "attachment",
      "label": "Attachment",
      "scope": "general",
      "fields": [
        { "identifier": "file", "label": "File", "field_type": "media", "required": true },
        { "identifier": "filename", "label": "Filename", "field_type": "text" }
      ]
    },
    {
      "name": "milestone",
      "label": "Milestone",
      "scope": "general",
      "fields": [
        { "identifier": "name", "label": "Name", "field_type": "text", "required": true },
        { "identifier": "due_date", "label": "Due Date", "field_type": "date" }
      ]
    }
  ],
  "relations": [
    { "from": "project", "to": "task", "forward": "has_many", "reverse": "has_one" },
    { "from": "project", "to": "milestone", "forward": "has_many", "reverse": "has_one" },
    { "from": "task", "to": "subtask", "forward": "has_many", "reverse": "has_one" },
    { "from": "task", "to": "label", "forward": "has_many", "reverse": "has_many" },
    { "from": "task", "to": "comment", "forward": "has_many", "reverse": "has_one" },
    { "from": "task", "to": "attachment", "forward": "has_many", "reverse": "has_one" },
    { "from": "project", "to": "comment", "forward": "has_many", "reverse": "has_one" }
  ],
  "roles": [
    { "name": "admin", "is_admin": true, "permissions": ["project:*", "task:*", "subtask:*", "label:*", "comment:*", "attachment:*", "milestone:*"] },
    { "name": "member", "permissions": ["project:read", "task:*", "subtask:*", "label:read", "comment:*", "attachment:*", "milestone:read"] },
    { "name": "viewer", "permissions": ["project:read", "task:read", "subtask:read", "label:read", "comment:read", "milestone:read"] }
  ],
  "graphql_operations": [
    { "name": "projectList", "type": "query", "model": "project", "example": "query { projectList { id data { name status } } }" },
    { "name": "taskList", "type": "query", "model": "task", "example": "query { taskList(where: { status: { eq: \"todo\" } }) { id data { title priority } } }" },
    { "name": "createTask", "type": "mutation", "model": "task", "example": "mutation($payload: JSON!, $connect: JSON) { createTask(payload: $payload, connect: $connect) { id } }" }
  ],
  "rest_endpoints": [
    { "method": "GET", "path": "/secured/rest/project", "description": "List projects" },
    { "method": "GET", "path": "/secured/rest/task", "description": "List tasks" },
    { "method": "POST", "path": "/secured/rest/task", "description": "Create task" }
  ],
  "sdk_examples": [
    {
      "language": "javascript",
      "title": "List open tasks",
      "code": "const tasks = await client.query(`query { taskList(where: { status: { eq: \"todo\" } }) { id data { title priority } } }`);"
    },
    {
      "language": "flutter",
      "title": "List projects",
      "code": "final projects = await client.query('''query { projectList { id data { name status } } }''');"
    },
    {
      "language": "go",
      "title": "Create task",
      "code": "id, err := client.Create(\"task\", map[string]any{\"title\": \"Ship clone\", \"status\": \"todo\"})"
    }
  ],
  "limitations": ["Static verified preview only.", "Clone stages a Console draft; publish is human-gated."],
  "clone_requirements": ["Apito Console account", "Project create permission"],
  "smoke_tests": ["taskList filters by status", "createTask connects to project"],
  "experience": {
    "experience_type": "playground",
    "preview_modules": ["overview", "schema", "erd", "graphql", "rest", "permissions", "sdk", "download"],
    "cta_label": "Clone this backend",
    "handoff_policy": "signed_preview"
  }
}
