@nextsparkjs/theme-crm 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 (140) hide show
  1. package/CRM_PLAN.md +343 -0
  2. package/about.md +122 -0
  3. package/config/app.config.ts +185 -0
  4. package/config/billing.config.ts +187 -0
  5. package/config/dashboard.config.ts +372 -0
  6. package/config/dev.config.ts +55 -0
  7. package/config/features.config.ts +336 -0
  8. package/config/flows.config.ts +511 -0
  9. package/config/permissions.config.ts +297 -0
  10. package/config/theme.config.ts +111 -0
  11. package/entities/activities/activities.config.ts +61 -0
  12. package/entities/activities/activities.fields.ts +362 -0
  13. package/entities/activities/activities.service.ts +503 -0
  14. package/entities/activities/activities.types.ts +117 -0
  15. package/entities/activities/messages/en.json +123 -0
  16. package/entities/activities/messages/es.json +123 -0
  17. package/entities/activities/migrations/020_activities_table.sql +123 -0
  18. package/entities/activities/migrations/021_activities_metas.sql +114 -0
  19. package/entities/activities/migrations/022_activities_sample_data.sql +420 -0
  20. package/entities/campaigns/campaigns.config.ts +61 -0
  21. package/entities/campaigns/campaigns.fields.ts +413 -0
  22. package/entities/campaigns/campaigns.service.ts +426 -0
  23. package/entities/campaigns/campaigns.types.ts +124 -0
  24. package/entities/campaigns/messages/en.json +145 -0
  25. package/entities/campaigns/messages/es.json +145 -0
  26. package/entities/campaigns/migrations/001_campaigns_table.sql +127 -0
  27. package/entities/campaigns/migrations/002_campaigns_metas.sql +114 -0
  28. package/entities/campaigns/migrations/003_campaigns_sample_data.sql +364 -0
  29. package/entities/companies/companies.config.ts +61 -0
  30. package/entities/companies/companies.fields.ts +429 -0
  31. package/entities/companies/companies.service.ts +566 -0
  32. package/entities/companies/companies.types.ts +125 -0
  33. package/entities/companies/messages/en.json +146 -0
  34. package/entities/companies/messages/es.json +146 -0
  35. package/entities/companies/migrations/001_companies_table.sql +150 -0
  36. package/entities/companies/migrations/002_companies_metas.sql +114 -0
  37. package/entities/companies/migrations/003_companies_sample_data.sql +246 -0
  38. package/entities/contacts/contacts.config.ts +61 -0
  39. package/entities/contacts/contacts.fields.ts +359 -0
  40. package/entities/contacts/contacts.service.ts +509 -0
  41. package/entities/contacts/contacts.types.ts +108 -0
  42. package/entities/contacts/messages/en.json +117 -0
  43. package/entities/contacts/messages/es.json +117 -0
  44. package/entities/contacts/migrations/001_contacts_table.sql +134 -0
  45. package/entities/contacts/migrations/002_contacts_metas.sql +114 -0
  46. package/entities/contacts/migrations/003_contacts_sample_data.sql +421 -0
  47. package/entities/leads/leads.config.ts +61 -0
  48. package/entities/leads/leads.fields.ts +336 -0
  49. package/entities/leads/leads.service.ts +496 -0
  50. package/entities/leads/leads.types.ts +114 -0
  51. package/entities/leads/messages/en.json +132 -0
  52. package/entities/leads/messages/es.json +132 -0
  53. package/entities/leads/migrations/001_leads_table.sql +150 -0
  54. package/entities/leads/migrations/002_leads_metas.sql +120 -0
  55. package/entities/leads/migrations/003_leads_sample_data.sql +242 -0
  56. package/entities/notes/messages/en.json +114 -0
  57. package/entities/notes/messages/es.json +114 -0
  58. package/entities/notes/migrations/020_notes_table.sql +118 -0
  59. package/entities/notes/migrations/021_notes_metas.sql +114 -0
  60. package/entities/notes/migrations/022_notes_sample_data.sql +275 -0
  61. package/entities/notes/notes.config.ts +61 -0
  62. package/entities/notes/notes.fields.ts +283 -0
  63. package/entities/notes/notes.service.ts +320 -0
  64. package/entities/notes/notes.types.ts +102 -0
  65. package/entities/opportunities/messages/en.json +107 -0
  66. package/entities/opportunities/messages/es.json +107 -0
  67. package/entities/opportunities/migrations/010_opportunities_table.sql +145 -0
  68. package/entities/opportunities/migrations/011_opportunities_metas.sql +114 -0
  69. package/entities/opportunities/migrations/012_opportunities_sample_data.sql +438 -0
  70. package/entities/opportunities/opportunities.config.ts +61 -0
  71. package/entities/opportunities/opportunities.fields.ts +416 -0
  72. package/entities/opportunities/opportunities.service.ts +525 -0
  73. package/entities/opportunities/opportunities.types.ts +135 -0
  74. package/entities/pipelines/messages/en.json +115 -0
  75. package/entities/pipelines/messages/es.json +115 -0
  76. package/entities/pipelines/migrations/001_pipelines_table.sql +106 -0
  77. package/entities/pipelines/migrations/002_pipelines_metas.sql +114 -0
  78. package/entities/pipelines/migrations/003_pipelines_sample_data.sql +91 -0
  79. package/entities/pipelines/pipelines.config.ts +62 -0
  80. package/entities/pipelines/pipelines.fields.ts +193 -0
  81. package/entities/pipelines/pipelines.service.ts +383 -0
  82. package/entities/pipelines/pipelines.types.ts +78 -0
  83. package/entities/products/messages/en.json +135 -0
  84. package/entities/products/messages/es.json +135 -0
  85. package/entities/products/migrations/001_products_table.sql +117 -0
  86. package/entities/products/migrations/002_products_metas.sql +114 -0
  87. package/entities/products/migrations/003_products_sample_data.sql +247 -0
  88. package/entities/products/products.config.ts +62 -0
  89. package/entities/products/products.fields.ts +361 -0
  90. package/entities/products/products.service.ts +437 -0
  91. package/entities/products/products.types.ts +125 -0
  92. package/lib/crm-constants.ts +77 -0
  93. package/lib/crm-utils.ts +185 -0
  94. package/lib/selectors.ts +333 -0
  95. package/messages/en.json +131 -0
  96. package/messages/es.json +131 -0
  97. package/migrations/999_theme_sample_data.sql +473 -0
  98. package/package.json +18 -0
  99. package/pendings.md +205 -0
  100. package/permissions-matrix.md +216 -0
  101. package/styles/components.css +414 -0
  102. package/styles/crm-theme.css +358 -0
  103. package/styles/globals.css +576 -0
  104. package/styles/variables.css +111 -0
  105. package/templates/dashboard/(main)/activities/components/ActivityCard.tsx +169 -0
  106. package/templates/dashboard/(main)/activities/components/ActivityTimeline.tsx +165 -0
  107. package/templates/dashboard/(main)/activities/page.tsx +297 -0
  108. package/templates/dashboard/(main)/campaigns/page.tsx +373 -0
  109. package/templates/dashboard/(main)/companies/page.tsx +296 -0
  110. package/templates/dashboard/(main)/contacts/page.tsx +347 -0
  111. package/templates/dashboard/(main)/layout.tsx +98 -0
  112. package/templates/dashboard/(main)/leads/page.tsx +335 -0
  113. package/templates/dashboard/(main)/opportunities/[id]/edit/page.tsx +95 -0
  114. package/templates/dashboard/(main)/opportunities/create/page.tsx +94 -0
  115. package/templates/dashboard/(main)/opportunities/page.tsx +350 -0
  116. package/templates/dashboard/(main)/pipelines/[id]/edit/page.tsx +95 -0
  117. package/templates/dashboard/(main)/pipelines/[id]/page.tsx +143 -0
  118. package/templates/dashboard/(main)/pipelines/create/page.tsx +94 -0
  119. package/templates/dashboard/(main)/pipelines/page.tsx +234 -0
  120. package/templates/dashboard/(main)/products/[id]/edit/page.tsx +97 -0
  121. package/templates/dashboard/(main)/products/[id]/page.tsx +509 -0
  122. package/templates/dashboard/(main)/products/create/page.tsx +96 -0
  123. package/templates/dashboard/(main)/products/page.tsx +308 -0
  124. package/templates/shared/ActionButtons.tsx +41 -0
  125. package/templates/shared/CRMDashboard.tsx +519 -0
  126. package/templates/shared/CRMDataTable.tsx +441 -0
  127. package/templates/shared/CRMMetricCard.tsx +76 -0
  128. package/templates/shared/CRMMobileNav.tsx +172 -0
  129. package/templates/shared/CRMSidebar.tsx +346 -0
  130. package/templates/shared/CRMTopBar.tsx +265 -0
  131. package/templates/shared/DealCard.tsx +123 -0
  132. package/templates/shared/EntityCard.tsx +58 -0
  133. package/templates/shared/OpportunityForm.tsx +649 -0
  134. package/templates/shared/PipelineForm.tsx +367 -0
  135. package/templates/shared/PipelineKanban.tsx +194 -0
  136. package/templates/shared/QuickFilters.tsx +47 -0
  137. package/templates/shared/StageColumn.tsx +175 -0
  138. package/templates/shared/StageSelect.tsx +177 -0
  139. package/templates/shared/StagesRepeater.tsx +317 -0
  140. package/templates/shared/index.ts +9 -0
@@ -0,0 +1,187 @@
1
+ /**
2
+ * Billing Configuration - CRM Theme
3
+ *
4
+ * Defines plans, features, limits, and action mappings for the CRM theme.
5
+ * Customized for sales and customer relationship management.
6
+ */
7
+
8
+ import type { BillingConfig } from '@nextsparkjs/core/lib/billing/config-types'
9
+
10
+ export const billingConfig: BillingConfig = {
11
+ provider: 'stripe',
12
+ currency: 'usd',
13
+ defaultPlan: 'free',
14
+
15
+ // ===========================================
16
+ // FEATURE DEFINITIONS (CRM-specific)
17
+ // ===========================================
18
+ features: {
19
+ basic_analytics: {
20
+ name: 'billing.features.basic_analytics',
21
+ description: 'billing.features.basic_analytics_description',
22
+ },
23
+ advanced_analytics: {
24
+ name: 'billing.features.advanced_analytics',
25
+ description: 'billing.features.advanced_analytics_description',
26
+ },
27
+ api_access: {
28
+ name: 'billing.features.api_access',
29
+ description: 'billing.features.api_access_description',
30
+ },
31
+ custom_branding: {
32
+ name: 'billing.features.custom_branding',
33
+ description: 'billing.features.custom_branding_description',
34
+ },
35
+ pipeline_automation: {
36
+ name: 'billing.features.pipeline_automation',
37
+ description: 'billing.features.pipeline_automation_description',
38
+ },
39
+ email_templates: {
40
+ name: 'billing.features.email_templates',
41
+ description: 'billing.features.email_templates_description',
42
+ },
43
+ priority_support: {
44
+ name: 'billing.features.priority_support',
45
+ description: 'billing.features.priority_support_description',
46
+ },
47
+ },
48
+
49
+ // ===========================================
50
+ // LIMIT DEFINITIONS (CRM-specific)
51
+ // ===========================================
52
+ limits: {
53
+ team_members: {
54
+ name: 'billing.limits.team_members',
55
+ unit: 'count',
56
+ resetPeriod: 'never',
57
+ },
58
+ contacts: {
59
+ name: 'billing.limits.contacts',
60
+ unit: 'count',
61
+ resetPeriod: 'never',
62
+ },
63
+ deals: {
64
+ name: 'billing.limits.deals',
65
+ unit: 'count',
66
+ resetPeriod: 'never',
67
+ },
68
+ pipelines: {
69
+ name: 'billing.limits.pipelines',
70
+ unit: 'count',
71
+ resetPeriod: 'never',
72
+ },
73
+ api_calls: {
74
+ name: 'billing.limits.api_calls',
75
+ unit: 'calls',
76
+ resetPeriod: 'monthly',
77
+ },
78
+ storage_gb: {
79
+ name: 'billing.limits.storage',
80
+ unit: 'bytes',
81
+ resetPeriod: 'never',
82
+ },
83
+ },
84
+
85
+ // ===========================================
86
+ // PLAN DEFINITIONS (CRM-optimized)
87
+ // ===========================================
88
+ plans: [
89
+ {
90
+ slug: 'free',
91
+ name: 'billing.plans.free.name',
92
+ description: 'billing.plans.free.description',
93
+ type: 'free',
94
+ visibility: 'public',
95
+ price: { monthly: 0, yearly: 0 },
96
+ trialDays: 0,
97
+ features: ['basic_analytics'],
98
+ limits: {
99
+ team_members: 2,
100
+ contacts: 100,
101
+ deals: 25,
102
+ pipelines: 1,
103
+ api_calls: 1000,
104
+ storage_gb: 1,
105
+ },
106
+ stripePriceIdMonthly: null,
107
+ stripePriceIdYearly: null,
108
+ },
109
+ {
110
+ slug: 'pro',
111
+ name: 'billing.plans.pro.name',
112
+ description: 'billing.plans.pro.description',
113
+ type: 'paid',
114
+ visibility: 'public',
115
+ price: {
116
+ monthly: 4900, // $49.00 - CRM typically higher priced
117
+ yearly: 49000, // $490.00 (16% savings)
118
+ },
119
+ trialDays: 14,
120
+ features: [
121
+ 'basic_analytics',
122
+ 'advanced_analytics',
123
+ 'api_access',
124
+ 'email_templates',
125
+ 'pipeline_automation',
126
+ ],
127
+ limits: {
128
+ team_members: 10,
129
+ contacts: 10000,
130
+ deals: 1000,
131
+ pipelines: 5,
132
+ api_calls: 100000,
133
+ storage_gb: 25,
134
+ },
135
+ // Configure these in Stripe Dashboard
136
+ stripePriceIdMonthly: 'price_crm_pro_monthly',
137
+ stripePriceIdYearly: 'price_crm_pro_yearly',
138
+ },
139
+ {
140
+ slug: 'enterprise',
141
+ name: 'billing.plans.enterprise.name',
142
+ description: 'billing.plans.enterprise.description',
143
+ type: 'enterprise',
144
+ visibility: 'hidden',
145
+ trialDays: 30,
146
+ features: ['*'], // All features
147
+ limits: {
148
+ team_members: -1, // Unlimited
149
+ contacts: -1,
150
+ deals: -1,
151
+ pipelines: -1,
152
+ api_calls: -1,
153
+ storage_gb: -1,
154
+ },
155
+ stripePriceIdMonthly: null,
156
+ stripePriceIdYearly: null,
157
+ },
158
+ ],
159
+
160
+ // ===========================================
161
+ // ACTION MAPPINGS (CRM-specific)
162
+ // ===========================================
163
+ actionMappings: {
164
+ permissions: {
165
+ 'team.members.invite': 'team.members.invite',
166
+ 'team.settings.edit': 'team.settings.edit',
167
+ 'team.billing.manage': 'team.billing.manage',
168
+ },
169
+
170
+ features: {
171
+ 'analytics.view_advanced': 'advanced_analytics',
172
+ 'api.generate_key': 'api_access',
173
+ 'pipeline.automate': 'pipeline_automation',
174
+ 'email.use_templates': 'email_templates',
175
+ 'support.priority_access': 'priority_support',
176
+ },
177
+
178
+ limits: {
179
+ 'team.members.invite': 'team_members',
180
+ 'contacts.create': 'contacts',
181
+ 'deals.create': 'deals',
182
+ 'pipelines.create': 'pipelines',
183
+ 'api.call': 'api_calls',
184
+ 'files.upload': 'storage_gb',
185
+ },
186
+ },
187
+ }
@@ -0,0 +1,372 @@
1
+ /**
2
+ * CRM Theme - Dashboard Configuration
3
+ *
4
+ * Data-centric dashboard for sales and marketing teams.
5
+ */
6
+
7
+ export const DASHBOARD_CONFIG = {
8
+ // =============================================================================
9
+ // TOPBAR CONFIGURATION
10
+ // =============================================================================
11
+ topbar: {
12
+ search: {
13
+ enabled: true,
14
+ placeholder: 'dashboard.search.placeholder',
15
+ maxResults: 15,
16
+ },
17
+ notifications: {
18
+ enabled: true,
19
+ },
20
+ themeToggle: {
21
+ enabled: true,
22
+ },
23
+ support: {
24
+ enabled: true,
25
+ type: 'dropdown',
26
+ links: [
27
+ {
28
+ label: 'common.help.documentation',
29
+ url: '/docs',
30
+ icon: 'book-open',
31
+ external: false,
32
+ },
33
+ {
34
+ label: 'common.help.keyboard',
35
+ action: 'showKeyboardShortcuts',
36
+ icon: 'keyboard',
37
+ }
38
+ ],
39
+ },
40
+ quickCreate: {
41
+ enabled: true,
42
+ },
43
+ /**
44
+ * Admin access button (Super Admin area)
45
+ */
46
+ adminAccess: {
47
+ enabled: true,
48
+ showToDevelopers: true,
49
+ },
50
+ /**
51
+ * Dev Zone access button (Developer area)
52
+ */
53
+ devtoolsAccess: {
54
+ enabled: true,
55
+ },
56
+ userMenu: {
57
+ enabled: true,
58
+ showAvatar: true,
59
+ showEmail: true,
60
+ showRole: true, // Show role in CRM
61
+ items: [
62
+ { type: 'link', label: 'navigation.profile', href: '/dashboard/settings/profile', icon: 'user' },
63
+ { type: 'link', label: 'navigation.team', href: '/dashboard/settings/teams', icon: 'users' },
64
+ { type: 'link', label: 'navigation.settings', href: '/dashboard/settings', icon: 'settings' },
65
+ { type: 'divider' },
66
+ { type: 'action', label: 'buttons.signOut', action: 'signOut', icon: 'log-out' },
67
+ ],
68
+ },
69
+ },
70
+
71
+ // =============================================================================
72
+ // SIDEBAR CONFIGURATION
73
+ // =============================================================================
74
+ sidebar: {
75
+ defaultCollapsed: false,
76
+ rememberState: true,
77
+ collapsedWidth: '60px',
78
+ expandedWidth: '260px',
79
+ toggle: {
80
+ enabled: true,
81
+ showInTopbar: true,
82
+ hideOnMobile: false,
83
+ },
84
+ navigation: {
85
+ showEntityCounts: true,
86
+ groupEntities: true,
87
+ showRecents: true,
88
+ maxRecents: 5,
89
+ },
90
+ },
91
+
92
+ // =============================================================================
93
+ // SETTINGS PAGES
94
+ // =============================================================================
95
+ settings: {
96
+ pages: {
97
+ profile: {
98
+ enabled: true,
99
+ label: 'settings.pages.profile',
100
+ description: 'settings.pages.profileDescription',
101
+ icon: 'user',
102
+ order: 1,
103
+ features: {
104
+ avatarUpload: true,
105
+ nameChange: true,
106
+ emailChange: true,
107
+ localeChange: true,
108
+ timezoneChange: true,
109
+ },
110
+ },
111
+ security: {
112
+ enabled: true,
113
+ label: 'settings.pages.security',
114
+ description: 'settings.pages.securityDescription',
115
+ icon: 'shield',
116
+ order: 2,
117
+ features: {
118
+ twoFactorAuth: true,
119
+ sessionManagement: true,
120
+ loginHistory: true,
121
+ securityQuestions: false,
122
+ },
123
+ },
124
+ password: {
125
+ enabled: true,
126
+ label: 'settings.pages.password',
127
+ description: 'settings.pages.passwordDescription',
128
+ icon: 'key',
129
+ order: 3,
130
+ features: {
131
+ passwordChange: true,
132
+ passwordStrength: true,
133
+ passwordHistory: false,
134
+ },
135
+ },
136
+ notifications: {
137
+ enabled: true,
138
+ label: 'settings.pages.notifications',
139
+ description: 'settings.pages.notificationsDescription',
140
+ icon: 'bell',
141
+ order: 4,
142
+ features: {
143
+ emailNotifications: true,
144
+ pushNotifications: true,
145
+ smsNotifications: false,
146
+ notificationCategories: true,
147
+ },
148
+ },
149
+ 'api-keys': {
150
+ enabled: true,
151
+ label: 'settings.pages.apiKeys',
152
+ description: 'settings.pages.apiKeysDescription',
153
+ icon: 'key',
154
+ order: 5,
155
+ features: {},
156
+ },
157
+ billing: {
158
+ enabled: true,
159
+ label: 'settings.pages.billing',
160
+ description: 'settings.pages.billingDescription',
161
+ icon: 'credit-card',
162
+ order: 6,
163
+ features: {},
164
+ },
165
+ teams: {
166
+ enabled: true,
167
+ label: 'settings.pages.teams',
168
+ description: 'settings.pages.teamsDescription',
169
+ icon: 'users',
170
+ order: 7,
171
+ features: {
172
+ createTeams: false, // Single-tenant mode
173
+ manageMembers: true,
174
+ inviteMembers: true,
175
+ teamSettings: true,
176
+ },
177
+ },
178
+ plans: {
179
+ enabled: true,
180
+ label: 'settings.pages.plans',
181
+ description: 'settings.pages.plansDescription',
182
+ icon: 'credit-card',
183
+ order: 8,
184
+ features: {
185
+ planComparison: true,
186
+ planSelection: true,
187
+ },
188
+ },
189
+ },
190
+ layout: {
191
+ showDescription: true,
192
+ showIcons: true,
193
+ groupByCategory: false,
194
+ enableSearch: true,
195
+ },
196
+ },
197
+
198
+ // =============================================================================
199
+ // ENTITY PAGES
200
+ // =============================================================================
201
+ entities: {
202
+ defaultListView: {
203
+ pagination: {
204
+ defaultPageSize: 25,
205
+ allowedPageSizes: [10, 25, 50, 100],
206
+ showSizeSelector: true,
207
+ },
208
+ sorting: {
209
+ enabled: true,
210
+ defaultSort: { field: 'createdAt', direction: 'desc' },
211
+ rememberSort: true,
212
+ },
213
+ filtering: {
214
+ enabled: true,
215
+ quickFilters: true,
216
+ advancedFilters: true,
217
+ rememberFilters: true,
218
+ },
219
+ search: {
220
+ enabled: true,
221
+ placeholder: 'dashboard.entities.searchPlaceholder',
222
+ searchableFields: ['name', 'email', 'company', 'phone'],
223
+ instantSearch: true,
224
+ debounceMs: 200,
225
+ },
226
+ },
227
+ defaultFormView: {
228
+ validation: {
229
+ validateOnBlur: true,
230
+ validateOnChange: false,
231
+ showFieldErrors: true,
232
+ showFormErrors: true,
233
+ },
234
+ autosave: {
235
+ enabled: false,
236
+ intervalMs: 30000,
237
+ showIndicator: true,
238
+ },
239
+ confirmation: {
240
+ showOnCreate: false,
241
+ showOnUpdate: false,
242
+ showOnDelete: true,
243
+ },
244
+ },
245
+ customizations: {
246
+ leads: {
247
+ listView: {
248
+ defaultSort: { field: 'score', direction: 'desc' },
249
+ quickFilters: ['status', 'source', 'assignedTo'],
250
+ },
251
+ },
252
+ opportunities: {
253
+ listView: {
254
+ defaultSort: { field: 'closeDate', direction: 'asc' },
255
+ quickFilters: ['status', 'pipelineId', 'assignedTo'],
256
+ },
257
+ },
258
+ contacts: {
259
+ listView: {
260
+ quickFilters: ['companyId', 'isPrimary'],
261
+ },
262
+ },
263
+ activities: {
264
+ listView: {
265
+ defaultSort: { field: 'dueDate', direction: 'asc' },
266
+ quickFilters: ['type', 'status', 'assignedTo'],
267
+ },
268
+ },
269
+ },
270
+ },
271
+
272
+ // =============================================================================
273
+ // DASHBOARD HOMEPAGE
274
+ // =============================================================================
275
+ homepage: {
276
+ widgets: {
277
+ welcome: {
278
+ enabled: true,
279
+ showUserName: true,
280
+ showLastLogin: true,
281
+ showQuickActions: true,
282
+ },
283
+ stats: {
284
+ enabled: true,
285
+ entities: ['leads', 'opportunities', 'contacts', 'companies'],
286
+ timeframe: '30days',
287
+ showTrends: true,
288
+ },
289
+ recentActivity: {
290
+ enabled: true,
291
+ maxItems: 15,
292
+ entities: ['leads', 'opportunities', 'activities'],
293
+ showTimestamps: true,
294
+ },
295
+ quickActions: {
296
+ enabled: true,
297
+ actions: [
298
+ { entity: 'leads', action: 'create', label: 'crm.quickActions.newLead' },
299
+ { entity: 'contacts', action: 'create', label: 'crm.quickActions.newContact' },
300
+ { entity: 'opportunities', action: 'create', label: 'crm.quickActions.newOpportunity' },
301
+ { entity: 'activities', action: 'create', label: 'crm.quickActions.scheduleActivity' },
302
+ ],
303
+ },
304
+ pipeline: {
305
+ enabled: true,
306
+ showValue: true,
307
+ showCount: true,
308
+ },
309
+ },
310
+ layout: {
311
+ columns: 4,
312
+ gutter: 'medium',
313
+ responsive: true,
314
+ },
315
+ },
316
+
317
+ // =============================================================================
318
+ // PERFORMANCE
319
+ // =============================================================================
320
+ performance: {
321
+ cache: {
322
+ entityConfigs: { enabled: true, duration: 5 * 60 * 1000 },
323
+ entityData: { enabled: true, duration: 2 * 60 * 1000 },
324
+ },
325
+ loading: {
326
+ showSkeletons: true,
327
+ showProgressBars: true,
328
+ minimumLoadingTime: 150,
329
+ },
330
+ errors: {
331
+ showErrorBoundaries: true,
332
+ logErrors: true,
333
+ enableRetry: true,
334
+ maxRetries: 3,
335
+ },
336
+ },
337
+
338
+ // =============================================================================
339
+ // ACCESSIBILITY
340
+ // =============================================================================
341
+ accessibility: {
342
+ keyboard: {
343
+ enabled: true,
344
+ showShortcuts: true,
345
+ customShortcuts: {
346
+ 'Ctrl+K': 'openSearch',
347
+ 'Ctrl+Shift+N': 'quickCreate',
348
+ 'Ctrl+B': 'toggleSidebar',
349
+ 'Esc': 'closeModals',
350
+ 'L': 'newLead',
351
+ 'O': 'newOpportunity',
352
+ 'C': 'newContact',
353
+ },
354
+ },
355
+ screenReader: {
356
+ announceNavigation: true,
357
+ announceActions: true,
358
+ announceErrors: true,
359
+ },
360
+ visual: {
361
+ showFocusOutlines: true,
362
+ highContrastMode: false,
363
+ reducedMotion: false,
364
+ },
365
+ },
366
+ } as const
367
+
368
+ export const TOPBAR_CONFIG = DASHBOARD_CONFIG.topbar
369
+ export const SIDEBAR_CONFIG = DASHBOARD_CONFIG.sidebar
370
+ export const SETTINGS_CONFIG = DASHBOARD_CONFIG.settings
371
+ export const ENTITIES_CONFIG = DASHBOARD_CONFIG.entities
372
+ export const HOMEPAGE_CONFIG = DASHBOARD_CONFIG.homepage
@@ -0,0 +1,55 @@
1
+ /**
2
+ * CRM 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 CRM theme (single-tenant mode)
18
+ * Test different department roles in one organization
19
+ */
20
+ devKeyring: {
21
+ enabled: true,
22
+ users: [
23
+ {
24
+ id: 'roberto',
25
+ email: 'crm_owner_roberto@nextspark.dev',
26
+ name: 'Roberto Martinez',
27
+ password: 'Test1234',
28
+ teamRoles: 'Ventas Pro S.A. (owner) - CEO',
29
+ },
30
+ {
31
+ id: 'sofia',
32
+ email: 'crm_admin_sofia@nextspark.dev',
33
+ name: 'Sofia Gomez',
34
+ password: 'Test1234',
35
+ teamRoles: 'Ventas Pro S.A. (admin) - Sales Manager',
36
+ },
37
+ {
38
+ id: 'miguel',
39
+ email: 'crm_member_miguel@nextspark.dev',
40
+ name: 'Miguel Castro',
41
+ password: 'Test1234',
42
+ teamRoles: 'Ventas Pro S.A. (member) - Sales Rep',
43
+ },
44
+ {
45
+ id: 'laura',
46
+ email: 'crm_member_laura@nextspark.dev',
47
+ name: 'Laura Vega',
48
+ password: 'Test1234',
49
+ teamRoles: 'Ventas Pro S.A. (member) - Marketing',
50
+ },
51
+ ],
52
+ },
53
+ }
54
+
55
+ export default DEV_CONFIG_OVERRIDES