إنتقل إلى المحتوى الرئيسي

std-project-manager

Level: Organism | Entity: Task | Persistence: persistent

2 states, 10 events, 7 transitions

Live Preview

;; app ProjectManagerApp

orbital TaskOrbital {
entity Task [persistent: tasks] {
id : string!
title : string!
description : string
assignee : string
priority : string
status : string
storyPoints : number
dueDate : datetime
}
trait TaskBrowse -> Task [interaction] {
initial: browsing
state browsing {
INIT -> browsing
(fetch Task)
(render-ui main { type: "dashboard-layout", appName: "ProjectManagerApp", navItems: [{ label: "Tasks", href: "/tasks", icon: "check-square" }, { label: "Sprints", href: "/sprints", icon: "zap" }, { label: "Burndown", href: "/burndown", icon: "layout-list" }], children: [{ type: "stack", direction: "vertical", gap: "lg", className: "max-w-5xl mx-auto w-full", children: [{ type: "stack", direction: "horizontal", gap: "md", justify: "space-between", align: "center", children: [{ type: "stack", direction: "horizontal", gap: "sm", align: "center", children: [{ type: "icon", name: "check-square", size: "lg" }, { type: "typography", content: "Tasks", variant: "h2" }] }, { type: "stack", direction: "horizontal", gap: "sm", children: [{ type: "button", label: "Create Task", event: "CREATE", variant: "primary", icon: "plus" }] }] }, { type: "divider" }, { type: "simple-grid", columns: 1, children: [{ type: "stat-display", label: "Total Tasks", value: ["array/len", "@entity"], icon: "check-square" }] }, { type: "divider" }, { type: "data-grid", entity: "Task", emptyIcon: "inbox", emptyTitle: "No tasks yet", emptyDescription: "Create tasks to plan your sprint.", itemActions: [{ label: "View", event: "VIEW", variant: "ghost", size: "sm" }, { label: "Edit", event: "EDIT", variant: "ghost", size: "sm" }, { label: "Delete", event: "DELETE", variant: "danger", size: "sm" }], columns: [{ name: "title", variant: "h3", icon: "check-square" }, { name: "priority", variant: "badge" }, { name: "status", variant: "badge" }, { name: "assignee", variant: "body" }, { name: "storyPoints", label: "Points", variant: "body", format: "number" }, { name: "dueDate", label: "Due", variant: "caption", format: "date" }], cols: 2, gap: "md" }] }] })
TASK_CREATED -> browsing
(fetch Task)
TASK_UPDATED -> browsing
(fetch Task)
DELETE -> deleting
(fetch Task { id: "@payload.id" })
(render-ui modal { type: "stack", direction: "vertical", gap: "md", children: [{ type: "stack", direction: "horizontal", gap: "sm", children: [{ type: "icon", name: "trash-2", size: "md" }, { type: "typography", content: "Delete Task", variant: "h3" }] }, { type: "divider" }, { type: "typography", content: "Are you sure you want to delete this task?", variant: "body" }, { type: "stack", direction: "horizontal", gap: "sm", justify: "end", children: [{ type: "button", label: "Cancel", event: "CANCEL", variant: "ghost" }, { type: "button", label: "Delete", event: "CONFIRM_DELETE", variant: "danger", icon: "trash" }] }] })
}
state deleting {
CONFIRM_DELETE -> browsing
(persist delete Task @entity.id)
(render-ui modal null)
(fetch Task)
(render-ui main { type: "dashboard-layout", appName: "ProjectManagerApp", navItems: [{ label: "Tasks", href: "/tasks", icon: "check-square" }, { label: "Sprints", href: "/sprints", icon: "zap" }, { label: "Burndown", href: "/burndown", icon: "layout-list" }], children: [{ type: "stack", direction: "vertical", gap: "lg", className: "max-w-5xl mx-auto w-full", children: [{ type: "stack", direction: "horizontal", gap: "md", justify: "space-between", align: "center", children: [{ type: "stack", direction: "horizontal", gap: "sm", align: "center", children: [{ type: "icon", name: "check-square", size: "lg" }, { type: "typography", content: "Tasks", variant: "h2" }] }, { type: "stack", direction: "horizontal", gap: "sm", children: [{ type: "button", label: "Create Task", event: "CREATE", variant: "primary", icon: "plus" }] }] }, { type: "divider" }, { type: "simple-grid", columns: 1, children: [{ type: "stat-display", label: "Total Tasks", value: ["array/len", "@entity"], icon: "check-square" }] }, { type: "divider" }, { type: "data-grid", entity: "Task", emptyIcon: "inbox", emptyTitle: "No tasks yet", emptyDescription: "Create tasks to plan your sprint.", itemActions: [{ label: "View", event: "VIEW", variant: "ghost", size: "sm" }, { label: "Edit", event: "EDIT", variant: "ghost", size: "sm" }, { label: "Delete", event: "DELETE", variant: "danger", size: "sm" }], columns: [{ name: "title", variant: "h3", icon: "check-square" }, { name: "priority", variant: "badge" }, { name: "status", variant: "badge" }, { name: "assignee", variant: "body" }, { name: "storyPoints", label: "Points", variant: "body", format: "number" }, { name: "dueDate", label: "Due", variant: "caption", format: "date" }], cols: 2, gap: "md" }] }] })
(notify "Task deleted successfully")
CANCEL -> browsing
(render-ui modal null)
(fetch Task)
(render-ui main { type: "dashboard-layout", appName: "ProjectManagerApp", navItems: [{ label: "Tasks", href: "/tasks", icon: "check-square" }, { label: "Sprints", href: "/sprints", icon: "zap" }, { label: "Burndown", href: "/burndown", icon: "layout-list" }], children: [{ type: "stack", direction: "vertical", gap: "lg", className: "max-w-5xl mx-auto w-full", children: [{ type: "stack", direction: "horizontal", gap: "md", justify: "space-between", align: "center", children: [{ type: "stack", direction: "horizontal", gap: "sm", align: "center", children: [{ type: "icon", name: "check-square", size: "lg" }, { type: "typography", content: "Tasks", variant: "h2" }] }, { type: "stack", direction: "horizontal", gap: "sm", children: [{ type: "button", label: "Create Task", event: "CREATE", variant: "primary", icon: "plus" }] }] }, { type: "divider" }, { type: "simple-grid", columns: 1, children: [{ type: "stat-display", label: "Total Tasks", value: ["array/len", "@entity"], icon: "check-square" }] }, { type: "divider" }, { type: "data-grid", entity: "Task", emptyIcon: "inbox", emptyTitle: "No tasks yet", emptyDescription: "Create tasks to plan your sprint.", itemActions: [{ label: "View", event: "VIEW", variant: "ghost", size: "sm" }, { label: "Edit", event: "EDIT", variant: "ghost", size: "sm" }, { label: "Delete", event: "DELETE", variant: "danger", size: "sm" }], columns: [{ name: "title", variant: "h3", icon: "check-square" }, { name: "priority", variant: "badge" }, { name: "status", variant: "badge" }, { name: "assignee", variant: "body" }, { name: "storyPoints", label: "Points", variant: "body", format: "number" }, { name: "dueDate", label: "Due", variant: "caption", format: "date" }], cols: 2, gap: "md" }] }] })
CLOSE -> browsing
(render-ui modal null)
(fetch Task)
(render-ui main { type: "dashboard-layout", appName: "ProjectManagerApp", navItems: [{ label: "Tasks", href: "/tasks", icon: "check-square" }, { label: "Sprints", href: "/sprints", icon: "zap" }, { label: "Burndown", href: "/burndown", icon: "layout-list" }], children: [{ type: "stack", direction: "vertical", gap: "lg", className: "max-w-5xl mx-auto w-full", children: [{ type: "stack", direction: "horizontal", gap: "md", justify: "space-between", align: "center", children: [{ type: "stack", direction: "horizontal", gap: "sm", align: "center", children: [{ type: "icon", name: "check-square", size: "lg" }, { type: "typography", content: "Tasks", variant: "h2" }] }, { type: "stack", direction: "horizontal", gap: "sm", children: [{ type: "button", label: "Create Task", event: "CREATE", variant: "primary", icon: "plus" }] }] }, { type: "divider" }, { type: "simple-grid", columns: 1, children: [{ type: "stat-display", label: "Total Tasks", value: ["array/len", "@entity"], icon: "check-square" }] }, { type: "divider" }, { type: "data-grid", entity: "Task", emptyIcon: "inbox", emptyTitle: "No tasks yet", emptyDescription: "Create tasks to plan your sprint.", itemActions: [{ label: "View", event: "VIEW", variant: "ghost", size: "sm" }, { label: "Edit", event: "EDIT", variant: "ghost", size: "sm" }, { label: "Delete", event: "DELETE", variant: "danger", size: "sm" }], columns: [{ name: "title", variant: "h3", icon: "check-square" }, { name: "priority", variant: "badge" }, { name: "status", variant: "badge" }, { name: "assignee", variant: "body" }, { name: "storyPoints", label: "Points", variant: "body", format: "number" }, { name: "dueDate", label: "Due", variant: "caption", format: "date" }], cols: 2, gap: "md" }] }] })
}
listens {
* TASK_CREATED -> TASK_CREATED
* TASK_UPDATED -> TASK_UPDATED
* ASSIGN_TASK -> INIT
}
}
trait TaskCreate -> Task [interaction] {
initial: closed
state closed {
INIT -> closed
(fetch Task)
CREATE -> open
(fetch Task)
(render-ui modal { type: "stack", direction: "vertical", gap: "md", children: [{ type: "stack", direction: "horizontal", gap: "sm", children: [{ type: "icon", name: "plus-circle", size: "md" }, { type: "typography", content: "Create Task", variant: "h3" }] }, { type: "divider" }, { type: "form-section", entity: "Task", mode: "create", submitEvent: "SAVE", cancelEvent: "CLOSE", fields: ["title", "description", "assignee", "priority", "status", "storyPoints", "dueDate"] }] })
}
state open {
CLOSE -> closed
(render-ui modal null)
(notify Cancelled info)
SAVE -> closed
(persist create Task @payload.data)
(fetch Task)
(render-ui modal null)
(emit TASK_CREATED)
(notify "Task created successfully")
}
emits {
TASK_CREATED
}
}
trait TaskEdit -> Task [interaction] {
initial: closed
state closed {
INIT -> closed
(fetch Task)
EDIT -> open
(fetch Task { id: "@payload.id" })
(render-ui modal { type: "stack", direction: "vertical", gap: "md", children: [{ type: "stack", direction: "horizontal", gap: "sm", children: [{ type: "icon", name: "edit", size: "md" }, { type: "typography", content: "Edit Task", variant: "h3" }] }, { type: "divider" }, { type: "form-section", entity: "Task", mode: "edit", submitEvent: "SAVE", cancelEvent: "CLOSE", fields: ["title", "description", "assignee", "priority", "status", "storyPoints", "dueDate"], entityId: "@entity.id" }] })
}
state open {
CLOSE -> closed
(render-ui modal null)
(notify Cancelled info)
SAVE -> closed
(persist update Task @payload.data)
(fetch Task)
(render-ui modal null)
(emit TASK_UPDATED)
(notify "Task updated successfully")
}
emits {
TASK_UPDATED
}
}
trait TaskView -> Task [interaction] {
initial: closed
state closed {
INIT -> closed
(fetch Task)
VIEW -> open
(fetch Task { id: "@payload.id" })
(render-ui modal { type: "stack", direction: "vertical", gap: "md", children: [{ type: "stack", direction: "horizontal", gap: "sm", align: "center", children: [{ type: "icon", name: "eye", size: "md" }, { type: "typography", variant: "h3", content: "@entity.title" }] }, { type: "divider" }, { type: "stack", direction: "horizontal", gap: "md", children: [{ type: "typography", variant: "caption", content: "Title" }, { type: "typography", variant: "body", content: "@entity.title" }] }, { type: "stack", direction: "horizontal", gap: "md", children: [{ type: "typography", variant: "caption", content: "Description" }, { type: "typography", variant: "body", content: "@entity.description" }] }, { type: "stack", direction: "horizontal", gap: "md", children: [{ type: "typography", variant: "caption", content: "Assignee" }, { type: "typography", variant: "body", content: "@entity.assignee" }] }, { type: "stack", direction: "horizontal", gap: "md", children: [{ type: "typography", variant: "caption", content: "Priority" }, { type: "typography", variant: "body", content: "@entity.priority" }] }, { type: "stack", direction: "horizontal", gap: "md", children: [{ type: "typography", variant: "caption", content: "Status" }, { type: "typography", variant: "body", content: "@entity.status" }] }, { type: "stack", direction: "horizontal", gap: "md", children: [{ type: "typography", variant: "caption", content: "Story Points" }, { type: "typography", variant: "body", content: "@entity.storyPoints" }] }, { type: "stack", direction: "horizontal", gap: "md", children: [{ type: "typography", variant: "caption", content: "Due Date" }, { type: "typography", variant: "body", content: "@entity.dueDate" }] }, { type: "divider" }, { type: "stack", direction: "horizontal", gap: "sm", justify: "end", children: [{ type: "button", label: "Edit", event: "EDIT", variant: "primary", icon: "edit" }, { type: "button", label: "Close", event: "CLOSE", variant: "ghost" }] }] })
}
state open {
CLOSE -> closed
(render-ui modal null)
(notify Cancelled info)
}
}
page "/tasks" -> TaskBrowse, TaskCreate, TaskEdit, TaskView
}
orbital SprintOrbital {
entity Sprint [persistent: sprints] {
id : string!
name : string!
startDate : datetime!
endDate : datetime!
goal : string
status : string
taskCount : number
}
trait SprintBrowse -> Sprint [interaction] {
initial: browsing
state browsing {
INIT -> browsing
(fetch Sprint)
(render-ui main { type: "dashboard-layout", appName: "ProjectManagerApp", navItems: [{ label: "Tasks", href: "/tasks", icon: "check-square" }, { label: "Sprints", href: "/sprints", icon: "zap" }, { label: "Burndown", href: "/burndown", icon: "layout-list" }], children: [{ type: "stack", direction: "vertical", gap: "lg", className: "max-w-5xl mx-auto w-full", children: [{ type: "stack", direction: "horizontal", gap: "md", justify: "space-between", align: "center", children: [{ type: "stack", direction: "horizontal", gap: "sm", align: "center", children: [{ type: "icon", name: "zap", size: "lg" }, { type: "typography", content: "Sprints", variant: "h2" }] }, { type: "stack", direction: "horizontal", gap: "sm", children: [{ type: "button", label: "Create Sprint", event: "CREATE", variant: "primary", icon: "plus" }] }] }, { type: "divider" }, { type: "data-grid", entity: "Sprint", emptyIcon: "inbox", emptyTitle: "No sprints yet", emptyDescription: "Create a sprint to organize your work.", itemActions: [{ label: "View", event: "VIEW", variant: "ghost", size: "sm" }, { label: "Edit", event: "EDIT", variant: "ghost", size: "sm" }, { label: "Delete", event: "DELETE", variant: "danger", size: "sm" }], columns: [{ name: "name", variant: "h3", icon: "zap" }, { name: "status", variant: "badge" }, { name: "goal", variant: "body" }, { name: "startDate", label: "Start", variant: "caption", format: "date" }, { name: "endDate", label: "End", variant: "caption", format: "date" }, { name: "taskCount", label: "Tasks", variant: "body", format: "number" }], cols: 2, gap: "md" }] }] })
SPRINT_CREATED -> browsing
(fetch Sprint)
SPRINT_UPDATED -> browsing
(fetch Sprint)
DELETE -> deleting
(fetch Sprint { id: "@payload.id" })
(render-ui modal { type: "stack", direction: "vertical", gap: "md", children: [{ type: "stack", direction: "horizontal", gap: "sm", children: [{ type: "icon", name: "trash-2", size: "md" }, { type: "typography", content: "Delete Sprint", variant: "h3" }] }, { type: "divider" }, { type: "typography", content: "Are you sure you want to delete this sprint?", variant: "body" }, { type: "stack", direction: "horizontal", gap: "sm", justify: "end", children: [{ type: "button", label: "Cancel", event: "CANCEL", variant: "ghost" }, { type: "button", label: "Delete", event: "CONFIRM_DELETE", variant: "danger", icon: "trash" }] }] })
}
state deleting {
CONFIRM_DELETE -> browsing
(persist delete Sprint @entity.id)
(render-ui modal null)
(fetch Sprint)
(render-ui main { type: "dashboard-layout", appName: "ProjectManagerApp", navItems: [{ label: "Tasks", href: "/tasks", icon: "check-square" }, { label: "Sprints", href: "/sprints", icon: "zap" }, { label: "Burndown", href: "/burndown", icon: "layout-list" }], children: [{ type: "stack", direction: "vertical", gap: "lg", className: "max-w-5xl mx-auto w-full", children: [{ type: "stack", direction: "horizontal", gap: "md", justify: "space-between", align: "center", children: [{ type: "stack", direction: "horizontal", gap: "sm", align: "center", children: [{ type: "icon", name: "zap", size: "lg" }, { type: "typography", content: "Sprints", variant: "h2" }] }, { type: "stack", direction: "horizontal", gap: "sm", children: [{ type: "button", label: "Create Sprint", event: "CREATE", variant: "primary", icon: "plus" }] }] }, { type: "divider" }, { type: "data-grid", entity: "Sprint", emptyIcon: "inbox", emptyTitle: "No sprints yet", emptyDescription: "Create a sprint to organize your work.", itemActions: [{ label: "View", event: "VIEW", variant: "ghost", size: "sm" }, { label: "Edit", event: "EDIT", variant: "ghost", size: "sm" }, { label: "Delete", event: "DELETE", variant: "danger", size: "sm" }], columns: [{ name: "name", variant: "h3", icon: "zap" }, { name: "status", variant: "badge" }, { name: "goal", variant: "body" }, { name: "startDate", label: "Start", variant: "caption", format: "date" }, { name: "endDate", label: "End", variant: "caption", format: "date" }, { name: "taskCount", label: "Tasks", variant: "body", format: "number" }], cols: 2, gap: "md" }] }] })
(notify "Sprint deleted successfully")
CANCEL -> browsing
(render-ui modal null)
(fetch Sprint)
(render-ui main { type: "dashboard-layout", appName: "ProjectManagerApp", navItems: [{ label: "Tasks", href: "/tasks", icon: "check-square" }, { label: "Sprints", href: "/sprints", icon: "zap" }, { label: "Burndown", href: "/burndown", icon: "layout-list" }], children: [{ type: "stack", direction: "vertical", gap: "lg", className: "max-w-5xl mx-auto w-full", children: [{ type: "stack", direction: "horizontal", gap: "md", justify: "space-between", align: "center", children: [{ type: "stack", direction: "horizontal", gap: "sm", align: "center", children: [{ type: "icon", name: "zap", size: "lg" }, { type: "typography", content: "Sprints", variant: "h2" }] }, { type: "stack", direction: "horizontal", gap: "sm", children: [{ type: "button", label: "Create Sprint", event: "CREATE", variant: "primary", icon: "plus" }] }] }, { type: "divider" }, { type: "data-grid", entity: "Sprint", emptyIcon: "inbox", emptyTitle: "No sprints yet", emptyDescription: "Create a sprint to organize your work.", itemActions: [{ label: "View", event: "VIEW", variant: "ghost", size: "sm" }, { label: "Edit", event: "EDIT", variant: "ghost", size: "sm" }, { label: "Delete", event: "DELETE", variant: "danger", size: "sm" }], columns: [{ name: "name", variant: "h3", icon: "zap" }, { name: "status", variant: "badge" }, { name: "goal", variant: "body" }, { name: "startDate", label: "Start", variant: "caption", format: "date" }, { name: "endDate", label: "End", variant: "caption", format: "date" }, { name: "taskCount", label: "Tasks", variant: "body", format: "number" }], cols: 2, gap: "md" }] }] })
CLOSE -> browsing
(render-ui modal null)
(fetch Sprint)
(render-ui main { type: "dashboard-layout", appName: "ProjectManagerApp", navItems: [{ label: "Tasks", href: "/tasks", icon: "check-square" }, { label: "Sprints", href: "/sprints", icon: "zap" }, { label: "Burndown", href: "/burndown", icon: "layout-list" }], children: [{ type: "stack", direction: "vertical", gap: "lg", className: "max-w-5xl mx-auto w-full", children: [{ type: "stack", direction: "horizontal", gap: "md", justify: "space-between", align: "center", children: [{ type: "stack", direction: "horizontal", gap: "sm", align: "center", children: [{ type: "icon", name: "zap", size: "lg" }, { type: "typography", content: "Sprints", variant: "h2" }] }, { type: "stack", direction: "horizontal", gap: "sm", children: [{ type: "button", label: "Create Sprint", event: "CREATE", variant: "primary", icon: "plus" }] }] }, { type: "divider" }, { type: "data-grid", entity: "Sprint", emptyIcon: "inbox", emptyTitle: "No sprints yet", emptyDescription: "Create a sprint to organize your work.", itemActions: [{ label: "View", event: "VIEW", variant: "ghost", size: "sm" }, { label: "Edit", event: "EDIT", variant: "ghost", size: "sm" }, { label: "Delete", event: "DELETE", variant: "danger", size: "sm" }], columns: [{ name: "name", variant: "h3", icon: "zap" }, { name: "status", variant: "badge" }, { name: "goal", variant: "body" }, { name: "startDate", label: "Start", variant: "caption", format: "date" }, { name: "endDate", label: "End", variant: "caption", format: "date" }, { name: "taskCount", label: "Tasks", variant: "body", format: "number" }], cols: 2, gap: "md" }] }] })
}
emits {
ASSIGN_TASK external { id: string }
COMPLETE_SPRINT external { id: string }
}
listens {
* SPRINT_CREATED -> SPRINT_CREATED
* SPRINT_UPDATED -> SPRINT_UPDATED
}
}
trait SprintCreate -> Sprint [interaction] {
initial: closed
state closed {
INIT -> closed
(fetch Sprint)
CREATE -> open
(fetch Sprint)
(render-ui modal { type: "stack", direction: "vertical", gap: "md", children: [{ type: "stack", direction: "horizontal", gap: "sm", children: [{ type: "icon", name: "plus-circle", size: "md" }, { type: "typography", content: "Create Sprint", variant: "h3" }] }, { type: "divider" }, { type: "form-section", entity: "Sprint", mode: "create", submitEvent: "SAVE", cancelEvent: "CLOSE", fields: ["name", "startDate", "endDate", "goal", "status", "taskCount"] }] })
}
state open {
CLOSE -> closed
(render-ui modal null)
(notify Cancelled info)
SAVE -> closed
(persist create Sprint @payload.data)
(fetch Sprint)
(render-ui modal null)
(emit SPRINT_CREATED)
(notify "Sprint created successfully")
}
emits {
SPRINT_CREATED
}
}
trait SprintEdit -> Sprint [interaction] {
initial: closed
state closed {
INIT -> closed
(fetch Sprint)
EDIT -> open
(fetch Sprint { id: "@payload.id" })
(render-ui modal { type: "stack", direction: "vertical", gap: "md", children: [{ type: "stack", direction: "horizontal", gap: "sm", children: [{ type: "icon", name: "edit", size: "md" }, { type: "typography", content: "Edit Sprint", variant: "h3" }] }, { type: "divider" }, { type: "form-section", entity: "Sprint", mode: "edit", submitEvent: "SAVE", cancelEvent: "CLOSE", fields: ["name", "startDate", "endDate", "goal", "status", "taskCount"], entityId: "@entity.id" }] })
}
state open {
CLOSE -> closed
(render-ui modal null)
(notify Cancelled info)
SAVE -> closed
(persist update Sprint @payload.data)
(fetch Sprint)
(render-ui modal null)
(emit SPRINT_UPDATED)
(notify "Sprint updated successfully")
}
emits {
SPRINT_UPDATED
}
}
trait SprintView -> Sprint [interaction] {
initial: closed
state closed {
INIT -> closed
(fetch Sprint)
VIEW -> open
(fetch Sprint { id: "@payload.id" })
(render-ui modal { type: "stack", direction: "vertical", gap: "md", children: [{ type: "stack", direction: "horizontal", gap: "sm", align: "center", children: [{ type: "icon", name: "eye", size: "md" }, { type: "typography", variant: "h3", content: "@entity.name" }] }, { type: "divider" }, { type: "stack", direction: "horizontal", gap: "md", children: [{ type: "typography", variant: "caption", content: "Name" }, { type: "typography", variant: "body", content: "@entity.name" }] }, { type: "stack", direction: "horizontal", gap: "md", children: [{ type: "typography", variant: "caption", content: "Start Date" }, { type: "typography", variant: "body", content: "@entity.startDate" }] }, { type: "stack", direction: "horizontal", gap: "md", children: [{ type: "typography", variant: "caption", content: "End Date" }, { type: "typography", variant: "body", content: "@entity.endDate" }] }, { type: "stack", direction: "horizontal", gap: "md", children: [{ type: "typography", variant: "caption", content: "Goal" }, { type: "typography", variant: "body", content: "@entity.goal" }] }, { type: "stack", direction: "horizontal", gap: "md", children: [{ type: "typography", variant: "caption", content: "Status" }, { type: "typography", variant: "body", content: "@entity.status" }] }, { type: "stack", direction: "horizontal", gap: "md", children: [{ type: "typography", variant: "caption", content: "Task Count" }, { type: "typography", variant: "body", content: "@entity.taskCount" }] }, { type: "divider" }, { type: "stack", direction: "horizontal", gap: "sm", justify: "end", children: [{ type: "button", label: "Edit", event: "EDIT", variant: "primary", icon: "edit" }, { type: "button", label: "Close", event: "CLOSE", variant: "ghost" }] }] })
}
state open {
CLOSE -> closed
(render-ui modal null)
(notify Cancelled info)
}
}
page "/sprints" -> SprintBrowse, SprintCreate, SprintEdit, SprintView
}
orbital BurndownOrbital {
entity Burndown [singleton] {
id : string!
totalPoints : number
completedPoints : number
remainingPoints : number
velocity : number
daysRemaining : number
}
trait BurndownDisplay -> Burndown [interaction] {
initial: loading
state loading {
INIT -> displaying
(fetch Burndown)
(render-ui main { type: "dashboard-layout", appName: "ProjectManagerApp", navItems: [{ label: "Tasks", href: "/tasks", icon: "check-square" }, { label: "Sprints", href: "/sprints", icon: "zap" }, { label: "Burndown", href: "/burndown", icon: "layout-list" }], children: [{ type: "scaled-diagram", children: [{ type: "stack", direction: "vertical", gap: "lg", children: [{ type: "breadcrumb", items: [{ label: "Home", href: "/" }, { label: "Burndown Chart" }] }, { type: "stack", direction: "horizontal", gap: "md", justify: "space-between", children: [{ type: "stack", direction: "horizontal", gap: "md", children: [{ type: "icon", name: "trending-down", size: "lg" }, { type: "typography", content: "Burndown Chart", variant: "h2" }] }, { type: "button", label: "Refresh", event: "REFRESH", variant: "secondary", icon: "refresh-cw" }] }, { type: "divider" }, { type: "box", padding: "md", children: [{ type: "simple-grid", columns: 5, children: [{ type: "stat-display", label: "TotalPoints", value: ["object/get", ["array/first", "@entity"], "totalPoints"] }, { type: "stat-display", label: "CompletedPoints", value: ["object/get", ["array/first", "@entity"], "completedPoints"] }, { type: "stat-display", label: "RemainingPoints", value: ["object/get", ["array/first", "@entity"], "remainingPoints"] }, { type: "stat-display", label: "Velocity", value: ["object/get", ["array/first", "@entity"], "velocity"] }, { type: "stat-display", label: "DaysRemaining", value: ["object/get", ["array/first", "@entity"], "daysRemaining"] }] }] }, { type: "divider" }, { type: "grid", columns: 2, gap: "md", children: [{ type: "card", children: [{ type: "typography", variant: "caption", content: "Chart View" }] }, { type: "card", children: [{ type: "typography", variant: "caption", content: "Graph View" }] }] }, { type: "line-chart", data: [{ date: "Jan", value: 12 }, { date: "Feb", value: 19 }, { date: "Mar", value: 15 }, { date: "Apr", value: 25 }, { date: "May", value: 22 }, { date: "Jun", value: 30 }], xKey: "date", yKey: "value", title: "Trend" }, { type: "chart-legend", items: [{ label: "Current", color: "primary" }, { label: "Previous", color: "muted" }] }, { type: "graph-view", nodes: [{ id: "a", label: "Start", x: 50, y: 100 }, { id: "b", label: "Process", x: 200, y: 50 }, { id: "c", label: "End", x: 350, y: 100 }], edges: [{ from: "a", to: "b" }, { from: "b", to: "c" }], width: 400, height: 200 }] }] }] })
LOADED -> displaying
(fetch Burndown)
(render-ui main { type: "dashboard-layout", appName: "ProjectManagerApp", navItems: [{ label: "Tasks", href: "/tasks", icon: "check-square" }, { label: "Sprints", href: "/sprints", icon: "zap" }, { label: "Burndown", href: "/burndown", icon: "layout-list" }], children: [{ type: "scaled-diagram", children: [{ type: "stack", direction: "vertical", gap: "lg", children: [{ type: "breadcrumb", items: [{ label: "Home", href: "/" }, { label: "Burndown Chart" }] }, { type: "stack", direction: "horizontal", gap: "md", justify: "space-between", children: [{ type: "stack", direction: "horizontal", gap: "md", children: [{ type: "icon", name: "trending-down", size: "lg" }, { type: "typography", content: "Burndown Chart", variant: "h2" }] }, { type: "button", label: "Refresh", event: "REFRESH", variant: "secondary", icon: "refresh-cw" }] }, { type: "divider" }, { type: "box", padding: "md", children: [{ type: "simple-grid", columns: 5, children: [{ type: "stat-display", label: "TotalPoints", value: ["object/get", ["array/first", "@entity"], "totalPoints"] }, { type: "stat-display", label: "CompletedPoints", value: ["object/get", ["array/first", "@entity"], "completedPoints"] }, { type: "stat-display", label: "RemainingPoints", value: ["object/get", ["array/first", "@entity"], "remainingPoints"] }, { type: "stat-display", label: "Velocity", value: ["object/get", ["array/first", "@entity"], "velocity"] }, { type: "stat-display", label: "DaysRemaining", value: ["object/get", ["array/first", "@entity"], "daysRemaining"] }] }] }, { type: "divider" }, { type: "grid", columns: 2, gap: "md", children: [{ type: "card", children: [{ type: "typography", variant: "caption", content: "Chart View" }] }, { type: "card", children: [{ type: "typography", variant: "caption", content: "Graph View" }] }] }, { type: "line-chart", data: [{ date: "Jan", value: 12 }, { date: "Feb", value: 19 }, { date: "Mar", value: 15 }, { date: "Apr", value: 25 }, { date: "May", value: 22 }, { date: "Jun", value: 30 }], xKey: "date", yKey: "value", title: "Trend" }, { type: "chart-legend", items: [{ label: "Current", color: "primary" }, { label: "Previous", color: "muted" }] }, { type: "graph-view", nodes: [{ id: "a", label: "Start", x: 50, y: 100 }, { id: "b", label: "Process", x: 200, y: 50 }, { id: "c", label: "End", x: 350, y: 100 }], edges: [{ from: "a", to: "b" }, { from: "b", to: "c" }], width: 400, height: 200 }] }] }] })
}
state displaying {
INIT -> displaying
(fetch Burndown)
(render-ui main { type: "dashboard-layout", appName: "ProjectManagerApp", navItems: [{ label: "Tasks", href: "/tasks", icon: "check-square" }, { label: "Sprints", href: "/sprints", icon: "zap" }, { label: "Burndown", href: "/burndown", icon: "layout-list" }], children: [{ type: "scaled-diagram", children: [{ type: "stack", direction: "vertical", gap: "lg", children: [{ type: "breadcrumb", items: [{ label: "Home", href: "/" }, { label: "Burndown Chart" }] }, { type: "stack", direction: "horizontal", gap: "md", justify: "space-between", children: [{ type: "stack", direction: "horizontal", gap: "md", children: [{ type: "icon", name: "trending-down", size: "lg" }, { type: "typography", content: "Burndown Chart", variant: "h2" }] }, { type: "button", label: "Refresh", event: "REFRESH", variant: "secondary", icon: "refresh-cw" }] }, { type: "divider" }, { type: "box", padding: "md", children: [{ type: "simple-grid", columns: 5, children: [{ type: "stat-display", label: "TotalPoints", value: ["object/get", ["array/first", "@entity"], "totalPoints"] }, { type: "stat-display", label: "CompletedPoints", value: ["object/get", ["array/first", "@entity"], "completedPoints"] }, { type: "stat-display", label: "RemainingPoints", value: ["object/get", ["array/first", "@entity"], "remainingPoints"] }, { type: "stat-display", label: "Velocity", value: ["object/get", ["array/first", "@entity"], "velocity"] }, { type: "stat-display", label: "DaysRemaining", value: ["object/get", ["array/first", "@entity"], "daysRemaining"] }] }] }, { type: "divider" }, { type: "grid", columns: 2, gap: "md", children: [{ type: "card", children: [{ type: "typography", variant: "caption", content: "Chart View" }] }, { type: "card", children: [{ type: "typography", variant: "caption", content: "Graph View" }] }] }, { type: "line-chart", data: [{ date: "Jan", value: 12 }, { date: "Feb", value: 19 }, { date: "Mar", value: 15 }, { date: "Apr", value: 25 }, { date: "May", value: 22 }, { date: "Jun", value: 30 }], xKey: "date", yKey: "value", title: "Trend" }, { type: "chart-legend", items: [{ label: "Current", color: "primary" }, { label: "Previous", color: "muted" }] }, { type: "graph-view", nodes: [{ id: "a", label: "Start", x: 50, y: 100 }, { id: "b", label: "Process", x: 200, y: 50 }, { id: "c", label: "End", x: 350, y: 100 }], edges: [{ from: "a", to: "b" }, { from: "b", to: "c" }], width: 400, height: 200 }] }] }] })
REFRESH -> refreshing
(fetch Burndown)
(render-ui main { type: "dashboard-layout", appName: "ProjectManagerApp", navItems: [{ label: "Tasks", href: "/tasks", icon: "check-square" }, { label: "Sprints", href: "/sprints", icon: "zap" }, { label: "Burndown", href: "/burndown", icon: "layout-list" }], children: [{ type: "scaled-diagram", children: [{ type: "stack", direction: "vertical", gap: "lg", children: [{ type: "breadcrumb", items: [{ label: "Home", href: "/" }, { label: "Burndown Chart" }] }, { type: "stack", direction: "horizontal", gap: "md", justify: "space-between", children: [{ type: "stack", direction: "horizontal", gap: "md", children: [{ type: "icon", name: "trending-down", size: "lg" }, { type: "typography", content: "Burndown Chart", variant: "h2" }] }, { type: "button", label: "Refresh", event: "REFRESH", variant: "secondary", icon: "refresh-cw" }] }, { type: "divider" }, { type: "box", padding: "md", children: [{ type: "simple-grid", columns: 5, children: [{ type: "stat-display", label: "TotalPoints", value: ["object/get", ["array/first", "@entity"], "totalPoints"] }, { type: "stat-display", label: "CompletedPoints", value: ["object/get", ["array/first", "@entity"], "completedPoints"] }, { type: "stat-display", label: "RemainingPoints", value: ["object/get", ["array/first", "@entity"], "remainingPoints"] }, { type: "stat-display", label: "Velocity", value: ["object/get", ["array/first", "@entity"], "velocity"] }, { type: "stat-display", label: "DaysRemaining", value: ["object/get", ["array/first", "@entity"], "daysRemaining"] }] }] }, { type: "divider" }, { type: "grid", columns: 2, gap: "md", children: [{ type: "card", children: [{ type: "typography", variant: "caption", content: "Chart View" }] }, { type: "card", children: [{ type: "typography", variant: "caption", content: "Graph View" }] }] }, { type: "line-chart", data: [{ date: "Jan", value: 12 }, { date: "Feb", value: 19 }, { date: "Mar", value: 15 }, { date: "Apr", value: 25 }, { date: "May", value: 22 }, { date: "Jun", value: 30 }], xKey: "date", yKey: "value", title: "Trend" }, { type: "chart-legend", items: [{ label: "Current", color: "primary" }, { label: "Previous", color: "muted" }] }, { type: "graph-view", nodes: [{ id: "a", label: "Start", x: 50, y: 100 }, { id: "b", label: "Process", x: 200, y: 50 }, { id: "c", label: "End", x: 350, y: 100 }], edges: [{ from: "a", to: "b" }, { from: "b", to: "c" }], width: 400, height: 200 }] }] }] })
}
state refreshing {
REFRESHED -> displaying
(fetch Burndown)
(render-ui main { type: "dashboard-layout", appName: "ProjectManagerApp", navItems: [{ label: "Tasks", href: "/tasks", icon: "check-square" }, { label: "Sprints", href: "/sprints", icon: "zap" }, { label: "Burndown", href: "/burndown", icon: "layout-list" }], children: [{ type: "scaled-diagram", children: [{ type: "stack", direction: "vertical", gap: "lg", children: [{ type: "breadcrumb", items: [{ label: "Home", href: "/" }, { label: "Burndown Chart" }] }, { type: "stack", direction: "horizontal", gap: "md", justify: "space-between", children: [{ type: "stack", direction: "horizontal", gap: "md", children: [{ type: "icon", name: "trending-down", size: "lg" }, { type: "typography", content: "Burndown Chart", variant: "h2" }] }, { type: "button", label: "Refresh", event: "REFRESH", variant: "secondary", icon: "refresh-cw" }] }, { type: "divider" }, { type: "box", padding: "md", children: [{ type: "simple-grid", columns: 5, children: [{ type: "stat-display", label: "TotalPoints", value: ["object/get", ["array/first", "@entity"], "totalPoints"] }, { type: "stat-display", label: "CompletedPoints", value: ["object/get", ["array/first", "@entity"], "completedPoints"] }, { type: "stat-display", label: "RemainingPoints", value: ["object/get", ["array/first", "@entity"], "remainingPoints"] }, { type: "stat-display", label: "Velocity", value: ["object/get", ["array/first", "@entity"], "velocity"] }, { type: "stat-display", label: "DaysRemaining", value: ["object/get", ["array/first", "@entity"], "daysRemaining"] }] }] }, { type: "divider" }, { type: "grid", columns: 2, gap: "md", children: [{ type: "card", children: [{ type: "typography", variant: "caption", content: "Chart View" }] }, { type: "card", children: [{ type: "typography", variant: "caption", content: "Graph View" }] }] }, { type: "line-chart", data: [{ date: "Jan", value: 12 }, { date: "Feb", value: 19 }, { date: "Mar", value: 15 }, { date: "Apr", value: 25 }, { date: "May", value: 22 }, { date: "Jun", value: 30 }], xKey: "date", yKey: "value", title: "Trend" }, { type: "chart-legend", items: [{ label: "Current", color: "primary" }, { label: "Previous", color: "muted" }] }, { type: "graph-view", nodes: [{ id: "a", label: "Start", x: 50, y: 100 }, { id: "b", label: "Process", x: 200, y: 50 }, { id: "c", label: "End", x: 350, y: 100 }], edges: [{ from: "a", to: "b" }, { from: "b", to: "c" }], width: 400, height: 200 }] }] }] })
}
listens {
* COMPLETE_SPRINT -> INIT
}
}
page "/burndown" -> BurndownDisplay
}
Loading preview...

Orbital Visualization

Loading visualization...

Entity Fields

FieldTypeDefault
idstring-
titlestring-
descriptionstring-
assigneestring-
prioritystring"medium"
statusstring"todo"
storyPointsnumber0
dueDatedate-

States

StateType
browsingInitial
deleting-

Events

EventPayload
INIT-
CREATE-
VIEWid: string
EDITid: string
DELETEid: string
TASK_CREATEDdata: object
TASK_UPDATEDdata: object
CONFIRM_DELETE-
CANCEL-
CLOSE-

Transitions

FromEventToEffects
browsingINITbrowsing2 effects
browsingTASK_CREATEDbrowsing1 effect
browsingTASK_UPDATEDbrowsing1 effect
browsingDELETEdeleting2 effects
deletingCONFIRM_DELETEbrowsing5 effects
deletingCANCELbrowsing3 effects
deletingCLOSEbrowsing3 effects

Listens

  • [object Object]
  • [object Object]
  • [object Object]