@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,346 @@
1
+ -- ============================================================================
2
+ -- Productivity Theme - Abundant Sample Data Migration
3
+ -- Additional boards and cards to populate the Kanban experience
4
+ -- Run AFTER: 999_theme_sample_data.sql and entity sample data migrations
5
+ -- ============================================================================
6
+
7
+ -- ============================================
8
+ -- ADDITIONAL BOARDS (6 more boards)
9
+ -- ============================================
10
+
11
+ INSERT INTO "boards" (
12
+ id,
13
+ name,
14
+ description,
15
+ color,
16
+ "position",
17
+ "userId",
18
+ "teamId",
19
+ "createdAt",
20
+ "updatedAt"
21
+ ) VALUES
22
+ (
23
+ 'board-prod-004',
24
+ 'Marketing Campaigns',
25
+ 'Marketing initiatives and content calendar',
26
+ 'orange',
27
+ 3,
28
+ 'usr-prod-pm-001',
29
+ 'team-prod-product',
30
+ NOW(),
31
+ NOW()
32
+ ),
33
+ (
34
+ 'board-prod-005',
35
+ 'Bug Tracker',
36
+ 'Track and resolve bugs across the platform',
37
+ 'red',
38
+ 4,
39
+ 'usr-prod-dev-001',
40
+ 'team-prod-product',
41
+ NOW(),
42
+ NOW()
43
+ ),
44
+ (
45
+ 'board-prod-006',
46
+ 'Customer Feedback',
47
+ 'Feature requests and user feedback tracking',
48
+ 'pink',
49
+ 5,
50
+ 'usr-prod-pm-001',
51
+ 'team-prod-product',
52
+ NOW(),
53
+ NOW()
54
+ ),
55
+ (
56
+ 'board-prod-007',
57
+ 'Q1 Goals',
58
+ 'Quarterly objectives and key results',
59
+ 'blue',
60
+ 6,
61
+ 'usr-prod-pm-001',
62
+ 'team-prod-product',
63
+ NOW(),
64
+ NOW()
65
+ ),
66
+ (
67
+ 'board-prod-008',
68
+ 'Infrastructure',
69
+ 'DevOps and infrastructure improvements',
70
+ 'gray',
71
+ 7,
72
+ 'usr-prod-dev-001',
73
+ 'team-prod-product',
74
+ NOW(),
75
+ NOW()
76
+ ),
77
+ (
78
+ 'board-prod-009',
79
+ 'User Research',
80
+ 'UX research findings and insights',
81
+ 'purple',
82
+ 8,
83
+ 'usr-prod-design-001',
84
+ 'team-prod-product',
85
+ NOW(),
86
+ NOW()
87
+ )
88
+ ON CONFLICT (id) DO NOTHING;
89
+
90
+ -- ============================================
91
+ -- ADDITIONAL LISTS
92
+ -- ============================================
93
+
94
+ INSERT INTO "lists" (
95
+ id,
96
+ name,
97
+ "position",
98
+ "boardId",
99
+ "userId",
100
+ "teamId",
101
+ "createdAt",
102
+ "updatedAt"
103
+ ) VALUES
104
+ -- Marketing Campaigns lists
105
+ ('list-prod-012', 'Ideas', 0, 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
106
+ ('list-prod-013', 'Planning', 1, 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
107
+ ('list-prod-014', 'In Progress', 2, 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
108
+ ('list-prod-015', 'Review', 3, 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
109
+ ('list-prod-016', 'Published', 4, 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
110
+
111
+ -- Bug Tracker lists
112
+ ('list-prod-017', 'Reported', 0, 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
113
+ ('list-prod-018', 'Triaged', 1, 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
114
+ ('list-prod-019', 'Fixing', 2, 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
115
+ ('list-prod-020', 'Testing', 3, 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
116
+ ('list-prod-021', 'Resolved', 4, 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
117
+
118
+ -- Customer Feedback lists
119
+ ('list-prod-022', 'New Requests', 0, 'board-prod-006', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
120
+ ('list-prod-023', 'Under Review', 1, 'board-prod-006', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
121
+ ('list-prod-024', 'Planned', 2, 'board-prod-006', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
122
+ ('list-prod-025', 'Implemented', 3, 'board-prod-006', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
123
+
124
+ -- Q1 Goals lists
125
+ ('list-prod-026', 'Not Started', 0, 'board-prod-007', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
126
+ ('list-prod-027', 'In Progress', 1, 'board-prod-007', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
127
+ ('list-prod-028', 'At Risk', 2, 'board-prod-007', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
128
+ ('list-prod-029', 'Completed', 3, 'board-prod-007', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
129
+
130
+ -- Infrastructure lists
131
+ ('list-prod-030', 'Backlog', 0, 'board-prod-008', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
132
+ ('list-prod-031', 'Scheduled', 1, 'board-prod-008', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
133
+ ('list-prod-032', 'Deploying', 2, 'board-prod-008', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
134
+ ('list-prod-033', 'Monitoring', 3, 'board-prod-008', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
135
+ ('list-prod-034', 'Done', 4, 'board-prod-008', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
136
+
137
+ -- User Research lists
138
+ ('list-prod-035', 'To Research', 0, 'board-prod-009', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
139
+ ('list-prod-036', 'Interviewing', 1, 'board-prod-009', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
140
+ ('list-prod-037', 'Analyzing', 2, 'board-prod-009', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
141
+ ('list-prod-038', 'Insights Ready', 3, 'board-prod-009', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW())
142
+ ON CONFLICT (id) DO NOTHING;
143
+
144
+ -- ============================================
145
+ -- ABUNDANT CARDS - Sprint Board (board-prod-002)
146
+ -- ============================================
147
+
148
+ INSERT INTO "cards" (
149
+ id, title, description, "position", priority, "dueDate", labels,
150
+ "listId", "boardId", "userId", "teamId", "createdAt", "updatedAt"
151
+ ) VALUES
152
+ -- Sprint - To Do (list-prod-005) - 8 more cards
153
+ ('card-prod-010', 'Implement dark mode toggle', 'Add system/light/dark mode switcher to settings', 2, 'medium', NOW() + INTERVAL '4 days', '["feature", "ui"]'::jsonb, 'list-prod-005', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
154
+ ('card-prod-011', 'Add keyboard shortcuts', 'Implement common keyboard shortcuts for power users', 3, 'low', NOW() + INTERVAL '10 days', '["feature", "ux"]'::jsonb, 'list-prod-005', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
155
+ ('card-prod-012', 'Optimize image loading', 'Implement lazy loading for card images', 4, 'medium', NOW() + INTERVAL '6 days', '["performance"]'::jsonb, 'list-prod-005', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
156
+ ('card-prod-013', 'Add drag and drop for file uploads', 'Allow users to drag files into card details', 5, 'low', NOW() + INTERVAL '14 days', '["feature", "ux"]'::jsonb, 'list-prod-005', 'board-prod-002', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
157
+ ('card-prod-014', 'Create onboarding flow', 'New user onboarding with interactive tutorial', 6, 'high', NOW() + INTERVAL '7 days', '["feature", "onboarding"]'::jsonb, 'list-prod-005', 'board-prod-002', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
158
+ ('card-prod-015', 'Add activity feed', 'Show recent activity on boards and cards', 7, 'medium', NOW() + INTERVAL '12 days', '["feature"]'::jsonb, 'list-prod-005', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
159
+ ('card-prod-016', 'Implement card comments', 'Allow team members to comment on cards', 8, 'high', NOW() + INTERVAL '5 days', '["feature", "collaboration"]'::jsonb, 'list-prod-005', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
160
+ ('card-prod-017', 'Add card attachments', 'Upload and attach files to cards', 9, 'medium', NOW() + INTERVAL '8 days', '["feature"]'::jsonb, 'list-prod-005', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
161
+
162
+ -- Sprint - In Progress (list-prod-006) - 5 more cards
163
+ ('card-prod-018', 'Build notification system', 'Real-time notifications for card updates', 1, 'high', NOW() + INTERVAL '2 days', '["feature", "notifications"]'::jsonb, 'list-prod-006', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
164
+ ('card-prod-019', 'Design card detail modal', 'Create expanded card view with full details', 2, 'medium', NOW() + INTERVAL '3 days', '["design", "ui"]'::jsonb, 'list-prod-006', 'board-prod-002', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
165
+ ('card-prod-020', 'Implement board filters', 'Filter cards by label, assignee, and due date', 3, 'medium', NOW() + INTERVAL '4 days', '["feature", "ux"]'::jsonb, 'list-prod-006', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
166
+ ('card-prod-021', 'Add checklist feature', 'Checklists within cards for subtasks', 4, 'high', NOW() + INTERVAL '3 days', '["feature"]'::jsonb, 'list-prod-006', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
167
+ ('card-prod-022', 'Create board templates', 'Pre-made board templates for common workflows', 5, 'low', NOW() + INTERVAL '9 days', '["feature"]'::jsonb, 'list-prod-006', 'board-prod-002', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
168
+
169
+ -- Sprint - Code Review (list-prod-007) - 4 cards
170
+ ('card-prod-023', 'API rate limiting', 'Implement rate limiting for API endpoints', 0, 'high', NOW() + INTERVAL '1 day', '["security", "api"]'::jsonb, 'list-prod-007', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
171
+ ('card-prod-024', 'User avatar upload', 'Allow users to upload custom avatars', 1, 'medium', NOW() + INTERVAL '2 days', '["feature", "profile"]'::jsonb, 'list-prod-007', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
172
+ ('card-prod-025', 'Email notifications', 'Send email alerts for important updates', 2, 'medium', NOW() + INTERVAL '2 days', '["feature", "notifications"]'::jsonb, 'list-prod-007', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
173
+ ('card-prod-026', 'Board sharing permissions', 'Share boards with specific team members', 3, 'high', NOW() + INTERVAL '1 day', '["feature", "permissions"]'::jsonb, 'list-prod-007', 'board-prod-002', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
174
+
175
+ -- Sprint - Done (list-prod-008) - 6 cards
176
+ ('card-prod-027', 'Setup CI/CD pipeline', 'Automated testing and deployment', 0, 'high', NOW() - INTERVAL '5 days', '["devops"]'::jsonb, 'list-prod-008', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
177
+ ('card-prod-028', 'Create API documentation', 'OpenAPI spec for all endpoints', 1, 'medium', NOW() - INTERVAL '3 days', '["docs", "api"]'::jsonb, 'list-prod-008', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
178
+ ('card-prod-029', 'Implement card labels', 'Colored labels for card categorization', 2, 'medium', NOW() - INTERVAL '7 days', '["feature"]'::jsonb, 'list-prod-008', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
179
+ ('card-prod-030', 'Add due dates to cards', 'Date picker for card deadlines', 3, 'high', NOW() - INTERVAL '10 days', '["feature"]'::jsonb, 'list-prod-008', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
180
+ ('card-prod-031', 'Board creation flow', 'Create new boards with color selection', 4, 'high', NOW() - INTERVAL '12 days', '["feature"]'::jsonb, 'list-prod-008', 'board-prod-002', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
181
+ ('card-prod-032', 'List reordering', 'Drag and drop to reorder lists', 5, 'medium', NOW() - INTERVAL '8 days', '["feature", "ux"]'::jsonb, 'list-prod-008', 'board-prod-002', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW())
182
+ ON CONFLICT (id) DO NOTHING;
183
+
184
+ -- ============================================
185
+ -- ABUNDANT CARDS - Bug Tracker (board-prod-005)
186
+ -- ============================================
187
+
188
+ INSERT INTO "cards" (
189
+ id, title, description, "position", priority, "dueDate", labels,
190
+ "listId", "boardId", "userId", "teamId", "createdAt", "updatedAt"
191
+ ) VALUES
192
+ -- Reported bugs
193
+ ('card-bug-001', 'Safari drag drop not working', 'Cards cannot be dragged on Safari 16.x', 0, 'urgent', NOW() + INTERVAL '1 day', '["bug", "browser"]'::jsonb, 'list-prod-017', 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
194
+ ('card-bug-002', 'Mobile menu overlaps content', 'Navigation menu covers main content on iPhone', 1, 'high', NOW() + INTERVAL '2 days', '["bug", "mobile"]'::jsonb, 'list-prod-017', 'board-prod-005', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
195
+ ('card-bug-003', 'Duplicate cards on fast click', 'Double clicking creates duplicate cards', 2, 'medium', NOW() + INTERVAL '3 days', '["bug"]'::jsonb, 'list-prod-017', 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
196
+ ('card-bug-004', 'Search returns stale results', 'Search cache not invalidating properly', 3, 'medium', NOW() + INTERVAL '4 days', '["bug", "search"]'::jsonb, 'list-prod-017', 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
197
+ ('card-bug-005', 'Avatar not loading for some users', 'External avatar URLs blocked by CSP', 4, 'low', NOW() + INTERVAL '5 days', '["bug"]'::jsonb, 'list-prod-017', 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
198
+
199
+ -- Triaged
200
+ ('card-bug-006', 'Memory leak in board view', 'Memory usage grows when switching boards', 0, 'high', NOW() + INTERVAL '2 days', '["bug", "performance"]'::jsonb, 'list-prod-018', 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
201
+ ('card-bug-007', 'Timezone issues in due dates', 'Due dates off by timezone offset', 1, 'medium', NOW() + INTERVAL '3 days', '["bug", "dates"]'::jsonb, 'list-prod-018', 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
202
+ ('card-bug-008', 'Keyboard navigation broken', 'Tab order incorrect in card modal', 2, 'medium', NOW() + INTERVAL '4 days', '["bug", "a11y"]'::jsonb, 'list-prod-018', 'board-prod-005', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
203
+
204
+ -- Fixing
205
+ ('card-bug-009', 'Login redirect loop', 'Users stuck in redirect loop after password change', 0, 'urgent', NOW() + INTERVAL '1 day', '["bug", "auth"]'::jsonb, 'list-prod-019', 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
206
+ ('card-bug-010', 'File upload size limit error', 'Unclear error message for large files', 1, 'medium', NOW() + INTERVAL '2 days', '["bug", "ux"]'::jsonb, 'list-prod-019', 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
207
+
208
+ -- Testing
209
+ ('card-bug-011', 'Card position not persisting', 'Card order resets on page reload', 0, 'high', NOW() + INTERVAL '1 day', '["bug"]'::jsonb, 'list-prod-020', 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
210
+ ('card-bug-012', 'Notification badge count wrong', 'Badge shows incorrect unread count', 1, 'low', NOW() + INTERVAL '2 days', '["bug", "notifications"]'::jsonb, 'list-prod-020', 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
211
+
212
+ -- Resolved
213
+ ('card-bug-013', 'Fixed: Board color picker', 'Color not saving on board edit', 0, 'medium', NOW() - INTERVAL '3 days', '["bug", "resolved"]'::jsonb, 'list-prod-021', 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
214
+ ('card-bug-014', 'Fixed: List name truncation', 'Long names not truncating correctly', 1, 'low', NOW() - INTERVAL '5 days', '["bug", "resolved"]'::jsonb, 'list-prod-021', 'board-prod-005', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
215
+ ('card-bug-015', 'Fixed: Double submit on forms', 'Submit button not disabling', 2, 'medium', NOW() - INTERVAL '7 days', '["bug", "resolved"]'::jsonb, 'list-prod-021', 'board-prod-005', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW())
216
+ ON CONFLICT (id) DO NOTHING;
217
+
218
+ -- ============================================
219
+ -- ABUNDANT CARDS - Marketing Campaigns (board-prod-004)
220
+ -- ============================================
221
+
222
+ INSERT INTO "cards" (
223
+ id, title, description, "position", priority, "dueDate", labels,
224
+ "listId", "boardId", "userId", "teamId", "createdAt", "updatedAt"
225
+ ) VALUES
226
+ -- Ideas
227
+ ('card-mkt-001', 'Product launch video', 'Create video showcasing new features', 0, 'medium', NULL, '["content", "video"]'::jsonb, 'list-prod-012', 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
228
+ ('card-mkt-002', 'Customer testimonials', 'Gather and publish customer success stories', 1, 'low', NULL, '["content", "social-proof"]'::jsonb, 'list-prod-012', 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
229
+ ('card-mkt-003', 'Podcast sponsorship', 'Research tech podcasts for sponsorship', 2, 'low', NULL, '["advertising"]'::jsonb, 'list-prod-012', 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
230
+ ('card-mkt-004', 'Referral program design', 'Design referral reward structure', 3, 'medium', NULL, '["growth"]'::jsonb, 'list-prod-012', 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
231
+
232
+ -- Planning
233
+ ('card-mkt-005', 'Q2 content calendar', 'Plan blog posts and social content', 0, 'high', NOW() + INTERVAL '7 days', '["planning", "content"]'::jsonb, 'list-prod-013', 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
234
+ ('card-mkt-006', 'Email drip campaign', 'Design onboarding email sequence', 1, 'high', NOW() + INTERVAL '10 days', '["email", "onboarding"]'::jsonb, 'list-prod-013', 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
235
+ ('card-mkt-007', 'Landing page A/B test', 'Test new hero section copy', 2, 'medium', NOW() + INTERVAL '5 days', '["testing", "conversion"]'::jsonb, 'list-prod-013', 'board-prod-004', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
236
+
237
+ -- In Progress
238
+ ('card-mkt-008', 'Blog: Getting Started Guide', 'Write comprehensive getting started article', 0, 'high', NOW() + INTERVAL '3 days', '["content", "docs"]'::jsonb, 'list-prod-014', 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
239
+ ('card-mkt-009', 'Social media graphics pack', 'Create templates for social posts', 1, 'medium', NOW() + INTERVAL '4 days', '["design", "social"]'::jsonb, 'list-prod-014', 'board-prod-004', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
240
+ ('card-mkt-010', 'Newsletter template redesign', 'Update email template for consistency', 2, 'medium', NOW() + INTERVAL '5 days', '["design", "email"]'::jsonb, 'list-prod-014', 'board-prod-004', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
241
+
242
+ -- Review
243
+ ('card-mkt-011', 'Press release draft', 'Review funding announcement PR', 0, 'urgent', NOW() + INTERVAL '1 day', '["pr", "review"]'::jsonb, 'list-prod-015', 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
244
+ ('card-mkt-012', 'Feature comparison chart', 'Verify competitor feature data', 1, 'medium', NOW() + INTERVAL '2 days', '["content", "sales"]'::jsonb, 'list-prod-015', 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
245
+
246
+ -- Published
247
+ ('card-mkt-013', 'Blog: 10 Productivity Tips', 'Published productivity tips article', 0, 'medium', NOW() - INTERVAL '7 days', '["content", "published"]'::jsonb, 'list-prod-016', 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
248
+ ('card-mkt-014', 'Product Hunt launch', 'Successfully launched on PH', 1, 'high', NOW() - INTERVAL '14 days', '["launch", "published"]'::jsonb, 'list-prod-016', 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
249
+ ('card-mkt-015', 'Case study: Acme Corp', 'Published enterprise case study', 2, 'medium', NOW() - INTERVAL '21 days', '["content", "published"]'::jsonb, 'list-prod-016', 'board-prod-004', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW())
250
+ ON CONFLICT (id) DO NOTHING;
251
+
252
+ -- ============================================
253
+ -- ABUNDANT CARDS - Product Roadmap (board-prod-001)
254
+ -- ============================================
255
+
256
+ INSERT INTO "cards" (
257
+ id, title, description, "position", priority, "dueDate", labels,
258
+ "listId", "boardId", "userId", "teamId", "createdAt", "updatedAt"
259
+ ) VALUES
260
+ -- Backlog - more cards
261
+ ('card-road-001', 'AI-powered card suggestions', 'Use ML to suggest card assignments', 2, 'low', NOW() + INTERVAL '90 days', '["feature", "ai"]'::jsonb, 'list-prod-001', 'board-prod-001', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
262
+ ('card-road-002', 'Gantt chart view', 'Timeline visualization for projects', 3, 'medium', NOW() + INTERVAL '60 days', '["feature", "views"]'::jsonb, 'list-prod-001', 'board-prod-001', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
263
+ ('card-road-003', 'Calendar integration', 'Sync with Google Calendar and Outlook', 4, 'high', NOW() + INTERVAL '45 days', '["feature", "integration"]'::jsonb, 'list-prod-001', 'board-prod-001', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
264
+ ('card-road-004', 'Mobile app', 'Native iOS and Android applications', 5, 'high', NOW() + INTERVAL '120 days', '["feature", "mobile"]'::jsonb, 'list-prod-001', 'board-prod-001', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
265
+ ('card-road-005', 'Slack integration', 'Post updates to Slack channels', 6, 'medium', NOW() + INTERVAL '30 days', '["feature", "integration"]'::jsonb, 'list-prod-001', 'board-prod-001', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
266
+ ('card-road-006', 'Custom fields', 'User-defined fields on cards', 7, 'medium', NOW() + INTERVAL '50 days', '["feature"]'::jsonb, 'list-prod-001', 'board-prod-001', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
267
+
268
+ -- Planning
269
+ ('card-road-007', 'Workspace analytics', 'Team productivity metrics and reports', 0, 'high', NOW() + INTERVAL '21 days', '["feature", "analytics"]'::jsonb, 'list-prod-002', 'board-prod-001', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
270
+ ('card-road-008', 'API v2 redesign', 'RESTful API improvements', 1, 'medium', NOW() + INTERVAL '28 days', '["api", "technical"]'::jsonb, 'list-prod-002', 'board-prod-001', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
271
+ ('card-road-009', 'Automation rules', 'If-this-then-that style automations', 2, 'high', NOW() + INTERVAL '35 days', '["feature", "automation"]'::jsonb, 'list-prod-002', 'board-prod-001', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
272
+
273
+ -- In Development
274
+ ('card-road-010', 'Board templates marketplace', 'Share and download board templates', 1, 'medium', NOW() + INTERVAL '14 days', '["feature"]'::jsonb, 'list-prod-003', 'board-prod-001', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
275
+ ('card-road-011', 'Advanced search filters', 'Complex search queries with filters', 2, 'high', NOW() + INTERVAL '10 days', '["feature", "search"]'::jsonb, 'list-prod-003', 'board-prod-001', 'usr-prod-dev-001', 'team-prod-product', NOW(), NOW()),
276
+
277
+ -- Released
278
+ ('card-road-012', 'Team workspaces', 'Multi-team support launched', 0, 'high', NOW() - INTERVAL '30 days', '["feature", "released"]'::jsonb, 'list-prod-004', 'board-prod-001', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
279
+ ('card-road-013', 'Card priority levels', 'Urgent, high, medium, low priorities', 1, 'medium', NOW() - INTERVAL '45 days', '["feature", "released"]'::jsonb, 'list-prod-004', 'board-prod-001', 'usr-prod-pm-001', 'team-prod-product', NOW(), NOW()),
280
+ ('card-road-014', 'Dark mode', 'System-wide dark theme', 2, 'medium', NOW() - INTERVAL '60 days', '["feature", "released"]'::jsonb, 'list-prod-004', 'board-prod-001', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW())
281
+ ON CONFLICT (id) DO NOTHING;
282
+
283
+ -- ============================================
284
+ -- ABUNDANT CARDS - Design System (board-prod-003)
285
+ -- ============================================
286
+
287
+ INSERT INTO "cards" (
288
+ id, title, description, "position", priority, "dueDate", labels,
289
+ "listId", "boardId", "userId", "teamId", "createdAt", "updatedAt"
290
+ ) VALUES
291
+ -- Components - more cards
292
+ ('card-design-001', 'Modal component', 'Responsive dialog/modal component', 2, 'high', NOW() + INTERVAL '5 days', '["component", "ui"]'::jsonb, 'list-prod-009', 'board-prod-003', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
293
+ ('card-design-002', 'Dropdown menu', 'Multi-level dropdown navigation', 3, 'medium', NOW() + INTERVAL '7 days', '["component", "ui"]'::jsonb, 'list-prod-009', 'board-prod-003', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
294
+ ('card-design-003', 'Toast notifications', 'Success, error, warning, info toasts', 4, 'medium', NOW() + INTERVAL '4 days', '["component", "feedback"]'::jsonb, 'list-prod-009', 'board-prod-003', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
295
+ ('card-design-004', 'Avatar component', 'User avatar with status indicator', 5, 'low', NOW() + INTERVAL '10 days', '["component", "ui"]'::jsonb, 'list-prod-009', 'board-prod-003', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
296
+ ('card-design-005', 'Card component', 'Content card with variants', 6, 'medium', NOW() + INTERVAL '6 days', '["component", "ui"]'::jsonb, 'list-prod-009', 'board-prod-003', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
297
+ ('card-design-006', 'Table component', 'Data table with sorting and pagination', 7, 'high', NOW() + INTERVAL '8 days', '["component", "data"]'::jsonb, 'list-prod-009', 'board-prod-003', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
298
+
299
+ -- Patterns - more cards
300
+ ('card-design-007', 'Loading states', 'Skeleton loaders and spinners', 1, 'medium', NULL, '["pattern", "feedback"]'::jsonb, 'list-prod-010', 'board-prod-003', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
301
+ ('card-design-008', 'Empty states', 'Illustrations for empty content areas', 2, 'low', NULL, '["pattern", "illustration"]'::jsonb, 'list-prod-010', 'board-prod-003', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
302
+ ('card-design-009', 'Error handling', 'Error messages and recovery flows', 3, 'high', NULL, '["pattern", "ux"]'::jsonb, 'list-prod-010', 'board-prod-003', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
303
+
304
+ -- Guidelines
305
+ ('card-design-010', 'Color palette', 'Define primary, secondary, semantic colors', 0, 'high', NULL, '["guideline", "color"]'::jsonb, 'list-prod-011', 'board-prod-003', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
306
+ ('card-design-011', 'Typography scale', 'Font sizes, weights, and line heights', 1, 'high', NULL, '["guideline", "typography"]'::jsonb, 'list-prod-011', 'board-prod-003', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
307
+ ('card-design-012', 'Spacing system', '4px grid spacing rules', 2, 'medium', NULL, '["guideline", "layout"]'::jsonb, 'list-prod-011', 'board-prod-003', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
308
+ ('card-design-013', 'Icon guidelines', 'Icon sizing and usage rules', 3, 'medium', NULL, '["guideline", "icons"]'::jsonb, 'list-prod-011', 'board-prod-003', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW()),
309
+ ('card-design-014', 'Motion principles', 'Animation timing and easing', 4, 'low', NULL, '["guideline", "motion"]'::jsonb, 'list-prod-011', 'board-prod-003', 'usr-prod-design-001', 'team-prod-product', NOW(), NOW())
310
+ ON CONFLICT (id) DO NOTHING;
311
+
312
+ -- ============================================
313
+ -- SUCCESS SUMMARY
314
+ -- ============================================
315
+
316
+ DO $$
317
+ BEGIN
318
+ RAISE NOTICE '';
319
+ RAISE NOTICE '═══════════════════════════════════════════════════════════';
320
+ RAISE NOTICE ' Productivity Theme - Abundant Sample Data';
321
+ RAISE NOTICE '═══════════════════════════════════════════════════════════';
322
+ RAISE NOTICE '';
323
+ RAISE NOTICE ' 📋 BOARDS: 9 total (6 new)';
324
+ RAISE NOTICE ' Product Roadmap, Sprint Board, Design System,';
325
+ RAISE NOTICE ' Marketing Campaigns, Bug Tracker, Customer Feedback,';
326
+ RAISE NOTICE ' Q1 Goals, Infrastructure, User Research';
327
+ RAISE NOTICE '';
328
+ RAISE NOTICE ' 📑 LISTS: 38 total (27 new)';
329
+ RAISE NOTICE ' 5 per board average';
330
+ RAISE NOTICE '';
331
+ RAISE NOTICE ' 🎴 CARDS: 80+ total (70+ new)';
332
+ RAISE NOTICE ' Sprint Board: 25 cards';
333
+ RAISE NOTICE ' Bug Tracker: 15 cards';
334
+ RAISE NOTICE ' Marketing: 15 cards';
335
+ RAISE NOTICE ' Product Roadmap: 14 cards';
336
+ RAISE NOTICE ' Design System: 14 cards';
337
+ RAISE NOTICE '';
338
+ RAISE NOTICE ' 🎨 BOARD COLORS:';
339
+ RAISE NOTICE ' blue, green, purple, orange, red, pink, gray';
340
+ RAISE NOTICE '';
341
+ RAISE NOTICE ' 🏷️ LABELS:';
342
+ RAISE NOTICE ' feature, bug, design, security, performance,';
343
+ RAISE NOTICE ' content, integration, automation, and more!';
344
+ RAISE NOTICE '';
345
+ RAISE NOTICE '═══════════════════════════════════════════════════════════';
346
+ END $$;
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@nextsparkjs/theme-productivity",
3
+ "version": "0.1.0-beta.1",
4
+ "private": false,
5
+ "type": "module",
6
+ "main": "./config/theme.config.ts",
7
+ "requiredPlugins": [],
8
+ "dependencies": {},
9
+ "peerDependencies": {
10
+ "@nextsparkjs/core": "workspace:*",
11
+ "lucide-react": "^0.539.0",
12
+ "next": "^15.0.0",
13
+ "react": "^19.0.0",
14
+ "react-dom": "^19.0.0",
15
+ "zod": "^4.0.0"
16
+ }
17
+ }
@@ -0,0 +1,122 @@
1
+ # Productivity Theme - Permissions Matrix
2
+
3
+ ## Teams Mode: `collaborative`
4
+
5
+ One personal team per user with invitations enabled.
6
+
7
+ ## Roles
8
+
9
+ | Role | Description |
10
+ |------|-------------|
11
+ | owner | Team owner - full control, can invite members |
12
+ | member | Team member - can create/edit cards and lists |
13
+ | viewer | Read-only access to all boards |
14
+
15
+ ---
16
+
17
+ ## Entity Permissions
18
+
19
+ ### Boards
20
+
21
+ | Action | owner | member | viewer |
22
+ |--------|-------|--------|--------|
23
+ | create | ✅ | ❌ | ❌ |
24
+ | read | ✅ | ✅ | ✅ |
25
+ | list | ✅ | ✅ | ✅ |
26
+ | update | ✅ | ❌ | ❌ |
27
+ | delete | ✅ | ❌ | ❌ |
28
+ | archive | ✅ | ❌ | ❌ |
29
+
30
+ ### Lists
31
+
32
+ | Action | owner | member | viewer |
33
+ |--------|-------|--------|--------|
34
+ | create | ✅ | ✅ | ❌ |
35
+ | read | ✅ | ✅ | ✅ |
36
+ | list | ✅ | ✅ | ✅ |
37
+ | update | ✅ | ✅ | ❌ |
38
+ | delete | ✅ | ❌ | ❌ |
39
+ | reorder | ✅ | ✅ | ❌ |
40
+
41
+ ### Cards
42
+
43
+ | Action | owner | member | viewer |
44
+ |--------|-------|--------|--------|
45
+ | create | ✅ | ✅ | ❌ |
46
+ | read | ✅ | ✅ | ✅ |
47
+ | list | ✅ | ✅ | ✅ |
48
+ | update | ✅ | ✅ | ❌ |
49
+ | delete | ✅ | ✅ | ❌ |
50
+ | move | ✅ | ✅ | ❌ |
51
+ | assign | ✅ | ✅ | ❌ |
52
+
53
+ ---
54
+
55
+ ## Theme Features
56
+
57
+ | Feature | owner | member | viewer | Description |
58
+ |---------|-------|--------|--------|-------------|
59
+ | `boards.archive` | ✅ | ❌ | ❌ | Archive boards |
60
+ | `boards.settings` | ✅ | ❌ | ❌ | Modify board settings |
61
+ | `lists.reorder` | ✅ | ✅ | ❌ | Reorder lists within board |
62
+ | `cards.move` | ✅ | ✅ | ❌ | Move cards between lists |
63
+ | `cards.assign` | ✅ | ✅ | ❌ | Assign cards to members |
64
+
65
+ ---
66
+
67
+ ## Team Permissions
68
+
69
+ | Permission | owner | member | viewer |
70
+ |------------|-------|--------|--------|
71
+ | `teams.invite` | ✅ | ❌ | ❌ |
72
+ | `teams.remove_member` | ✅ | ❌ | ❌ |
73
+ | `teams.change_roles` | ✅ | ❌ | ❌ |
74
+ | `teams.settings` | ✅ | ❌ | ❌ |
75
+
76
+ ---
77
+
78
+ ## Disabled Core Permissions
79
+
80
+ - `teams.delete` - Cannot delete in collaborative mode
81
+ - `settings.api_keys` - Not needed for this app
82
+ - `settings.billing` - No billing
83
+
84
+ ---
85
+
86
+ ## Test Scenarios
87
+
88
+ ### Owner
89
+
90
+ 1. ✅ Can create, edit, delete boards
91
+ 2. ✅ Can create, edit lists
92
+ 3. ✅ Can delete lists
93
+ 4. ✅ Can create, edit, delete cards
94
+ 5. ✅ Can move cards between lists
95
+ 6. ✅ Can assign cards to members
96
+ 7. ✅ Can archive boards
97
+ 8. ✅ Can invite members (member/viewer roles)
98
+ 9. ✅ Can remove members
99
+ 10. ✅ Can change member roles
100
+
101
+ ### Member
102
+
103
+ 1. ❌ Cannot create boards
104
+ 2. ❌ Cannot edit/delete boards
105
+ 3. ✅ Can create, edit lists
106
+ 4. ❌ Cannot delete lists
107
+ 5. ✅ Can create, edit, delete cards
108
+ 6. ✅ Can move cards between lists
109
+ 7. ✅ Can assign cards
110
+ 8. ❌ Cannot archive boards
111
+ 9. ❌ Cannot invite members
112
+ 10. ❌ Cannot remove members
113
+
114
+ ### Viewer
115
+
116
+ 1. ❌ Cannot create anything
117
+ 2. ✅ Can view all boards, lists, cards
118
+ 3. ❌ Cannot edit anything
119
+ 4. ❌ Cannot delete anything
120
+ 5. ❌ Cannot move cards
121
+ 6. ❌ Cannot assign cards
122
+