@nextsparkjs/theme-default 0.1.0-beta.1

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 (333) hide show
  1. package/about/business.md +49 -0
  2. package/about/features.json +302 -0
  3. package/about/team.md +79 -0
  4. package/api/ai/chat/stream/route.ts +212 -0
  5. package/api/ai/orchestrator/route.ts +226 -0
  6. package/api/ai/single-agent/route.ts +291 -0
  7. package/api/ai/usage/route.ts +122 -0
  8. package/blocks/benefits/component.tsx +100 -0
  9. package/blocks/benefits/config.ts +11 -0
  10. package/blocks/benefits/examples.ts +85 -0
  11. package/blocks/benefits/fields.ts +156 -0
  12. package/blocks/benefits/schema.ts +33 -0
  13. package/blocks/cta-section/component.tsx +100 -0
  14. package/blocks/cta-section/config.ts +11 -0
  15. package/blocks/cta-section/examples.ts +41 -0
  16. package/blocks/cta-section/fields.ts +89 -0
  17. package/blocks/cta-section/index.ts +6 -0
  18. package/blocks/cta-section/schema.ts +32 -0
  19. package/blocks/cta-section/thumbnail.png +1 -0
  20. package/blocks/faq-accordion/component.tsx +156 -0
  21. package/blocks/faq-accordion/config.ts +11 -0
  22. package/blocks/faq-accordion/examples.ts +77 -0
  23. package/blocks/faq-accordion/fields.ts +119 -0
  24. package/blocks/faq-accordion/index.ts +6 -0
  25. package/blocks/faq-accordion/schema.ts +45 -0
  26. package/blocks/features-grid/component.tsx +112 -0
  27. package/blocks/features-grid/config.ts +11 -0
  28. package/blocks/features-grid/examples.ts +63 -0
  29. package/blocks/features-grid/fields.ts +97 -0
  30. package/blocks/features-grid/index.ts +6 -0
  31. package/blocks/features-grid/schema.ts +40 -0
  32. package/blocks/features-grid/thumbnail.png +1 -0
  33. package/blocks/hero/component.tsx +100 -0
  34. package/blocks/hero/config.ts +11 -0
  35. package/blocks/hero/examples.ts +35 -0
  36. package/blocks/hero/fields.ts +60 -0
  37. package/blocks/hero/index.ts +6 -0
  38. package/blocks/hero/schema.ts +32 -0
  39. package/blocks/hero/thumbnail.png +1 -0
  40. package/blocks/hero/thumbnail.png.txt +6 -0
  41. package/blocks/hero-with-form/component.tsx +232 -0
  42. package/blocks/hero-with-form/config.ts +11 -0
  43. package/blocks/hero-with-form/examples.ts +16 -0
  44. package/blocks/hero-with-form/fields.ts +207 -0
  45. package/blocks/hero-with-form/index.ts +6 -0
  46. package/blocks/hero-with-form/schema.ts +54 -0
  47. package/blocks/jumbotron/component.tsx +136 -0
  48. package/blocks/jumbotron/config.ts +11 -0
  49. package/blocks/jumbotron/examples.ts +36 -0
  50. package/blocks/jumbotron/fields.ts +202 -0
  51. package/blocks/jumbotron/index.ts +6 -0
  52. package/blocks/jumbotron/schema.ts +55 -0
  53. package/blocks/logo-cloud/component.tsx +154 -0
  54. package/blocks/logo-cloud/config.ts +11 -0
  55. package/blocks/logo-cloud/examples.ts +34 -0
  56. package/blocks/logo-cloud/fields.ts +133 -0
  57. package/blocks/logo-cloud/index.ts +6 -0
  58. package/blocks/logo-cloud/schema.ts +46 -0
  59. package/blocks/post-content/component.tsx +197 -0
  60. package/blocks/post-content/config.ts +11 -0
  61. package/blocks/post-content/examples.ts +33 -0
  62. package/blocks/post-content/fields.ts +165 -0
  63. package/blocks/post-content/index.ts +4 -0
  64. package/blocks/post-content/schema.ts +46 -0
  65. package/blocks/pricing-table/component.tsx +154 -0
  66. package/blocks/pricing-table/config.ts +11 -0
  67. package/blocks/pricing-table/examples.ts +96 -0
  68. package/blocks/pricing-table/fields.ts +161 -0
  69. package/blocks/pricing-table/index.ts +4 -0
  70. package/blocks/pricing-table/schema.ts +50 -0
  71. package/blocks/split-content/component.tsx +135 -0
  72. package/blocks/split-content/config.ts +11 -0
  73. package/blocks/split-content/examples.ts +38 -0
  74. package/blocks/split-content/fields.ts +198 -0
  75. package/blocks/split-content/index.ts +6 -0
  76. package/blocks/split-content/schema.ts +67 -0
  77. package/blocks/stats-counter/component.tsx +124 -0
  78. package/blocks/stats-counter/config.ts +11 -0
  79. package/blocks/stats-counter/examples.ts +61 -0
  80. package/blocks/stats-counter/fields.ts +134 -0
  81. package/blocks/stats-counter/index.ts +6 -0
  82. package/blocks/stats-counter/schema.ts +47 -0
  83. package/blocks/testimonials/component.tsx +114 -0
  84. package/blocks/testimonials/config.ts +11 -0
  85. package/blocks/testimonials/examples.ts +65 -0
  86. package/blocks/testimonials/fields.ts +105 -0
  87. package/blocks/testimonials/index.ts +6 -0
  88. package/blocks/testimonials/schema.ts +41 -0
  89. package/blocks/testimonials/thumbnail.png +1 -0
  90. package/blocks/text-content/component.tsx +97 -0
  91. package/blocks/text-content/config.ts +11 -0
  92. package/blocks/text-content/examples.ts +30 -0
  93. package/blocks/text-content/fields.ts +88 -0
  94. package/blocks/text-content/index.ts +6 -0
  95. package/blocks/text-content/schema.ts +30 -0
  96. package/blocks/text-content/thumbnail.png +1 -0
  97. package/blocks/timeline/component.tsx +267 -0
  98. package/blocks/timeline/config.ts +11 -0
  99. package/blocks/timeline/examples.ts +68 -0
  100. package/blocks/timeline/fields.ts +147 -0
  101. package/blocks/timeline/index.ts +6 -0
  102. package/blocks/timeline/schema.ts +49 -0
  103. package/blocks/video-hero/component.tsx +270 -0
  104. package/blocks/video-hero/config.ts +11 -0
  105. package/blocks/video-hero/examples.ts +24 -0
  106. package/blocks/video-hero/fields.ts +98 -0
  107. package/blocks/video-hero/index.ts +6 -0
  108. package/blocks/video-hero/schema.ts +39 -0
  109. package/components/ai-chat/ChatPanel.tsx +575 -0
  110. package/components/ai-chat/ConversationItem.tsx +266 -0
  111. package/components/ai-chat/ConversationSidebar.tsx +99 -0
  112. package/components/ai-chat/MarkdownRenderer.tsx +15 -0
  113. package/components/ai-chat/Message.tsx +42 -0
  114. package/components/ai-chat/MessageInput.tsx +49 -0
  115. package/components/ai-chat/MessageList.tsx +46 -0
  116. package/components/ai-chat/TypingIndicator.tsx +11 -0
  117. package/config/app.config.ts +367 -0
  118. package/config/billing.config.ts +349 -0
  119. package/config/dashboard.config.ts +506 -0
  120. package/config/dev.config.ts +104 -0
  121. package/config/features.config.ts +203 -0
  122. package/config/flows.config.ts +129 -0
  123. package/config/permissions.config.ts +245 -0
  124. package/config/theme.config.ts +74 -0
  125. package/docs/01-overview/01-introduction.md +335 -0
  126. package/docs/01-overview/02-customization.md +671 -0
  127. package/docs/02-features/01-components.md +155 -0
  128. package/docs/02-features/02-styling.md +139 -0
  129. package/docs/02-features/03-tasks-entity.md +407 -0
  130. package/docs/03-ai/01-overview.md +211 -0
  131. package/docs/03-ai/02-customization.md +436 -0
  132. package/entities/customers/customers.config.ts +75 -0
  133. package/entities/customers/customers.fields.ts +165 -0
  134. package/entities/customers/customers.service.ts +516 -0
  135. package/entities/customers/customers.types.ts +83 -0
  136. package/entities/customers/messages/en.json +66 -0
  137. package/entities/customers/messages/es.json +66 -0
  138. package/entities/customers/migrations/001_customers_table.sql +102 -0
  139. package/entities/customers/migrations/002_customers_metas.sql +92 -0
  140. package/entities/pages/messages/en.json +41 -0
  141. package/entities/pages/messages/es.json +41 -0
  142. package/entities/pages/migrations/001_pages_table.sql +112 -0
  143. package/entities/pages/migrations/002_pages_metas.sql +56 -0
  144. package/entities/pages/migrations/003_add_status.sql +50 -0
  145. package/entities/pages/pages-management.service.ts +610 -0
  146. package/entities/pages/pages.config.ts +94 -0
  147. package/entities/pages/pages.fields.ts +101 -0
  148. package/entities/pages/pages.service.ts +290 -0
  149. package/entities/pages/pages.types.ts +124 -0
  150. package/entities/posts/components/post-header.tsx +97 -0
  151. package/entities/posts/messages/en.json +55 -0
  152. package/entities/posts/messages/es.json +55 -0
  153. package/entities/posts/migrations/001_posts_table.sql +115 -0
  154. package/entities/posts/migrations/003_add_status.sql +44 -0
  155. package/entities/posts/migrations/004_entity_taxonomy_relations.sql +129 -0
  156. package/entities/posts/migrations/006_posts_metas.sql +56 -0
  157. package/entities/posts/posts.config.ts +101 -0
  158. package/entities/posts/posts.fields.ts +116 -0
  159. package/entities/posts/posts.service.ts +376 -0
  160. package/entities/posts/posts.types.ts +74 -0
  161. package/entities/tasks/messages/en.json +204 -0
  162. package/entities/tasks/messages/es.json +204 -0
  163. package/entities/tasks/migrations/001_tasks_table.sql +105 -0
  164. package/entities/tasks/migrations/002_task_metas.sql +85 -0
  165. package/entities/tasks/migrations/sample_data.json +77 -0
  166. package/entities/tasks/tasks.config.ts +79 -0
  167. package/entities/tasks/tasks.fields.ts +196 -0
  168. package/entities/tasks/tasks.service.ts +541 -0
  169. package/entities/tasks/tasks.types.ts +56 -0
  170. package/lib/hooks/useAiChat.ts +114 -0
  171. package/lib/hooks/useConversations.ts +376 -0
  172. package/lib/hooks/useOrchestratorChat.ts +122 -0
  173. package/lib/hooks/usePersistentChat.ts +315 -0
  174. package/lib/hooks/useStreamingChat.ts +127 -0
  175. package/lib/hooks/useTokenUsage.ts +63 -0
  176. package/lib/langchain/agents/customer-assistant.md +69 -0
  177. package/lib/langchain/agents/index.ts +61 -0
  178. package/lib/langchain/agents/orchestrator.md +59 -0
  179. package/lib/langchain/agents/page-assistant.md +85 -0
  180. package/lib/langchain/agents/single-agent.md +46 -0
  181. package/lib/langchain/agents/task-assistant.md +55 -0
  182. package/lib/langchain/config.ts +45 -0
  183. package/lib/langchain/handlers/customer-handler.ts +338 -0
  184. package/lib/langchain/handlers/page-handler.ts +232 -0
  185. package/lib/langchain/handlers/task-handler.ts +323 -0
  186. package/lib/langchain/langchain.config.ts +223 -0
  187. package/lib/langchain/observability.config.ts +30 -0
  188. package/lib/langchain/orchestrator.ts +562 -0
  189. package/lib/langchain/tools/customers.ts +176 -0
  190. package/lib/langchain/tools/index.ts +10 -0
  191. package/lib/langchain/tools/orchestrator.ts +92 -0
  192. package/lib/langchain/tools/pages.ts +289 -0
  193. package/lib/langchain/tools/tasks.ts +167 -0
  194. package/lib/scheduled-actions/billing.ts +149 -0
  195. package/lib/scheduled-actions/index.ts +170 -0
  196. package/lib/scheduled-actions/webhook.ts +231 -0
  197. package/lib/selectors.ts +197 -0
  198. package/messages/de/admin.json +219 -0
  199. package/messages/de/aiUsage.json +36 -0
  200. package/messages/de/buttons.json +19 -0
  201. package/messages/de/categories.json +35 -0
  202. package/messages/de/common.json +16 -0
  203. package/messages/de/dev.json +101 -0
  204. package/messages/de/docs.json +27 -0
  205. package/messages/de/entities.json +7 -0
  206. package/messages/de/features.json +119 -0
  207. package/messages/de/footer.json +22 -0
  208. package/messages/de/home.json +57 -0
  209. package/messages/de/index.ts +39 -0
  210. package/messages/de/mobileNav.json +13 -0
  211. package/messages/de/navigation.json +8 -0
  212. package/messages/de/observability.json +74 -0
  213. package/messages/de/posts.json +54 -0
  214. package/messages/de/pricing.json +102 -0
  215. package/messages/de/support.json +9 -0
  216. package/messages/de/teams.json +8 -0
  217. package/messages/en/admin.json +219 -0
  218. package/messages/en/aiUsage.json +36 -0
  219. package/messages/en/buttons.json +19 -0
  220. package/messages/en/categories.json +35 -0
  221. package/messages/en/common.json +16 -0
  222. package/messages/en/dev.json +106 -0
  223. package/messages/en/docs.json +27 -0
  224. package/messages/en/entities.json +7 -0
  225. package/messages/en/features.json +119 -0
  226. package/messages/en/footer.json +22 -0
  227. package/messages/en/home.json +57 -0
  228. package/messages/en/index.ts +39 -0
  229. package/messages/en/mobileNav.json +13 -0
  230. package/messages/en/navigation.json +8 -0
  231. package/messages/en/observability.json +74 -0
  232. package/messages/en/posts.json +54 -0
  233. package/messages/en/pricing.json +102 -0
  234. package/messages/en/support.json +9 -0
  235. package/messages/en/teams.json +8 -0
  236. package/messages/es/admin.json +219 -0
  237. package/messages/es/aiUsage.json +36 -0
  238. package/messages/es/buttons.json +19 -0
  239. package/messages/es/categories.json +35 -0
  240. package/messages/es/common.json +16 -0
  241. package/messages/es/dev.json +101 -0
  242. package/messages/es/docs.json +27 -0
  243. package/messages/es/entities.json +7 -0
  244. package/messages/es/features.json +119 -0
  245. package/messages/es/footer.json +22 -0
  246. package/messages/es/home.json +57 -0
  247. package/messages/es/index.ts +39 -0
  248. package/messages/es/mobileNav.json +13 -0
  249. package/messages/es/navigation.json +8 -0
  250. package/messages/es/observability.json +74 -0
  251. package/messages/es/posts.json +54 -0
  252. package/messages/es/pricing.json +102 -0
  253. package/messages/es/support.json +9 -0
  254. package/messages/es/teams.json +8 -0
  255. package/messages/fr/admin.json +219 -0
  256. package/messages/fr/aiUsage.json +36 -0
  257. package/messages/fr/buttons.json +19 -0
  258. package/messages/fr/categories.json +35 -0
  259. package/messages/fr/common.json +16 -0
  260. package/messages/fr/dev.json +101 -0
  261. package/messages/fr/docs.json +27 -0
  262. package/messages/fr/entities.json +7 -0
  263. package/messages/fr/features.json +119 -0
  264. package/messages/fr/footer.json +22 -0
  265. package/messages/fr/home.json +57 -0
  266. package/messages/fr/index.ts +39 -0
  267. package/messages/fr/mobileNav.json +13 -0
  268. package/messages/fr/navigation.json +8 -0
  269. package/messages/fr/observability.json +74 -0
  270. package/messages/fr/posts.json +54 -0
  271. package/messages/fr/pricing.json +102 -0
  272. package/messages/fr/support.json +9 -0
  273. package/messages/fr/teams.json +8 -0
  274. package/messages/it/admin.json +219 -0
  275. package/messages/it/aiUsage.json +36 -0
  276. package/messages/it/buttons.json +19 -0
  277. package/messages/it/categories.json +35 -0
  278. package/messages/it/common.json +16 -0
  279. package/messages/it/dev.json +101 -0
  280. package/messages/it/docs.json +27 -0
  281. package/messages/it/entities.json +7 -0
  282. package/messages/it/features.json +119 -0
  283. package/messages/it/footer.json +22 -0
  284. package/messages/it/home.json +57 -0
  285. package/messages/it/index.ts +39 -0
  286. package/messages/it/mobileNav.json +13 -0
  287. package/messages/it/navigation.json +8 -0
  288. package/messages/it/observability.json +74 -0
  289. package/messages/it/posts.json +54 -0
  290. package/messages/it/pricing.json +102 -0
  291. package/messages/it/support.json +9 -0
  292. package/messages/it/teams.json +8 -0
  293. package/messages/pt/admin.json +219 -0
  294. package/messages/pt/aiUsage.json +36 -0
  295. package/messages/pt/buttons.json +19 -0
  296. package/messages/pt/categories.json +35 -0
  297. package/messages/pt/common.json +16 -0
  298. package/messages/pt/dev.json +101 -0
  299. package/messages/pt/docs.json +27 -0
  300. package/messages/pt/entities.json +7 -0
  301. package/messages/pt/features.json +119 -0
  302. package/messages/pt/footer.json +22 -0
  303. package/messages/pt/home.json +57 -0
  304. package/messages/pt/index.ts +39 -0
  305. package/messages/pt/mobileNav.json +13 -0
  306. package/messages/pt/navigation.json +8 -0
  307. package/messages/pt/observability.json +74 -0
  308. package/messages/pt/posts.json +54 -0
  309. package/messages/pt/pricing.json +102 -0
  310. package/messages/pt/support.json +9 -0
  311. package/messages/pt/teams.json +8 -0
  312. package/migrations/089_add_editor_team_role.sql +39 -0
  313. package/migrations/090_demo_users_teams.sql +540 -0
  314. package/migrations/091_greek_teams_billing.sql +523 -0
  315. package/migrations/092_billing_sample_data.sql +774 -0
  316. package/migrations/093_pages_sample_data.sql +1158 -0
  317. package/migrations/094_posts_sample_data.sql +278 -0
  318. package/migrations/095_tasks_sample_data.sql +440 -0
  319. package/migrations/096_customers_sample_data.sql +358 -0
  320. package/migrations/097_scheduled_actions_sample_data.sql +111 -0
  321. package/package.json +22 -0
  322. package/public/docs/desktop-layout-example.png +0 -0
  323. package/styles/components.css +11 -0
  324. package/styles/globals.css +179 -0
  325. package/templates/(public)/blog/[slug]/page.tsx +65 -0
  326. package/templates/(public)/layout.tsx +25 -0
  327. package/templates/(public)/page.tsx +200 -0
  328. package/templates/(public)/support/page.tsx +321 -0
  329. package/templates/dashboard/(main)/agent-multi/page.tsx +63 -0
  330. package/templates/dashboard/(main)/agent-single/page.tsx +142 -0
  331. package/templates/dashboard/(main)/settings/ai-usage/page.tsx +157 -0
  332. package/templates/superadmin/ai-observability/[traceId]/page.tsx +27 -0
  333. package/templates/superadmin/ai-observability/page.tsx +17 -0
@@ -0,0 +1,204 @@
1
+ {
2
+ "title": "Mis Tareas",
3
+ "subtitle": "Organiza tu trabajo y mantén el control de tus proyectos.",
4
+ "description": "Organiza tu trabajo y mantén el control de tus proyectos.",
5
+ "stats": {
6
+ "active": "Activas",
7
+ "completed": "Completadas",
8
+ "total": "Total de Tareas",
9
+ "totalDescription": "Todas las tareas del sistema",
10
+ "pending": "Pendientes",
11
+ "pendingDescription": "Tareas esperando ser completadas",
12
+ "overdue": "Vencidas"
13
+ },
14
+ "form": {
15
+ "addTitle": "Agregar Nueva Tarea",
16
+ "addDescription": "Crea una nueva tarea para mantener el control de lo que necesitas hacer",
17
+ "titleLabel": "Título de la tarea",
18
+ "titlePlaceholder": "¿Qué necesitas hacer?",
19
+ "titleDescription": "Ingresa el título de la nueva tarea. Este campo es obligatorio.",
20
+ "descriptionLabel": "Descripción de la tarea (opcional)",
21
+ "descriptionPlaceholder": "Agrega una descripción (opcional)",
22
+ "descriptionHelp": "Descripción opcional para proporcionar más detalles sobre la tarea.",
23
+ "addButton": "Agregar Tarea",
24
+ "adding": "Agregando...",
25
+ "enterTitle": "Ingresa un título para habilitar el botón de crear tarea",
26
+ "creating": "Creando tarea, por favor espera",
27
+ "pressToCreate": "Presiona para crear la nueva tarea",
28
+ "addSuccess": "¡Tarea agregada exitosamente!",
29
+ "addError": "Error al agregar tarea",
30
+ "tryAgain": "Por favor intenta de nuevo más tarde",
31
+ "taskCreated": "Tarea \"{title}\" creada correctamente",
32
+ "createError": "Error al crear la tarea \"{title}\""
33
+ },
34
+ "task": {
35
+ "completed": "completada",
36
+ "active": "activa",
37
+ "deleteConfirm": "¿Estás seguro de que quieres eliminar esta tarea?",
38
+ "deleteSuccess": "Tarea eliminada exitosamente",
39
+ "toggleSuccess": "Estado de tarea actualizado"
40
+ },
41
+ "overview": {
42
+ "title": "Resumen de Tareas",
43
+ "label": "Resumen de tareas",
44
+ "activeTasks": "{count} tareas activas",
45
+ "completedTasks": "{count} tareas completadas",
46
+ "totalTasks": "{count} tareas en total"
47
+ },
48
+ "actions": {
49
+ "completed": "¡Tarea completada!",
50
+ "reactivated": "¡Tarea reactivada!",
51
+ "deleted": "Tarea eliminada",
52
+ "markCompleted": "completada",
53
+ "markPending": "pendiente",
54
+ "taskStatusChanged": "Tarea \"{title}\" {action}",
55
+ "taskDeleted": "Tarea \"{title}\" eliminada",
56
+ "toggleError": "Error al cambiar el estado de la tarea \"{title}\"",
57
+ "deleteError": "Error al eliminar tarea",
58
+ "updateError": "Error al actualizar tarea"
59
+ },
60
+ "status": {
61
+ "completed": "Completada",
62
+ "pending": "Pendiente",
63
+ "active": "Activa",
64
+ "todo": "Por Hacer",
65
+ "in-progress": "En Progreso",
66
+ "review": "En Revisión",
67
+ "done": "Completada",
68
+ "blocked": "Bloqueada"
69
+ },
70
+ "priority": {
71
+ "low": "Baja",
72
+ "medium": "Media",
73
+ "high": "Alta",
74
+ "urgent": "Urgente"
75
+ },
76
+ "fields": {
77
+ "status": "Estado",
78
+ "priority": "Prioridad",
79
+ "tags": "Etiquetas",
80
+ "dueDate": "Fecha Límite",
81
+ "estimatedHours": "Horas Estimadas",
82
+ "tagsPlaceholder": "Agregar etiquetas...",
83
+ "dueDatePlaceholder": "Seleccionar fecha límite...",
84
+ "estimatedHoursPlaceholder": "0",
85
+ "statusDescription": "Estado actual de la tarea",
86
+ "priorityDescription": "Nivel de prioridad de la tarea",
87
+ "tagsDescription": "Etiquetas para categorizar la tarea",
88
+ "dueDateDescription": "Fecha límite de la tarea",
89
+ "estimatedHoursDescription": "Tiempo estimado para completar (en horas)"
90
+ },
91
+ "sections": {
92
+ "activeTasks": "Tareas Activas",
93
+ "completedTasks": "Tareas Completadas"
94
+ },
95
+ "empty": {
96
+ "title": "Aún no tienes tareas",
97
+ "description": "¡Agrega tu primera tarea arriba para empezar!"
98
+ },
99
+ "accessibility": {
100
+ "taskCard": "Tarea: {title}. {status}. Presiona Enter para ver detalles.",
101
+ "completedTaskCard": "Tarea completada: {title}. Presiona Enter para ver detalles.",
102
+ "toggleTask": "Marcar tarea \"{title}\" como {action}",
103
+ "reactivateTask": "Reactivar tarea completada \"{title}\"",
104
+ "deleteTask": "Eliminar tarea \"{title}\"",
105
+ "deleteCompletedTask": "Eliminar tarea completada \"{title}\"",
106
+ "createdDate": "Creada el {date}",
107
+ "completedDate": "Completada el {date}"
108
+ },
109
+ "time": {
110
+ "daysAgo": "hace {count} día{count, plural, one {} other {s}}",
111
+ "hoursAgo": "hace {count} hora{count, plural, one {} other {s}}",
112
+ "minutesAgo": "hace {count} minuto{count, plural, one {} other {s}}",
113
+ "justNow": "hace un momento"
114
+ },
115
+ "page": {
116
+ "statsAriaLabel": "Estadísticas de tareas",
117
+ "listTitle": "Lista de Tareas",
118
+ "listDescription": "Gestiona tus tareas pendientes y organizate mejor",
119
+ "today": "Hoy"
120
+ },
121
+ "list": {
122
+ "title": "Lista de Tareas",
123
+ "description": "Gestiona todas tus tareas en un solo lugar",
124
+ "allTasks": "Todas las Tareas"
125
+ },
126
+ "detail": {
127
+ "loading": {
128
+ "message": "Cargando detalles de la tarea",
129
+ "ariaLabel": "Cargando detalles de la tarea",
130
+ "srText": "Cargando detalles de la tarea..."
131
+ },
132
+ "navigation": {
133
+ "backToTasks": "Volver a Tareas",
134
+ "backAriaLabel": "Volver a la lista de tareas",
135
+ "returnNavigation": "Navegación de retorno",
136
+ "viewAllTasks": "Ver todas las tareas",
137
+ "viewAllDescription": "Navegar de vuelta a la lista completa de tareas"
138
+ },
139
+ "error": {
140
+ "notFound": "No se pudo encontrar la tarea solicitada. Es posible que haya sido eliminada o no tengas permisos para verla.",
141
+ "title": "Tarea no encontrada"
142
+ },
143
+ "status": {
144
+ "completed": "Completada",
145
+ "pending": "Pendiente",
146
+ "active": "En progreso",
147
+ "completedAriaLabel": "Tarea completada",
148
+ "pendingAriaLabel": "Tarea pendiente"
149
+ },
150
+ "priority": {
151
+ "high": "Alta",
152
+ "medium": "Media",
153
+ "low": "Baja",
154
+ "label": "Prioridad"
155
+ },
156
+ "categories": {
157
+ "design": "Diseño",
158
+ "development": "Desarrollo",
159
+ "meetings": "Reuniones",
160
+ "documentation": "Documentación",
161
+ "testing": "Testing",
162
+ "general": "General"
163
+ },
164
+ "sections": {
165
+ "description": "Descripción",
166
+ "actions": "Acciones",
167
+ "information": "Información",
168
+ "classification": "Clasificación",
169
+ "metadata": "Metadatos de la tarea"
170
+ },
171
+ "actions": {
172
+ "title": "Acciones",
173
+ "description": "Gestiona el estado y opciones de esta tarea. Atajos de teclado: Cmd+Enter para completar, Cmd+Backspace para eliminar.",
174
+ "markPending": "Marcar Pendiente",
175
+ "markCompleted": "Marcar Completada",
176
+ "delete": "Eliminar",
177
+ "markPendingAriaLabel": "Marcar tarea \"{title}\" como pendiente. Atajo: Cmd+Enter",
178
+ "markCompletedAriaLabel": "Marcar tarea \"{title}\" como completada. Atajo: Cmd+Enter",
179
+ "deleteAriaLabel": "Eliminar permanentemente la tarea \"{title}\" Atajo: Cmd+Backspace"
180
+ },
181
+ "info": {
182
+ "created": "Creada",
183
+ "lastUpdate": "Última actualización",
184
+ "status": "Estado",
185
+ "priority": "Prioridad",
186
+ "category": "Categoría",
187
+ "taskId": "ID de la tarea",
188
+ "noDescription": "No hay descripción disponible para esta tarea.",
189
+ "inferredInfo": "Información inferida automáticamente"
190
+ },
191
+ "messages": {
192
+ "taskCompleted": "Tarea \"{title}\" completada correctamente",
193
+ "taskReactivated": "Tarea \"{title}\" reactivada correctamente",
194
+ "taskDeleted": "Tarea \"{title}\" eliminada correctamente",
195
+ "toggleError": "Error al cambiar el estado de la tarea \"{title}\"",
196
+ "deleteError": "Error al eliminar la tarea \"{title}\"",
197
+ "completedToast": "Tarea completada",
198
+ "reactivatedToast": "Tarea reactivada",
199
+ "deletedToast": "Tarea eliminada",
200
+ "updateErrorToast": "Error al actualizar la tarea",
201
+ "deleteErrorToast": "Error al eliminar la tarea"
202
+ }
203
+ }
204
+ }
@@ -0,0 +1,105 @@
1
+ -- Migration: 001_tasks_table.sql
2
+ -- Description: Tasks (table, indexes, RLS)
3
+ -- Date: 2025-01-19
4
+ -- Updated: 2025-11-26 (Phase 2 - Team Isolation)
5
+
6
+ -- ============================================
7
+ -- TABLE
8
+ -- ============================================
9
+ DROP TABLE IF EXISTS public."tasks" CASCADE;
10
+
11
+ CREATE TABLE IF NOT EXISTS public."tasks" (
12
+ -- Primary Key
13
+ id TEXT PRIMARY KEY DEFAULT gen_random_uuid()::text,
14
+
15
+ -- Relational Fields (al inicio)
16
+ "userId" TEXT NOT NULL REFERENCES public."users"(id) ON DELETE CASCADE,
17
+ "teamId" TEXT NOT NULL REFERENCES public."teams"(id) ON DELETE CASCADE,
18
+
19
+ -- Entity-specific fields
20
+ title TEXT NOT NULL,
21
+ description TEXT,
22
+ completed BOOLEAN DEFAULT false,
23
+ status TEXT NOT NULL DEFAULT 'todo',
24
+ priority TEXT NOT NULL DEFAULT 'medium',
25
+ tags JSONB DEFAULT '[]'::jsonb,
26
+ "dueDate" DATE,
27
+ "estimatedHours" NUMERIC(5,2),
28
+
29
+ -- System fields
30
+ "createdAt" TIMESTAMPTZ NOT NULL DEFAULT now(),
31
+ "updatedAt" TIMESTAMPTZ NOT NULL DEFAULT now(),
32
+
33
+ -- Constraints
34
+ CONSTRAINT tasks_status_check CHECK (status IN ('todo', 'in-progress', 'review', 'done', 'blocked')),
35
+ CONSTRAINT tasks_priority_check CHECK (priority IN ('low', 'medium', 'high', 'urgent')),
36
+ CONSTRAINT tasks_estimated_hours_positive CHECK ("estimatedHours" IS NULL OR "estimatedHours" > 0)
37
+ );
38
+
39
+ COMMENT ON TABLE public."tasks" IS 'Tasks table with team isolation via RLS';
40
+ COMMENT ON COLUMN public."tasks"."userId" IS 'Owner user id (user isolation handled at app level)';
41
+ COMMENT ON COLUMN public."tasks"."teamId" IS 'Team context for isolation';
42
+ COMMENT ON COLUMN public."tasks".title IS 'Task title or name';
43
+ COMMENT ON COLUMN public."tasks".description IS 'Detailed task description';
44
+ COMMENT ON COLUMN public."tasks".completed IS 'Task completion status (legacy)';
45
+ COMMENT ON COLUMN public."tasks".status IS 'Task status: todo, in-progress, review, done, blocked';
46
+ COMMENT ON COLUMN public."tasks".priority IS 'Task priority: low, medium, high, urgent';
47
+ COMMENT ON COLUMN public."tasks".tags IS 'Task tags for categorization';
48
+ COMMENT ON COLUMN public."tasks"."dueDate" IS 'Task deadline (date only)';
49
+ COMMENT ON COLUMN public."tasks"."estimatedHours" IS 'Estimated time to complete in hours';
50
+
51
+ -- ============================================
52
+ -- TRIGGER updatedAt (uses Better Auth function)
53
+ -- ============================================
54
+ DROP TRIGGER IF EXISTS tasks_set_updated_at ON public."tasks";
55
+ CREATE TRIGGER tasks_set_updated_at
56
+ BEFORE UPDATE ON public."tasks"
57
+ FOR EACH ROW EXECUTE FUNCTION public.set_updated_at();
58
+
59
+ -- ============================================
60
+ -- INDEXES
61
+ -- ============================================
62
+ CREATE INDEX IF NOT EXISTS idx_tasks_user_id ON public."tasks"("userId");
63
+ CREATE INDEX IF NOT EXISTS idx_tasks_team_id ON public."tasks"("teamId");
64
+ CREATE INDEX IF NOT EXISTS idx_tasks_user_team ON public."tasks"("userId", "teamId");
65
+ CREATE INDEX IF NOT EXISTS idx_tasks_user_created_at ON public."tasks"("userId", "createdAt");
66
+ CREATE INDEX IF NOT EXISTS idx_tasks_completed ON public."tasks"(completed);
67
+ CREATE INDEX IF NOT EXISTS idx_tasks_status ON public."tasks"(status);
68
+ CREATE INDEX IF NOT EXISTS idx_tasks_priority ON public."tasks"(priority);
69
+ CREATE INDEX IF NOT EXISTS idx_tasks_due_date ON public."tasks"("dueDate") WHERE "dueDate" IS NOT NULL;
70
+ CREATE INDEX IF NOT EXISTS idx_tasks_tags ON public."tasks" USING GIN(tags);
71
+ CREATE INDEX IF NOT EXISTS idx_tasks_user_status_due ON public."tasks"("userId", status, "dueDate");
72
+ CREATE INDEX IF NOT EXISTS idx_tasks_team_created ON public."tasks"("teamId", "createdAt" DESC);
73
+
74
+ -- ============================================
75
+ -- RLS
76
+ -- ============================================
77
+ ALTER TABLE public."tasks" ENABLE ROW LEVEL SECURITY;
78
+
79
+ -- Cleanup existing policies
80
+ DROP POLICY IF EXISTS "Tasks owner can do all" ON public."tasks";
81
+ DROP POLICY IF EXISTS "Tasks team can do all" ON public."tasks";
82
+ DROP POLICY IF EXISTS tasks_owner_policy ON public."tasks";
83
+ DROP POLICY IF EXISTS tasks_owner_all ON public."tasks";
84
+
85
+ -- ============================
86
+ -- RLS: TEAM ISOLATION ONLY
87
+ -- ============================
88
+ -- IMPORTANTE: RLS solo verifica team membership
89
+ -- La lógica de access.shared (user isolation) se maneja a NIVEL APP
90
+ -- Esto permite cambiar el comportamiento desde el config sin modificar RLS
91
+ CREATE POLICY "Tasks team can do all"
92
+ ON public."tasks"
93
+ FOR ALL TO authenticated
94
+ USING (
95
+ -- Superadmin bypass
96
+ public.is_superadmin()
97
+ OR
98
+ -- Team isolation: user must be member of the team
99
+ "teamId" = ANY(public.get_user_team_ids())
100
+ )
101
+ WITH CHECK (
102
+ public.is_superadmin()
103
+ OR
104
+ "teamId" = ANY(public.get_user_team_ids())
105
+ );
@@ -0,0 +1,85 @@
1
+ -- Migration: 002_tasks_metas.sql
2
+ -- Description: Tasks metas (table, indexes, RLS) - Updated to new conventions
3
+ -- Date: 2025-01-19
4
+ -- Updated: 2025-11-26 (Phase 2 - Team Isolation via parent)
5
+
6
+ -- ============================================
7
+ -- TABLE
8
+ -- ============================================
9
+ CREATE TABLE IF NOT EXISTS public."tasks_metas" (
10
+ id TEXT PRIMARY KEY DEFAULT gen_random_uuid()::text,
11
+ "entityId" TEXT NOT NULL REFERENCES public."tasks"(id) ON DELETE CASCADE,
12
+ "metaKey" TEXT NOT NULL,
13
+ "metaValue" JSONB NOT NULL DEFAULT '{}'::jsonb,
14
+ "dataType" TEXT DEFAULT 'json',
15
+ "isPublic" BOOLEAN NOT NULL DEFAULT false,
16
+ "isSearchable" BOOLEAN NOT NULL DEFAULT false,
17
+ "createdAt" TIMESTAMPTZ NOT NULL DEFAULT now(),
18
+ "updatedAt" TIMESTAMPTZ NOT NULL DEFAULT now(),
19
+ CONSTRAINT tasks_metas_unique_key UNIQUE ("entityId", "metaKey")
20
+ );
21
+
22
+ COMMENT ON TABLE public."tasks_metas" IS 'Key-value metadata for tasks';
23
+ COMMENT ON COLUMN public."tasks_metas"."entityId" IS 'Reference to parent task (generic entityId)';
24
+ COMMENT ON COLUMN public."tasks_metas"."metaKey" IS 'Metadata key identifier';
25
+ COMMENT ON COLUMN public."tasks_metas"."metaValue" IS 'Metadata value in JSONB format';
26
+ COMMENT ON COLUMN public."tasks_metas"."dataType" IS 'Type hint for the value: json, string, number, boolean';
27
+ COMMENT ON COLUMN public."tasks_metas"."isPublic" IS 'Whether this metadata is publicly readable';
28
+ COMMENT ON COLUMN public."tasks_metas"."isSearchable" IS 'Whether this metadata is searchable';
29
+
30
+ -- ============================================
31
+ -- TRIGGER updatedAt (uses Better Auth function)
32
+ -- ============================================
33
+ DROP TRIGGER IF EXISTS tasks_metas_set_updated_at ON public."tasks_metas";
34
+ CREATE TRIGGER tasks_metas_set_updated_at
35
+ BEFORE UPDATE ON public."tasks_metas"
36
+ FOR EACH ROW EXECUTE FUNCTION public.set_updated_at();
37
+
38
+ -- ============================================
39
+ -- INDEXES
40
+ -- ============================================
41
+ CREATE INDEX IF NOT EXISTS idx_tasks_metas_entity_id ON public."tasks_metas"("entityId");
42
+ CREATE INDEX IF NOT EXISTS idx_tasks_metas_key ON public."tasks_metas"("metaKey");
43
+ CREATE INDEX IF NOT EXISTS idx_tasks_metas_is_public ON public."tasks_metas"("isPublic") WHERE "isPublic" = true;
44
+ CREATE INDEX IF NOT EXISTS idx_tasks_metas_is_searchable ON public."tasks_metas"("isSearchable") WHERE "isSearchable" = true;
45
+ CREATE INDEX IF NOT EXISTS idx_tasks_metas_value_gin ON public."tasks_metas" USING GIN ("metaValue");
46
+ CREATE INDEX IF NOT EXISTS idx_tasks_metas_value_ops ON public."tasks_metas" USING GIN ("metaValue" jsonb_path_ops);
47
+
48
+ -- ============================================
49
+ -- RLS
50
+ -- ============================================
51
+ ALTER TABLE public."tasks_metas" ENABLE ROW LEVEL SECURITY;
52
+
53
+ -- Cleanup existing policies
54
+ DROP POLICY IF EXISTS "Tasks metas owner can do all" ON public."tasks_metas";
55
+ DROP POLICY IF EXISTS "Tasks metas team can do all" ON public."tasks_metas";
56
+ DROP POLICY IF EXISTS tasks_metas_owner_policy ON public."tasks_metas";
57
+
58
+ -- ============================
59
+ -- RLS: TEAM ISOLATION VIA PARENT
60
+ -- ============================
61
+ -- Hereda el aislamiento del parent task via teamId
62
+ -- La lógica de access.shared se maneja a NIVEL APP
63
+ CREATE POLICY "Tasks metas team can do all"
64
+ ON public."tasks_metas"
65
+ FOR ALL TO authenticated
66
+ USING (
67
+ -- Superadmin bypass
68
+ public.is_superadmin()
69
+ OR
70
+ -- Team isolation via parent task
71
+ EXISTS (
72
+ SELECT 1 FROM public."tasks" t
73
+ WHERE t.id = "entityId"
74
+ AND t."teamId" = ANY(public.get_user_team_ids())
75
+ )
76
+ )
77
+ WITH CHECK (
78
+ public.is_superadmin()
79
+ OR
80
+ EXISTS (
81
+ SELECT 1 FROM public."tasks" t
82
+ WHERE t.id = "entityId"
83
+ AND t."teamId" = ANY(public.get_user_team_ids())
84
+ )
85
+ );
@@ -0,0 +1,77 @@
1
+ [
2
+ {
3
+ "title": "Setup project repository and CI/CD pipeline",
4
+ "description": "Initialize git repository, configure GitHub Actions for automated testing and deployment",
5
+ "completed": false
6
+ },
7
+ {
8
+ "title": "Design database schema for user management",
9
+ "description": "Create ERD and database migrations for user authentication, roles, and permissions",
10
+ "completed": true
11
+ },
12
+ {
13
+ "title": "Implement API authentication middleware",
14
+ "description": "Develop JWT-based authentication system with refresh tokens and rate limiting",
15
+ "completed": false
16
+ },
17
+ {
18
+ "title": "Create responsive frontend components",
19
+ "description": "Build reusable React components with TypeScript and Tailwind CSS styling",
20
+ "completed": false
21
+ },
22
+ {
23
+ "title": "Write comprehensive unit tests",
24
+ "description": "Achieve 80%+ code coverage with Jest and React Testing Library",
25
+ "completed": false
26
+ },
27
+ {
28
+ "title": "Optimize database queries and indexing",
29
+ "description": "Analyze slow queries and implement proper database indexes for performance",
30
+ "completed": true
31
+ },
32
+ {
33
+ "title": "Integrate payment processing system",
34
+ "description": "Implement Stripe integration for subscription management and billing",
35
+ "completed": false
36
+ },
37
+ {
38
+ "title": "Setup monitoring and logging infrastructure",
39
+ "description": "Configure application monitoring with alerts and centralized logging",
40
+ "completed": false
41
+ },
42
+ {
43
+ "title": "Conduct security vulnerability assessment",
44
+ "description": "Perform penetration testing and fix identified security issues",
45
+ "completed": true
46
+ },
47
+ {
48
+ "title": "Implement real-time notifications",
49
+ "description": "Add WebSocket support for live updates and push notifications",
50
+ "completed": false
51
+ },
52
+ {
53
+ "title": "Create API documentation with OpenAPI",
54
+ "description": "Generate interactive API documentation using Swagger/OpenAPI specification",
55
+ "completed": false
56
+ },
57
+ {
58
+ "title": "Setup email service integration",
59
+ "description": "Configure transactional email service for user notifications and marketing",
60
+ "completed": true
61
+ },
62
+ {
63
+ "title": "Implement data backup and recovery system",
64
+ "description": "Setup automated database backups with disaster recovery procedures",
65
+ "completed": false
66
+ },
67
+ {
68
+ "title": "Optimize frontend bundle size and performance",
69
+ "description": "Implement code splitting, lazy loading, and performance optimizations",
70
+ "completed": false
71
+ },
72
+ {
73
+ "title": "Deploy application to production environment",
74
+ "description": "Configure production deployment with load balancing and SSL certificates",
75
+ "completed": false
76
+ }
77
+ ]
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Task Entity Configuration - REFACTORED
3
+ *
4
+ * Updated according to new 5-section structure from refactoring plan.
5
+ * All table names, API paths, and metadata are now derived automatically from slug.
6
+ */
7
+
8
+ import { CheckSquare } from 'lucide-react'
9
+ import type { EntityConfig } from '@nextsparkjs/core/lib/entities/types'
10
+ import { taskFields } from './tasks.fields'
11
+
12
+ export const taskEntityConfig: EntityConfig = {
13
+ // ==========================================
14
+ // 1. BASIC IDENTIFICATION
15
+ // ==========================================
16
+ slug: 'tasks', // Single source of truth - derives tableName, apiPath, metaTableName, i18nNamespace
17
+ enabled: true,
18
+ names: {
19
+ singular: 'task',
20
+ plural: 'Tasks'
21
+ },
22
+ icon: CheckSquare,
23
+
24
+ // ==========================================
25
+ // 2. ACCESS AND SCOPE CONFIGURATION
26
+ // ==========================================
27
+ access: {
28
+ public: false, // If accessible without authentication, requires RLS (anon can select)
29
+ api: true, // If has external API via API key
30
+ metadata: true, // If supports metadata system
31
+ shared: false // CASE 2: Any authenticated user can access all records (no userId filter)
32
+ },
33
+
34
+ // ==========================================
35
+ // 3. UI/UX FEATURES
36
+ // ==========================================
37
+ ui: {
38
+ dashboard: {
39
+ showInMenu: true,
40
+ showInTopbar: true,
41
+ filters: [
42
+ { field: 'status', type: 'multiSelect' },
43
+ { field: 'priority', type: 'multiSelect' },
44
+ ],
45
+ },
46
+ public: {
47
+ hasArchivePage: false,
48
+ hasSinglePage: false
49
+ },
50
+ features: {
51
+ searchable: true,
52
+ sortable: true,
53
+ filterable: true,
54
+ bulkOperations: true,
55
+ importExport: false
56
+ }
57
+ },
58
+
59
+ // ==========================================
60
+ // 4. PERMISSIONS SYSTEM
61
+ // ==========================================
62
+ // Permissions are now centralized in permissions.config.ts
63
+ // See: contents/themes/default/permissions.config.ts -> entities.tasks
64
+
65
+ // ==========================================
66
+ // FIELDS (imported from separate file)
67
+ // ==========================================
68
+ fields: taskFields,
69
+
70
+ // ==========================================
71
+ // AUTOMATIC SYSTEM DERIVATIONS
72
+ // ==========================================
73
+ // The following properties are automatically derived from the slug:
74
+ // - tableName: 'tasks' (slug)
75
+ // - metaTableName: 'tasks_metas' (slug + '_metas')
76
+ // - apiPath: '/api/v1/tasks' (slug API Route)
77
+ // - i18nNamespace: 'tasks' (slug as namespace)
78
+ // - foreignKey in metadata: 'entityId' (generic for all entities)
79
+ }