@nextsparkjs/theme-productivity 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 (57) hide show
  1. package/README.md +76 -0
  2. package/about.md +123 -0
  3. package/components/CardDetailModal.tsx +318 -0
  4. package/components/KanbanBoard.tsx +612 -0
  5. package/components/KanbanCard.tsx +218 -0
  6. package/components/KanbanColumn.tsx +264 -0
  7. package/components/SortableList.tsx +46 -0
  8. package/components/index.ts +4 -0
  9. package/config/app.config.ts +172 -0
  10. package/config/billing.config.ts +187 -0
  11. package/config/dashboard.config.ts +357 -0
  12. package/config/dev.config.ts +55 -0
  13. package/config/features.config.ts +256 -0
  14. package/config/flows.config.ts +484 -0
  15. package/config/permissions.config.ts +167 -0
  16. package/config/theme.config.ts +106 -0
  17. package/entities/boards/boards.config.ts +61 -0
  18. package/entities/boards/boards.fields.ts +154 -0
  19. package/entities/boards/boards.service.ts +256 -0
  20. package/entities/boards/boards.types.ts +57 -0
  21. package/entities/boards/messages/en.json +80 -0
  22. package/entities/boards/messages/es.json +80 -0
  23. package/entities/boards/migrations/001_boards_table.sql +83 -0
  24. package/entities/cards/cards.config.ts +61 -0
  25. package/entities/cards/cards.fields.ts +242 -0
  26. package/entities/cards/cards.service.ts +336 -0
  27. package/entities/cards/cards.types.ts +79 -0
  28. package/entities/cards/messages/en.json +114 -0
  29. package/entities/cards/messages/es.json +114 -0
  30. package/entities/cards/migrations/020_cards_table.sql +92 -0
  31. package/entities/lists/lists.config.ts +61 -0
  32. package/entities/lists/lists.fields.ts +105 -0
  33. package/entities/lists/lists.service.ts +252 -0
  34. package/entities/lists/lists.types.ts +55 -0
  35. package/entities/lists/messages/en.json +60 -0
  36. package/entities/lists/messages/es.json +60 -0
  37. package/entities/lists/migrations/010_lists_table.sql +79 -0
  38. package/lib/selectors.ts +206 -0
  39. package/messages/en.json +79 -0
  40. package/messages/es.json +79 -0
  41. package/migrations/999_theme_sample_data.sql +922 -0
  42. package/migrations/999a_initial_sample_data.sql +377 -0
  43. package/migrations/999b_abundant_sample_data.sql +346 -0
  44. package/package.json +17 -0
  45. package/permissions-matrix.md +122 -0
  46. package/styles/components.css +460 -0
  47. package/styles/globals.css +560 -0
  48. package/templates/dashboard/(main)/boards/[id]/[cardId]/page.tsx +238 -0
  49. package/templates/dashboard/(main)/boards/[id]/edit/page.tsx +390 -0
  50. package/templates/dashboard/(main)/boards/[id]/page.tsx +236 -0
  51. package/templates/dashboard/(main)/boards/create/page.tsx +236 -0
  52. package/templates/dashboard/(main)/boards/page.tsx +335 -0
  53. package/templates/dashboard/(main)/layout.tsx +32 -0
  54. package/templates/dashboard/(main)/page.tsx +592 -0
  55. package/templates/shared/ProductivityMobileNav.tsx +410 -0
  56. package/templates/shared/ProductivitySidebar.tsx +538 -0
  57. package/templates/shared/ProductivityTopBar.tsx +317 -0
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Productivity Theme - Development Configuration
3
+ *
4
+ * This file contains development-only settings that should never affect production.
5
+ * Settings like DevKeyring are only rendered in non-production environments.
6
+ *
7
+ * @see core/lib/config/types.ts for DevConfig interface
8
+ */
9
+
10
+ import type { DevConfig } from '@nextsparkjs/core/lib/config/types'
11
+
12
+ export const DEV_CONFIG_OVERRIDES: DevConfig = {
13
+ // =============================================================================
14
+ // DEV KEYRING (Development/QA Only)
15
+ // =============================================================================
16
+ /**
17
+ * DevKeyring - Quick login for Productivity theme (multi-tenant mode)
18
+ * Test different roles across multiple teams
19
+ */
20
+ devKeyring: {
21
+ enabled: true,
22
+ users: [
23
+ {
24
+ id: 'patricia',
25
+ email: 'prod_owner_patricia@nextspark.dev',
26
+ name: 'Patricia Torres',
27
+ password: 'Test1234',
28
+ teamRoles: 'Product Team (owner), Marketing Hub (owner)',
29
+ },
30
+ {
31
+ id: 'lucas',
32
+ email: 'prod_admin_member_lucas@nextspark.dev',
33
+ name: 'Lucas Luna',
34
+ password: 'Test1234',
35
+ teamRoles: 'Product Team (admin), Marketing Hub (member)',
36
+ },
37
+ {
38
+ id: 'diana',
39
+ email: 'prod_member_diana@nextspark.dev',
40
+ name: 'Diana Rios',
41
+ password: 'Test1234',
42
+ teamRoles: 'Product Team (member)',
43
+ },
44
+ {
45
+ id: 'marcos',
46
+ email: 'prod_member_marcos@nextspark.dev',
47
+ name: 'Marcos Silva',
48
+ password: 'Test1234',
49
+ teamRoles: 'Marketing Hub (member)',
50
+ },
51
+ ],
52
+ },
53
+ }
54
+
55
+ export default DEV_CONFIG_OVERRIDES
@@ -0,0 +1,256 @@
1
+ /**
2
+ * Productivity Theme - Features Configuration
3
+ *
4
+ * Defines all features of the application for this theme.
5
+ * Each feature key becomes a tag: @feat-{key}
6
+ *
7
+ * Features are enriched at build-time with:
8
+ * - Entity metadata (from entity-registry)
9
+ * - Permission details (from permissions-registry)
10
+ * - Documentation links (from docs-registry)
11
+ * - Test coverage (from tags-registry + test files)
12
+ */
13
+
14
+ import { defineFeatures } from '@nextsparkjs/core/lib/config/features-types'
15
+
16
+ export default defineFeatures({
17
+ // ===========================================================================
18
+ // BOARD MANAGEMENT FEATURES
19
+ // Project/workspace organization
20
+ // ===========================================================================
21
+
22
+ boards: {
23
+ name: 'Boards',
24
+ description: 'Project boards for organizing work with lists and cards',
25
+ category: 'entities',
26
+ icon: 'layout-dashboard',
27
+ entities: ['boards'],
28
+ permissions: ['boards.*'],
29
+ docs: [],
30
+ },
31
+
32
+ 'board-settings': {
33
+ name: 'Board Settings',
34
+ description: 'Board configuration including name, description, and visibility',
35
+ category: 'boards',
36
+ icon: 'settings',
37
+ entities: ['boards'],
38
+ permissions: ['boards.settings'],
39
+ docs: [],
40
+ },
41
+
42
+ 'board-archive': {
43
+ name: 'Board Archive',
44
+ description: 'Archive boards to hide them from the main view',
45
+ category: 'boards',
46
+ icon: 'archive',
47
+ entities: ['boards'],
48
+ permissions: ['boards.archive'],
49
+ docs: [],
50
+ },
51
+
52
+ // ===========================================================================
53
+ // LIST MANAGEMENT FEATURES
54
+ // Column/list organization within boards
55
+ // ===========================================================================
56
+
57
+ lists: {
58
+ name: 'Lists',
59
+ description: 'Organize cards into lists/columns within boards',
60
+ category: 'entities',
61
+ icon: 'list',
62
+ entities: ['lists'],
63
+ permissions: ['lists.*'],
64
+ docs: [],
65
+ },
66
+
67
+ 'list-reorder': {
68
+ name: 'List Reorder',
69
+ description: 'Drag and drop lists to reorder within a board',
70
+ category: 'lists',
71
+ icon: 'move',
72
+ entities: ['lists'],
73
+ permissions: ['lists.reorder'],
74
+ docs: [],
75
+ },
76
+
77
+ // ===========================================================================
78
+ // CARD MANAGEMENT FEATURES
79
+ // Task/card management
80
+ // ===========================================================================
81
+
82
+ cards: {
83
+ name: 'Cards',
84
+ description: 'Task cards with titles, descriptions, and due dates',
85
+ category: 'entities',
86
+ icon: 'credit-card',
87
+ entities: ['cards'],
88
+ permissions: ['cards.*'],
89
+ docs: [],
90
+ },
91
+
92
+ 'card-move': {
93
+ name: 'Card Move',
94
+ description: 'Drag and drop cards between lists',
95
+ category: 'cards',
96
+ icon: 'move',
97
+ entities: ['cards'],
98
+ permissions: ['cards.move'],
99
+ docs: [],
100
+ },
101
+
102
+ 'card-assign': {
103
+ name: 'Card Assignment',
104
+ description: 'Assign cards to team members',
105
+ category: 'cards',
106
+ icon: 'user-plus',
107
+ entities: ['cards'],
108
+ permissions: ['cards.assign'],
109
+ docs: [],
110
+ },
111
+
112
+ 'card-detail': {
113
+ name: 'Card Detail',
114
+ description: 'Card detail modal with full information and editing',
115
+ category: 'cards',
116
+ icon: 'expand',
117
+ entities: ['cards'],
118
+ permissions: ['cards.read', 'cards.update'],
119
+ docs: [],
120
+ },
121
+
122
+ // ===========================================================================
123
+ // KANBAN FEATURES
124
+ // Visual board management
125
+ // ===========================================================================
126
+
127
+ kanban: {
128
+ name: 'Kanban Board',
129
+ description: 'Visual kanban board interface for managing cards across lists',
130
+ category: 'content',
131
+ icon: 'layout',
132
+ entities: ['boards', 'lists', 'cards'],
133
+ permissions: ['boards.read', 'lists.*', 'cards.*'],
134
+ docs: [],
135
+ },
136
+
137
+ 'drag-drop': {
138
+ name: 'Drag & Drop',
139
+ description: 'Drag and drop functionality for cards and lists',
140
+ category: 'content',
141
+ icon: 'hand',
142
+ entities: ['lists', 'cards'],
143
+ permissions: ['lists.reorder', 'cards.move'],
144
+ docs: [],
145
+ },
146
+
147
+ // ===========================================================================
148
+ // CORE FEATURES
149
+ // Platform-level features
150
+ // ===========================================================================
151
+
152
+ auth: {
153
+ name: 'Authentication',
154
+ description: 'User authentication, sessions, and account security',
155
+ category: 'core',
156
+ icon: 'shield',
157
+ entities: [],
158
+ permissions: ['auth.*'],
159
+ docs: [],
160
+ },
161
+
162
+ teams: {
163
+ name: 'Teams',
164
+ description: 'Multi-tenant team management with workspace switching',
165
+ category: 'core',
166
+ icon: 'users',
167
+ entities: [],
168
+ permissions: ['teams.*', 'members.*', 'invitations.*'],
169
+ docs: [],
170
+ },
171
+
172
+ 'team-switch': {
173
+ name: 'Team Switching',
174
+ description: 'Switch between different teams/workspaces',
175
+ category: 'core',
176
+ icon: 'repeat',
177
+ entities: [],
178
+ permissions: ['teams.*'],
179
+ docs: [],
180
+ },
181
+
182
+ // ===========================================================================
183
+ // SETTINGS FEATURES
184
+ // User and team settings
185
+ // ===========================================================================
186
+
187
+ users: {
188
+ name: 'User Profile',
189
+ description: 'User profile management and preferences',
190
+ category: 'settings',
191
+ icon: 'user',
192
+ entities: [],
193
+ permissions: ['profile.*'],
194
+ docs: [],
195
+ },
196
+
197
+ notifications: {
198
+ name: 'Notifications',
199
+ description: 'Notification preferences for card assignments and mentions',
200
+ category: 'settings',
201
+ icon: 'bell',
202
+ entities: [],
203
+ permissions: ['notifications.*'],
204
+ docs: [],
205
+ },
206
+
207
+ // ===========================================================================
208
+ // BILLING FEATURES
209
+ // Plans, subscriptions, and payments
210
+ // ===========================================================================
211
+
212
+ plans: {
213
+ name: 'Plans',
214
+ description: 'Plan catalog, comparison, and selection',
215
+ category: 'settings',
216
+ icon: 'credit-card',
217
+ entities: [],
218
+ permissions: ['plans.*'],
219
+ docs: [],
220
+ },
221
+
222
+ billing: {
223
+ name: 'Billing',
224
+ description: 'Subscription management, payments, and invoices',
225
+ category: 'settings',
226
+ icon: 'receipt',
227
+ entities: [],
228
+ permissions: ['billing.*', 'subscriptions.*', 'invoices.*'],
229
+ docs: [],
230
+ },
231
+
232
+ // ===========================================================================
233
+ // ADMIN FEATURES
234
+ // Superadmin and developer tools
235
+ // ===========================================================================
236
+
237
+ superadmin: {
238
+ name: 'Superadmin',
239
+ description: 'Superadmin dashboard and system management',
240
+ category: 'admin',
241
+ icon: 'shield-check',
242
+ entities: [],
243
+ permissions: ['superadmin.*'],
244
+ docs: [],
245
+ },
246
+
247
+ devtools: {
248
+ name: 'Developer Tools',
249
+ description: 'Development tools and configuration inspectors',
250
+ category: 'admin',
251
+ icon: 'terminal',
252
+ entities: [],
253
+ permissions: ['developer.*'],
254
+ docs: [],
255
+ },
256
+ })