@topogram/template-todo 0.1.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/README.md +91 -0
  2. package/implementation/README.md +9 -0
  3. package/implementation/backend/reference.js +206 -0
  4. package/implementation/backend/repository-reference.js +74 -0
  5. package/implementation/backend/repository-renderers.js +442 -0
  6. package/implementation/index.js +53 -0
  7. package/implementation/runtime/check-renderers.js +215 -0
  8. package/implementation/runtime/checks.js +120 -0
  9. package/implementation/runtime/reference.js +92 -0
  10. package/implementation/web/reference.js +51 -0
  11. package/implementation/web/renderers.js +1223 -0
  12. package/implementation/web/screens-reference.js +15 -0
  13. package/package.json +31 -0
  14. package/topogram/actors/actor-user.tg +6 -0
  15. package/topogram/capabilities/cap-complete-task.tg +12 -0
  16. package/topogram/capabilities/cap-create-project.tg +11 -0
  17. package/topogram/capabilities/cap-create-task.tg +14 -0
  18. package/topogram/capabilities/cap-create-user.tg +11 -0
  19. package/topogram/capabilities/cap-delete-task.tg +12 -0
  20. package/topogram/capabilities/cap-download-task-export.tg +10 -0
  21. package/topogram/capabilities/cap-export-tasks.tg +11 -0
  22. package/topogram/capabilities/cap-get-project.tg +11 -0
  23. package/topogram/capabilities/cap-get-task-export-job.tg +11 -0
  24. package/topogram/capabilities/cap-get-task.tg +11 -0
  25. package/topogram/capabilities/cap-get-user.tg +11 -0
  26. package/topogram/capabilities/cap-list-projects.tg +11 -0
  27. package/topogram/capabilities/cap-list-tasks.tg +11 -0
  28. package/topogram/capabilities/cap-list-users.tg +11 -0
  29. package/topogram/capabilities/cap-update-project.tg +12 -0
  30. package/topogram/capabilities/cap-update-task.tg +12 -0
  31. package/topogram/capabilities/cap-update-user.tg +12 -0
  32. package/topogram/components/component-ui-task-board.tg +33 -0
  33. package/topogram/components/component-ui-task-calendar.tg +30 -0
  34. package/topogram/components/component-ui-task-summary.tg +23 -0
  35. package/topogram/components/component-ui-task-table.tg +34 -0
  36. package/topogram/decisions/decision-task-ownership.tg +9 -0
  37. package/topogram/docs/glossary/user.md +22 -0
  38. package/topogram/docs/journeys/task-creation-and-ownership.md +57 -0
  39. package/topogram/entities/entity-project.tg +28 -0
  40. package/topogram/entities/entity-task.tg +38 -0
  41. package/topogram/entities/entity-user.tg +24 -0
  42. package/topogram/enums/enum-export-job-status.tg +3 -0
  43. package/topogram/enums/enum-project-status.tg +3 -0
  44. package/topogram/enums/enum-task-priority.tg +3 -0
  45. package/topogram/enums/enum-task-status.tg +3 -0
  46. package/topogram/operations/operation-task-creation-monitoring.tg +10 -0
  47. package/topogram/projections/proj-api.tg +177 -0
  48. package/topogram/projections/proj-db-postgres.tg +55 -0
  49. package/topogram/projections/proj-db-sqlite.tg +47 -0
  50. package/topogram/projections/proj-ui-shared.tg +133 -0
  51. package/topogram/projections/proj-ui-web-react.tg +92 -0
  52. package/topogram/projections/proj-ui-web.tg +92 -0
  53. package/topogram/rules/rule-no-task-creation-in-archived-project.tg +10 -0
  54. package/topogram/rules/rule-only-active-users-may-own-tasks.tg +10 -0
  55. package/topogram/shapes/shape-input-complete-task.tg +11 -0
  56. package/topogram/shapes/shape-input-create-project.tg +6 -0
  57. package/topogram/shapes/shape-input-create-task.tg +6 -0
  58. package/topogram/shapes/shape-input-create-user.tg +6 -0
  59. package/topogram/shapes/shape-input-delete-task.tg +10 -0
  60. package/topogram/shapes/shape-input-export-tasks.tg +13 -0
  61. package/topogram/shapes/shape-input-get-project.tg +10 -0
  62. package/topogram/shapes/shape-input-get-task-export-job.tg +10 -0
  63. package/topogram/shapes/shape-input-get-task.tg +10 -0
  64. package/topogram/shapes/shape-input-get-user.tg +10 -0
  65. package/topogram/shapes/shape-input-list-projects.tg +11 -0
  66. package/topogram/shapes/shape-input-list-tasks.tg +14 -0
  67. package/topogram/shapes/shape-input-list-users.tg +11 -0
  68. package/topogram/shapes/shape-input-update-project.tg +14 -0
  69. package/topogram/shapes/shape-input-update-task.tg +16 -0
  70. package/topogram/shapes/shape-input-update-user.tg +13 -0
  71. package/topogram/shapes/shape-output-project-card.tg +6 -0
  72. package/topogram/shapes/shape-output-project-detail.tg +6 -0
  73. package/topogram/shapes/shape-output-task-card.tg +19 -0
  74. package/topogram/shapes/shape-output-task-detail.tg +6 -0
  75. package/topogram/shapes/shape-output-task-export-callback.tg +14 -0
  76. package/topogram/shapes/shape-output-task-export-job.tg +13 -0
  77. package/topogram/shapes/shape-output-task-export-status.tg +17 -0
  78. package/topogram/shapes/shape-output-user-card.tg +6 -0
  79. package/topogram/shapes/shape-output-user-detail.tg +6 -0
  80. package/topogram/terms/term-user.tg +5 -0
  81. package/topogram/verifications/verification-create-task-policy.tg +15 -0
  82. package/topogram/verifications/verification-runtime-smoke.tg +16 -0
  83. package/topogram/verifications/verification-task-runtime-flow.tg +31 -0
  84. package/topogram-template.json +11 -0
  85. package/topogram.project.json +53 -0
@@ -0,0 +1,13 @@
1
+ shape shape_input_export_tasks {
2
+ name "Export Tasks Input"
3
+ description "Filters accepted when requesting a task export"
4
+
5
+ fields {
6
+ project_id uuid optional
7
+ owner_id uuid optional
8
+ status task_status optional
9
+ callback_url text optional
10
+ }
11
+
12
+ status active
13
+ }
@@ -0,0 +1,10 @@
1
+ shape shape_input_get_project {
2
+ name "Get Project Input"
3
+ description "Input for fetching a single project"
4
+
5
+ fields {
6
+ project_id uuid required
7
+ }
8
+
9
+ status active
10
+ }
@@ -0,0 +1,10 @@
1
+ shape shape_input_get_task_export_job {
2
+ name "Get Task Export Job Input"
3
+ description "Input for fetching task export job status"
4
+
5
+ fields {
6
+ job_id uuid required
7
+ }
8
+
9
+ status active
10
+ }
@@ -0,0 +1,10 @@
1
+ shape shape_input_get_task {
2
+ name "Get Task Input"
3
+ description "Input for fetching a single task"
4
+
5
+ fields {
6
+ task_id uuid required
7
+ }
8
+
9
+ status active
10
+ }
@@ -0,0 +1,10 @@
1
+ shape shape_input_get_user {
2
+ name "Get User Input"
3
+ description "Input for fetching a single user"
4
+
5
+ fields {
6
+ user_id uuid required
7
+ }
8
+
9
+ status active
10
+ }
@@ -0,0 +1,11 @@
1
+ shape shape_input_list_projects {
2
+ name "List Projects Input"
3
+ description "Input for listing projects"
4
+
5
+ fields {
6
+ after text optional
7
+ limit integer optional default 25
8
+ }
9
+
10
+ status active
11
+ }
@@ -0,0 +1,14 @@
1
+ shape shape_input_list_tasks {
2
+ name "List Tasks Input"
3
+ description "Input for listing tasks"
4
+
5
+ fields {
6
+ project_id uuid optional
7
+ owner_id uuid optional
8
+ status task_status optional
9
+ after text optional
10
+ limit integer optional default 25
11
+ }
12
+
13
+ status active
14
+ }
@@ -0,0 +1,11 @@
1
+ shape shape_input_list_users {
2
+ name "List Users Input"
3
+ description "Input for listing users"
4
+
5
+ fields {
6
+ after text optional
7
+ limit integer optional default 25
8
+ }
9
+
10
+ status active
11
+ }
@@ -0,0 +1,14 @@
1
+ shape shape_input_update_project {
2
+ name "Update Project Input"
3
+ description "Input for updating a project"
4
+
5
+ fields {
6
+ project_id uuid required
7
+ name string optional
8
+ description text optional
9
+ status project_status optional
10
+ owner_id uuid optional
11
+ }
12
+
13
+ status active
14
+ }
@@ -0,0 +1,16 @@
1
+ shape shape_input_update_task {
2
+ name "Update Task Input"
3
+ description "Input for updating a task"
4
+
5
+ fields {
6
+ task_id uuid required
7
+ title string optional
8
+ description text optional
9
+ priority task_priority optional
10
+ owner_id uuid optional
11
+ due_at datetime optional
12
+ status task_status optional
13
+ }
14
+
15
+ status active
16
+ }
@@ -0,0 +1,13 @@
1
+ shape shape_input_update_user {
2
+ name "Update User Input"
3
+ description "Input for updating a user"
4
+
5
+ fields {
6
+ user_id uuid required
7
+ email string optional
8
+ display_name string optional
9
+ is_active boolean optional
10
+ }
11
+
12
+ status active
13
+ }
@@ -0,0 +1,6 @@
1
+ shape shape_output_project_card from entity_project {
2
+ name "Project Card Output"
3
+ description "Compact project payload for cards and lists"
4
+ include [id, name, description, status, owner_id]
5
+ status active
6
+ }
@@ -0,0 +1,6 @@
1
+ shape shape_output_project_detail from entity_project {
2
+ name "Project Detail Output"
3
+ description "Detailed project payload"
4
+ include [id, name, description, status, owner_id, created_at]
5
+ status active
6
+ }
@@ -0,0 +1,19 @@
1
+ shape shape_output_task_card from entity_task {
2
+ name "Task Card Output"
3
+ description "Compact task payload for cards and lists"
4
+ include [title, status, priority, due_at, owner_id]
5
+
6
+ rename {
7
+ due_at dueAt
8
+ owner_id ownerId
9
+ }
10
+
11
+ overrides {
12
+ title optional
13
+ status default active
14
+ priority default medium
15
+ ownerId required
16
+ }
17
+
18
+ status active
19
+ }
@@ -0,0 +1,6 @@
1
+ shape shape_output_task_detail from entity_task {
2
+ name "Task Detail Output"
3
+ description "Detailed task payload"
4
+ include [id, title, description, status, priority, owner_id, project_id, created_at, updated_at, completed_at, due_at]
5
+ status active
6
+ }
@@ -0,0 +1,14 @@
1
+ shape shape_output_task_export_callback {
2
+ name "Task Export Callback"
3
+ description "Outbound webhook payload sent when a task export completes"
4
+
5
+ fields {
6
+ job_id uuid required
7
+ status export_job_status required
8
+ download_url text optional
9
+ error_message text optional
10
+ completed_at datetime optional
11
+ }
12
+
13
+ status active
14
+ }
@@ -0,0 +1,13 @@
1
+ shape shape_output_task_export_job {
2
+ name "Task Export Job"
3
+ description "Accepted job payload for long-running task exports"
4
+
5
+ fields {
6
+ job_id uuid required
7
+ status string required default accepted
8
+ status_url text required
9
+ submitted_at datetime required
10
+ }
11
+
12
+ status active
13
+ }
@@ -0,0 +1,17 @@
1
+ shape shape_output_task_export_status {
2
+ name "Task Export Status"
3
+ description "Status payload for long-running task export jobs"
4
+
5
+ fields {
6
+ job_id uuid required
7
+ status export_job_status required default accepted
8
+ status_url text required
9
+ submitted_at datetime required
10
+ completed_at datetime optional
11
+ expires_at datetime optional
12
+ download_url text optional
13
+ error_message text optional
14
+ }
15
+
16
+ status active
17
+ }
@@ -0,0 +1,6 @@
1
+ shape shape_output_user_card from entity_user {
2
+ name "User Card Output"
3
+ description "Compact user payload for cards and lists"
4
+ include [id, display_name, email, is_active]
5
+ status active
6
+ }
@@ -0,0 +1,6 @@
1
+ shape shape_output_user_detail from entity_user {
2
+ name "User Detail Output"
3
+ description "Detailed user payload"
4
+ include [id, email, display_name, is_active, created_at]
5
+ status active
6
+ }
@@ -0,0 +1,5 @@
1
+ actor user {
2
+ name "User"
3
+ description "A person interacting with the Todo application"
4
+ status active
5
+ }
@@ -0,0 +1,15 @@
1
+ verification ver_create_task_policy {
2
+ name "Create task policy"
3
+ description "Verifies create-task behavior and policy"
4
+
5
+ validates [cap_create_task, rule_no_task_creation_in_archived_project, rule_only_active_users_may_own_tasks]
6
+ method runtime
7
+
8
+ scenarios [
9
+ create_task_in_active_project,
10
+ reject_task_in_archived_project,
11
+ reject_assignment_to_inactive_user
12
+ ]
13
+
14
+ status active
15
+ }
@@ -0,0 +1,16 @@
1
+ verification ver_runtime_smoke {
2
+ name "Todo runtime smoke"
3
+ description "Covers the minimum web and API checks for the generated Todo stack."
4
+
5
+ validates [cap_create_task, cap_get_task, cap_list_tasks]
6
+ method smoke
7
+
8
+ scenarios [
9
+ tasks_page_responds,
10
+ create_task_smoke,
11
+ get_created_task_smoke,
12
+ list_tasks_smoke
13
+ ]
14
+
15
+ status active
16
+ }
@@ -0,0 +1,31 @@
1
+ verification ver_task_runtime_flow {
2
+ name "Task runtime flow"
3
+ description "Verifies core task CRUD and export runtime behavior."
4
+
5
+ validates [
6
+ cap_create_task,
7
+ cap_get_task,
8
+ cap_list_tasks,
9
+ cap_update_task,
10
+ cap_complete_task,
11
+ cap_delete_task,
12
+ cap_export_tasks,
13
+ cap_get_task_export_job,
14
+ cap_download_task_export
15
+ ]
16
+ method runtime
17
+
18
+ scenarios [
19
+ create_task_runtime,
20
+ get_created_task_runtime,
21
+ list_tasks_runtime,
22
+ update_task_runtime,
23
+ complete_task_runtime,
24
+ delete_task_runtime,
25
+ export_tasks_runtime,
26
+ get_task_export_job_runtime,
27
+ download_task_export_runtime
28
+ ]
29
+
30
+ status active
31
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "@topogram/template-todo",
3
+ "version": "0.1.30",
4
+ "kind": "starter",
5
+ "description": "Todo/task management starter with generated web, API, and Postgres components.",
6
+ "topogramVersion": "0.1",
7
+ "includesExecutableImplementation": true,
8
+ "starterScripts": {
9
+ "component:behavior:query": "topogram query component-behavior ./topogram --projection proj_ui_web --json"
10
+ }
11
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "version": "0.1",
3
+ "implementation": {
4
+ "id": "web-api-db-template",
5
+ "module": "./implementation/index.js",
6
+ "export": "WEB_API_DB_IMPLEMENTATION"
7
+ },
8
+ "outputs": {
9
+ "app": {
10
+ "path": "./app",
11
+ "ownership": "generated"
12
+ }
13
+ },
14
+ "topology": {
15
+ "components": [
16
+ {
17
+ "id": "app_api",
18
+ "type": "api",
19
+ "projection": "proj_api",
20
+ "generator": {
21
+ "id": "@topogram/generator-hono-api",
22
+ "version": "1",
23
+ "package": "@topogram/generator-hono-api"
24
+ },
25
+ "port": 3000,
26
+ "database": "app_postgres"
27
+ },
28
+ {
29
+ "id": "app_sveltekit",
30
+ "type": "web",
31
+ "projection": "proj_ui_web",
32
+ "generator": {
33
+ "id": "@topogram/generator-sveltekit-web",
34
+ "version": "1",
35
+ "package": "@topogram/generator-sveltekit-web"
36
+ },
37
+ "port": 5173,
38
+ "api": "app_api"
39
+ },
40
+ {
41
+ "id": "app_postgres",
42
+ "type": "database",
43
+ "projection": "proj_db_postgres",
44
+ "generator": {
45
+ "id": "@topogram/generator-postgres-db",
46
+ "version": "1",
47
+ "package": "@topogram/generator-postgres-db"
48
+ },
49
+ "port": 5432
50
+ }
51
+ ]
52
+ }
53
+ }