@khester/create-dynamics-app 1.0.8 → 1.1.0

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 (107) hide show
  1. package/bin/create-dynamics-app.js +1 -1
  2. package/dist/index.js +140 -15
  3. package/dist/index.js.map +1 -1
  4. package/dist/utils/consultingHelpers.d.ts +13 -0
  5. package/dist/utils/consultingHelpers.d.ts.map +1 -0
  6. package/dist/utils/consultingHelpers.js +569 -0
  7. package/dist/utils/consultingHelpers.js.map +1 -0
  8. package/dist/utils/copyTemplate.d.ts.map +1 -1
  9. package/dist/utils/copyTemplate.js.map +1 -1
  10. package/dist/utils/initGit.d.ts.map +1 -1
  11. package/dist/utils/initGit.js.map +1 -1
  12. package/dist/utils/installDependencies.d.ts.map +1 -1
  13. package/dist/utils/installDependencies.js +3 -2
  14. package/dist/utils/installDependencies.js.map +1 -1
  15. package/dist/utils/updatePackageJson.d.ts +1 -1
  16. package/dist/utils/updatePackageJson.d.ts.map +1 -1
  17. package/dist/utils/updatePackageJson.js +11 -1
  18. package/dist/utils/updatePackageJson.js.map +1 -1
  19. package/package.json +1 -1
  20. package/templates/dynamics-365-starter/INTEGRATION_TEST_RESULTS.md +302 -0
  21. package/templates/dynamics-365-starter/PHASE_4_COMPLETION_SUMMARY.md +305 -0
  22. package/templates/dynamics-365-starter/README.md +566 -137
  23. package/templates/dynamics-365-starter/deployment/QUICKSTART-MAC.md +507 -0
  24. package/templates/dynamics-365-starter/deployment/QUICKSTART-WINDOWS.md +372 -0
  25. package/templates/dynamics-365-starter/deployment/README.md +484 -0
  26. package/templates/dynamics-365-starter/deployment/pipelines/README.md +375 -0
  27. package/templates/dynamics-365-starter/deployment/pipelines/azure-pipelines.yml +330 -0
  28. package/templates/dynamics-365-starter/deployment/pipelines/github-actions.yml +422 -0
  29. package/templates/dynamics-365-starter/deployment/pipelines/jenkins.groovy +636 -0
  30. package/templates/dynamics-365-starter/deployment/scripts/deploy.ps1 +417 -0
  31. package/templates/dynamics-365-starter/deployment/scripts/deploy.sh +582 -0
  32. package/templates/dynamics-365-starter/deployment/scripts/team-onboarding.ps1 +486 -0
  33. package/templates/dynamics-365-starter/deployment/scripts/team-onboarding.sh +567 -0
  34. package/templates/dynamics-365-starter/deployment/scripts/validate-setup.ps1 +703 -0
  35. package/templates/dynamics-365-starter/deployment/scripts/validate-setup.sh +671 -0
  36. package/templates/dynamics-365-starter/docs/ARCHITECTURE_OVERVIEW.md +506 -0
  37. package/templates/dynamics-365-starter/docs/BEST_PRACTICES.md +723 -0
  38. package/templates/dynamics-365-starter/docs/MIGRATION_GUIDE.md +447 -0
  39. package/templates/dynamics-365-starter/docs/team-standards/README.md +273 -0
  40. package/templates/dynamics-365-starter/docs/team-standards/client-onboarding.md +577 -0
  41. package/templates/dynamics-365-starter/docs/team-standards/code-review-checklist.md +359 -0
  42. package/templates/dynamics-365-starter/docs/team-standards/coding-standards.md +700 -0
  43. package/templates/dynamics-365-starter/docs/team-standards/cross-platform-team-guide.md +736 -0
  44. package/templates/dynamics-365-starter/docs/team-standards/development-workflows.md +727 -0
  45. package/templates/dynamics-365-starter/docs/troubleshooting/common-errors.md +758 -0
  46. package/templates/dynamics-365-starter/docs/troubleshooting/platform-specific-issues.md +878 -0
  47. package/templates/dynamics-365-starter/package.json +22 -1
  48. package/templates/dynamics-365-starter/public/index.html +8 -11
  49. package/templates/dynamics-365-starter/scripts/custom-build.js +255 -0
  50. package/templates/dynamics-365-starter/src/client-project-template/README.md +234 -0
  51. package/templates/dynamics-365-starter/src/client-project-template/config/client.template.json +114 -0
  52. package/templates/dynamics-365-starter/src/client-project-template/config/environments/template.json +186 -0
  53. package/templates/dynamics-365-starter/src/client-project-template/scripts/client-setup.js +667 -0
  54. package/templates/dynamics-365-starter/src/components/AccountForm.css +71 -0
  55. package/templates/dynamics-365-starter/src/components/AccountForm.tsx +541 -0
  56. package/templates/dynamics-365-starter/src/components/AccountManagement.css +86 -0
  57. package/templates/dynamics-365-starter/src/components/AccountManagement.tsx +370 -0
  58. package/templates/dynamics-365-starter/src/components/ContactForm.tsx +149 -63
  59. package/templates/dynamics-365-starter/src/components/ContactManagement.tsx +153 -63
  60. package/templates/dynamics-365-starter/src/components/Logging/LogDialog.tsx +291 -0
  61. package/templates/dynamics-365-starter/src/components/Logging/LoggingContext.tsx +166 -0
  62. package/templates/dynamics-365-starter/src/components/Logging/LoggingDebugPanel.css +192 -0
  63. package/templates/dynamics-365-starter/src/components/Logging/LoggingDebugPanel.tsx +177 -0
  64. package/templates/dynamics-365-starter/src/components/Logging/LoggingProvider.tsx +3 -0
  65. package/templates/dynamics-365-starter/src/components/Logging/logger.ts +193 -0
  66. package/templates/dynamics-365-starter/src/constants/account.ts +410 -0
  67. package/templates/dynamics-365-starter/src/constants/contact.ts +362 -0
  68. package/templates/dynamics-365-starter/src/examples/README.md +52 -0
  69. package/templates/dynamics-365-starter/src/examples/component-examples/opportunity-management.tsx +625 -0
  70. package/templates/dynamics-365-starter/src/examples/entity-examples/opportunity-model.ts +545 -0
  71. package/templates/dynamics-365-starter/src/examples/integration-examples/custom-pcf-wrapper.tsx +722 -0
  72. package/templates/dynamics-365-starter/src/examples/workflow-examples/sales-workflow.ts +662 -0
  73. package/templates/dynamics-365-starter/src/index.tsx +107 -19
  74. package/templates/dynamics-365-starter/src/models/Account.ts +480 -0
  75. package/templates/dynamics-365-starter/src/models/BaseEntity.ts +204 -0
  76. package/templates/dynamics-365-starter/src/models/Contact.ts +580 -0
  77. package/templates/dynamics-365-starter/src/page-templates/EntityDashboard.tsx +519 -0
  78. package/templates/dynamics-365-starter/src/page-templates/EntityDetailPage.tsx +456 -0
  79. package/templates/dynamics-365-starter/src/page-templates/EntityListPage.tsx +406 -0
  80. package/templates/dynamics-365-starter/src/page-templates/RelatedEntitiesPage.tsx +578 -0
  81. package/templates/dynamics-365-starter/src/page-templates/SearchPage.tsx +629 -0
  82. package/templates/dynamics-365-starter/src/pcf/ContactControlWrapper.tsx +75 -22
  83. package/templates/dynamics-365-starter/src/pcf/MultiEntityControlWrapper.tsx +205 -0
  84. package/templates/dynamics-365-starter/src/providers/DynamicsProvider.tsx +297 -80
  85. package/templates/dynamics-365-starter/src/services/MockApiService.ts +260 -0
  86. package/templates/dynamics-365-starter/src/services/ServiceFactory.ts +65 -0
  87. package/templates/dynamics-365-starter/src/services/XrmApiService.ts +213 -0
  88. package/templates/dynamics-365-starter/src/styles/index.css +74 -7
  89. package/templates/dynamics-365-starter/tools/entity-generator/index.js +168 -0
  90. package/templates/dynamics-365-starter/tools/entity-generator/templates/constants.template.ts +124 -0
  91. package/templates/dynamics-365-starter/tools/entity-generator/templates/form.template.css +283 -0
  92. package/templates/dynamics-365-starter/tools/entity-generator/templates/form.template.tsx +275 -0
  93. package/templates/dynamics-365-starter/tools/entity-generator/templates/management.template.css +204 -0
  94. package/templates/dynamics-365-starter/tools/entity-generator/templates/management.template.tsx +413 -0
  95. package/templates/dynamics-365-starter/tools/entity-generator/templates/model.template.ts +250 -0
  96. package/templates/dynamics-365-starter/tools/metadata-sync/d365-client.js +410 -0
  97. package/templates/dynamics-365-starter/tools/metadata-sync/index.js +512 -0
  98. package/templates/dynamics-365-starter/tools/metadata-sync/type-generator.js +675 -0
  99. package/templates/dynamics-365-starter/tsconfig.json +11 -8
  100. package/templates/dynamics-365-starter/webpack.config.js +8 -9
  101. package/templates/power-pages-starter/README.md +7 -1
  102. package/templates/power-pages-starter/public/index.html +8 -11
  103. package/templates/power-pages-starter/src/components/ContactForm.tsx +60 -41
  104. package/templates/power-pages-starter/src/index.tsx +3 -3
  105. package/templates/power-pages-starter/src/providers/PowerPagesProvider.tsx +46 -23
  106. package/templates/power-pages-starter/tsconfig.json +3 -9
  107. package/templates/power-pages-starter/webpack.config.js +8 -3
@@ -0,0 +1,359 @@
1
+ # Code Review Checklist
2
+
3
+ ## Overview
4
+
5
+ This checklist ensures consistent, high-quality code reviews for all Dynamics 365 consulting
6
+ projects. Use this as a guide for both reviewers and developers preparing code for review.
7
+
8
+ ## Pre-Review Checklist (Developer)
9
+
10
+ Before submitting a pull request, ensure all items are completed:
11
+
12
+ ### ✅ Code Quality
13
+
14
+ - [ ] Code follows established [coding standards](./coding-standards.md)
15
+ - [ ] No TypeScript compilation errors
16
+ - [ ] All ESLint warnings resolved
17
+ - [ ] Prettier formatting applied
18
+ - [ ] No console.log statements in production code
19
+ - [ ] No commented-out code blocks
20
+ - [ ] Meaningful variable and function names used
21
+
22
+ ### ✅ Testing
23
+
24
+ - [ ] Unit tests written for new functionality
25
+ - [ ] Existing tests updated if needed
26
+ - [ ] All tests pass locally
27
+ - [ ] Test coverage meets minimum requirements (>80%)
28
+ - [ ] Edge cases and error scenarios tested
29
+ - [ ] Manual testing completed in development environment
30
+
31
+ ### ✅ Documentation
32
+
33
+ - [ ] Public APIs documented with JSDoc
34
+ - [ ] README updated if needed
35
+ - [ ] Code comments added for complex logic
36
+ - [ ] Client-specific requirements documented
37
+ - [ ] Breaking changes documented
38
+
39
+ ### ✅ Security
40
+
41
+ - [ ] No hardcoded secrets or credentials
42
+ - [ ] Input validation implemented
43
+ - [ ] Sensitive data properly handled
44
+ - [ ] Authentication/authorization checks in place
45
+ - [ ] SQL injection prevention (if applicable)
46
+
47
+ ### ✅ Performance
48
+
49
+ - [ ] No obvious performance bottlenecks
50
+ - [ ] Database queries optimized
51
+ - [ ] Large datasets handled appropriately
52
+ - [ ] Memory leaks prevented
53
+ - [ ] Caching implemented where beneficial
54
+
55
+ ## Review Process
56
+
57
+ ### 1. Functional Review
58
+
59
+ #### ✅ Requirements Compliance
60
+
61
+ - [ ] Feature meets specified requirements
62
+ - [ ] Client-specific needs addressed
63
+ - [ ] Business logic correctly implemented
64
+ - [ ] Edge cases handled appropriately
65
+ - [ ] Error scenarios managed gracefully
66
+
67
+ #### ✅ User Experience
68
+
69
+ - [ ] UI/UX follows design specifications
70
+ - [ ] Responsive design implemented
71
+ - [ ] Accessibility standards met (WCAG 2.1 AA)
72
+ - [ ] Loading states and feedback provided
73
+ - [ ] Error messages are user-friendly
74
+
75
+ ### 2. Technical Review
76
+
77
+ #### ✅ Architecture & Design
78
+
79
+ - [ ] Code follows established patterns
80
+ - [ ] Proper separation of concerns
81
+ - [ ] Dependencies properly managed
82
+ - [ ] Interfaces used appropriately
83
+ - [ ] SOLID principles followed
84
+
85
+ #### ✅ Entity Model Review (if applicable)
86
+
87
+ - [ ] Entity inherits from BaseEntity
88
+ - [ ] Static CRUD methods implemented
89
+ - [ ] Validation logic included
90
+ - [ ] Constants file created/updated
91
+ - [ ] Field mappings correct
92
+ - [ ] Relationships properly defined
93
+
94
+ #### ✅ React Component Review (if applicable)
95
+
96
+ - [ ] Functional components used
97
+ - [ ] Props properly typed
98
+ - [ ] Hooks used correctly
99
+ - [ ] State management appropriate
100
+ - [ ] Event handlers properly implemented
101
+ - [ ] Re-renders optimized (useMemo, useCallback)
102
+
103
+ #### ✅ API Integration Review (if applicable)
104
+
105
+ - [ ] Service interfaces used
106
+ - [ ] Error handling implemented
107
+ - [ ] Logging added for debugging
108
+ - [ ] API responses properly typed
109
+ - [ ] Timeout handling included
110
+
111
+ ### 3. Code Quality Review
112
+
113
+ #### ✅ Readability
114
+
115
+ - [ ] Code is self-documenting
116
+ - [ ] Consistent naming conventions
117
+ - [ ] Appropriate code organization
118
+ - [ ] Minimal code complexity
119
+ - [ ] Clear function purposes
120
+
121
+ #### ✅ Maintainability
122
+
123
+ - [ ] Code is DRY (Don't Repeat Yourself)
124
+ - [ ] Functions have single responsibility
125
+ - [ ] Easy to modify and extend
126
+ - [ ] Minimal coupling between modules
127
+ - [ ] Configuration externalized
128
+
129
+ #### ✅ Error Handling
130
+
131
+ - [ ] All error scenarios handled
132
+ - [ ] Appropriate error types used
133
+ - [ ] User-friendly error messages
134
+ - [ ] Logging implemented for debugging
135
+ - [ ] Graceful degradation implemented
136
+
137
+ ### 4. Dynamics 365 Specific Review
138
+
139
+ #### ✅ Entity Development
140
+
141
+ - [ ] Field constants match D365 schema
142
+ - [ ] Option set values correctly mapped
143
+ - [ ] Relationships properly configured
144
+ - [ ] Security roles considered
145
+ - [ ] Data validation aligns with D365
146
+
147
+ #### ✅ Integration Patterns
148
+
149
+ - [ ] Xrm.WebApi used correctly
150
+ - [ ] FetchXML queries optimized
151
+ - [ ] Batch operations implemented where appropriate
152
+ - [ ] Plugin considerations documented
153
+ - [ ] Workflow integration points identified
154
+
155
+ #### ✅ Deployment Considerations
156
+
157
+ - [ ] Web resources organized properly
158
+ - [ ] Solution dependencies documented
159
+ - [ ] Environment-specific configurations
160
+ - [ ] Upgrade path considered
161
+ - [ ] Rollback procedures documented
162
+
163
+ ### 5. Client-Specific Review
164
+
165
+ #### ✅ Customization Review
166
+
167
+ - [ ] Client branding applied correctly
168
+ - [ ] Custom fields implemented
169
+ - [ ] Business logic matches client requirements
170
+ - [ ] Integration points configured
171
+ - [ ] Compliance requirements met
172
+
173
+ #### ✅ Configuration Review
174
+
175
+ - [ ] Environment settings correct
176
+ - [ ] Feature flags configured
177
+ - [ ] Client-specific constants updated
178
+ - [ ] Deployment scripts updated
179
+ - [ ] Documentation reflects client setup
180
+
181
+ ## Review Guidelines
182
+
183
+ ### For Reviewers
184
+
185
+ #### Be Constructive
186
+
187
+ - Provide specific, actionable feedback
188
+ - Suggest improvements with examples
189
+ - Focus on code quality, not personal preferences
190
+ - Acknowledge good practices and improvements
191
+
192
+ #### Be Thorough
193
+
194
+ - Review all changes, not just the main files
195
+ - Test the functionality locally if possible
196
+ - Consider the broader impact of changes
197
+ - Check for consistency with existing codebase
198
+
199
+ #### Be Timely
200
+
201
+ - Complete reviews within 24 hours
202
+ - Provide status updates if review will be delayed
203
+ - Prioritize critical or blocking changes
204
+ - Use draft reviews for early feedback
205
+
206
+ ### For Developers
207
+
208
+ #### Respond Professionally
209
+
210
+ - Address all feedback items
211
+ - Ask for clarification when needed
212
+ - Explain decisions and trade-offs
213
+ - Thank reviewers for their input
214
+
215
+ #### Make Changes Incrementally
216
+
217
+ - Address feedback in separate commits
218
+ - Keep changes focused and small
219
+ - Update tests after code changes
220
+ - Re-request review after significant changes
221
+
222
+ ## Common Issues to Watch For
223
+
224
+ ### 🚨 Critical Issues
225
+
226
+ - **Security vulnerabilities** (hardcoded secrets, injection attacks)
227
+ - **Data corruption risks** (improper validation, transaction handling)
228
+ - **Performance problems** (N+1 queries, memory leaks)
229
+ - **Breaking changes** (API changes, database schema modifications)
230
+
231
+ ### ⚠️ Major Issues
232
+
233
+ - **Logic errors** (incorrect business rules, missing edge cases)
234
+ - **Integration failures** (API compatibility, service dependencies)
235
+ - **Accessibility violations** (missing ARIA labels, keyboard navigation)
236
+ - **Testing gaps** (insufficient coverage, missing test scenarios)
237
+
238
+ ### 📝 Minor Issues
239
+
240
+ - **Code style violations** (naming conventions, formatting)
241
+ - **Documentation gaps** (missing comments, outdated README)
242
+ - **Optimization opportunities** (unnecessary re-renders, redundant code)
243
+ - **Best practice deviations** (pattern inconsistencies)
244
+
245
+ ## Review Templates
246
+
247
+ ### Approval Template
248
+
249
+ ```
250
+ ✅ **APPROVED**
251
+
252
+ **Summary:** Changes look good overall. The implementation follows our standards and meets the requirements.
253
+
254
+ **Highlights:**
255
+ - Good error handling implementation
256
+ - Comprehensive test coverage
257
+ - Clear documentation
258
+
259
+ **Minor suggestions:**
260
+ - Consider extracting the validation logic into a separate utility
261
+ - Add loading state for better UX
262
+
263
+ **Action Required:** None - ready to merge
264
+ ```
265
+
266
+ ### Request Changes Template
267
+
268
+ ```
269
+ 🔄 **CHANGES REQUESTED**
270
+
271
+ **Summary:** Good progress, but a few issues need to be addressed before approval.
272
+
273
+ **Critical Issues:**
274
+ - [ ] Missing input validation on line 45
275
+ - [ ] Potential memory leak in useEffect (line 23)
276
+
277
+ **Suggestions:**
278
+ - [ ] Consider using useMemo for expensive calculations
279
+ - [ ] Extract constants to separate file for reusability
280
+
281
+ **Testing Notes:**
282
+ - All unit tests pass
283
+ - Manual testing shows expected behavior
284
+
285
+ **Action Required:** Please address the critical issues and re-request review
286
+ ```
287
+
288
+ ## Post-Review Process
289
+
290
+ ### After Approval
291
+
292
+ - [ ] All feedback addressed
293
+ - [ ] Final tests pass
294
+ - [ ] Deployment checklist completed
295
+ - [ ] Merge to appropriate branch
296
+ - [ ] Update project status
297
+ - [ ] Notify relevant stakeholders
298
+
299
+ ### After Merge
300
+
301
+ - [ ] Verify deployment success
302
+ - [ ] Monitor for any issues
303
+ - [ ] Update documentation if needed
304
+ - [ ] Close related tickets/issues
305
+ - [ ] Document lessons learned
306
+
307
+ ## Escalation Process
308
+
309
+ ### When to Escalate
310
+
311
+ - Disagreement on architectural decisions
312
+ - Security concerns not being addressed
313
+ - Performance issues not resolved
314
+ - Timeline impact from review feedback
315
+
316
+ ### Escalation Path
317
+
318
+ 1. **Senior Developer** - Technical guidance and mentoring
319
+ 2. **Technical Lead** - Architecture and design decisions
320
+ 3. **Engineering Manager** - Process and timeline issues
321
+ 4. **Client Stakeholder** - Business requirement clarifications
322
+
323
+ ## Tools and Automation
324
+
325
+ ### Automated Checks
326
+
327
+ - **GitHub Actions** - CI/CD pipeline validation
328
+ - **SonarQube** - Code quality and security analysis
329
+ - **CodeClimate** - Maintainability and test coverage
330
+ - **Dependabot** - Dependency vulnerability scanning
331
+
332
+ ### Review Tools
333
+
334
+ - **GitHub Pull Requests** - Primary review interface
335
+ - **VS Code Live Share** - Collaborative debugging
336
+ - **Postman** - API testing during review
337
+ - **Browser DevTools** - Frontend functionality testing
338
+
339
+ ## Metrics and Improvement
340
+
341
+ ### Review Metrics
342
+
343
+ - Average review time
344
+ - Number of review iterations
345
+ - Defect detection rate
346
+ - Code quality trends
347
+
348
+ ### Continuous Improvement
349
+
350
+ - Monthly review process retrospectives
351
+ - Code quality trend analysis
352
+ - Reviewer training and development
353
+ - Process refinement based on feedback
354
+
355
+ ---
356
+
357
+ Remember: The goal of code review is to maintain high quality, share knowledge, and catch issues
358
+ early. Focus on constructive feedback that helps the team grow and deliver excellent solutions to
359
+ our clients.