@friggframework/devtools 2.0.0--canary.517.35ee143.0 → 2.0.0--canary.524.06156322a.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 (147) hide show
  1. package/infrastructure/domains/shared/types/app-definition.js +0 -21
  2. package/infrastructure/domains/shared/utilities/base-definition-factory.js +15 -1
  3. package/infrastructure/infrastructure-composer.js +0 -2
  4. package/package.json +15 -7
  5. package/.eslintrc.json +0 -3
  6. package/CHANGELOG.md +0 -132
  7. package/infrastructure/domains/admin-scripts/admin-script-builder.js +0 -200
  8. package/infrastructure/domains/admin-scripts/admin-script-builder.test.js +0 -499
  9. package/infrastructure/domains/admin-scripts/index.js +0 -5
  10. package/layers/prisma/.build-complete +0 -3
  11. package/layers/prisma/nodejs/package.json +0 -8
  12. package/management-ui/.eslintrc.js +0 -22
  13. package/management-ui/components.json +0 -21
  14. package/management-ui/docs/phase2-integration-guide.md +0 -320
  15. package/management-ui/index.html +0 -13
  16. package/management-ui/package.json +0 -76
  17. package/management-ui/packages/devtools/frigg-cli/ui-command/index.js +0 -302
  18. package/management-ui/postcss.config.js +0 -6
  19. package/management-ui/server/api/backend.js +0 -256
  20. package/management-ui/server/api/cli.js +0 -315
  21. package/management-ui/server/api/codegen.js +0 -663
  22. package/management-ui/server/api/connections.js +0 -857
  23. package/management-ui/server/api/discovery.js +0 -185
  24. package/management-ui/server/api/environment/index.js +0 -1
  25. package/management-ui/server/api/environment/router.js +0 -378
  26. package/management-ui/server/api/environment.js +0 -328
  27. package/management-ui/server/api/integrations.js +0 -876
  28. package/management-ui/server/api/logs.js +0 -248
  29. package/management-ui/server/api/monitoring.js +0 -282
  30. package/management-ui/server/api/open-ide.js +0 -31
  31. package/management-ui/server/api/project.js +0 -1029
  32. package/management-ui/server/api/users/sessions.js +0 -371
  33. package/management-ui/server/api/users/simulation.js +0 -254
  34. package/management-ui/server/api/users.js +0 -362
  35. package/management-ui/server/api-contract.md +0 -275
  36. package/management-ui/server/index.js +0 -873
  37. package/management-ui/server/middleware/errorHandler.js +0 -93
  38. package/management-ui/server/middleware/security.js +0 -32
  39. package/management-ui/server/processManager.js +0 -296
  40. package/management-ui/server/server.js +0 -346
  41. package/management-ui/server/services/aws-monitor.js +0 -413
  42. package/management-ui/server/services/npm-registry.js +0 -347
  43. package/management-ui/server/services/template-engine.js +0 -538
  44. package/management-ui/server/utils/cliIntegration.js +0 -220
  45. package/management-ui/server/utils/environment/auditLogger.js +0 -471
  46. package/management-ui/server/utils/environment/awsParameterStore.js +0 -275
  47. package/management-ui/server/utils/environment/encryption.js +0 -278
  48. package/management-ui/server/utils/environment/envFileManager.js +0 -286
  49. package/management-ui/server/utils/import-commonjs.js +0 -28
  50. package/management-ui/server/utils/response.js +0 -83
  51. package/management-ui/server/websocket/handler.js +0 -325
  52. package/management-ui/src/App.jsx +0 -25
  53. package/management-ui/src/assets/FriggLogo.svg +0 -1
  54. package/management-ui/src/components/AppRouter.jsx +0 -65
  55. package/management-ui/src/components/Button.jsx +0 -70
  56. package/management-ui/src/components/Card.jsx +0 -97
  57. package/management-ui/src/components/EnvironmentCompare.jsx +0 -400
  58. package/management-ui/src/components/EnvironmentEditor.jsx +0 -372
  59. package/management-ui/src/components/EnvironmentImportExport.jsx +0 -469
  60. package/management-ui/src/components/EnvironmentSchema.jsx +0 -491
  61. package/management-ui/src/components/EnvironmentSecurity.jsx +0 -463
  62. package/management-ui/src/components/ErrorBoundary.jsx +0 -73
  63. package/management-ui/src/components/IntegrationCard.jsx +0 -481
  64. package/management-ui/src/components/IntegrationCardEnhanced.jsx +0 -770
  65. package/management-ui/src/components/IntegrationExplorer.jsx +0 -379
  66. package/management-ui/src/components/IntegrationStatus.jsx +0 -336
  67. package/management-ui/src/components/Layout.jsx +0 -716
  68. package/management-ui/src/components/LoadingSpinner.jsx +0 -113
  69. package/management-ui/src/components/RepositoryPicker.jsx +0 -248
  70. package/management-ui/src/components/SessionMonitor.jsx +0 -350
  71. package/management-ui/src/components/StatusBadge.jsx +0 -208
  72. package/management-ui/src/components/UserContextSwitcher.jsx +0 -212
  73. package/management-ui/src/components/UserSimulation.jsx +0 -327
  74. package/management-ui/src/components/Welcome.jsx +0 -434
  75. package/management-ui/src/components/codegen/APIEndpointGenerator.jsx +0 -637
  76. package/management-ui/src/components/codegen/APIModuleSelector.jsx +0 -227
  77. package/management-ui/src/components/codegen/CodeGenerationWizard.jsx +0 -247
  78. package/management-ui/src/components/codegen/CodePreviewEditor.jsx +0 -316
  79. package/management-ui/src/components/codegen/DynamicModuleForm.jsx +0 -271
  80. package/management-ui/src/components/codegen/FormBuilder.jsx +0 -737
  81. package/management-ui/src/components/codegen/IntegrationGenerator.jsx +0 -855
  82. package/management-ui/src/components/codegen/ProjectScaffoldWizard.jsx +0 -797
  83. package/management-ui/src/components/codegen/SchemaBuilder.jsx +0 -303
  84. package/management-ui/src/components/codegen/TemplateSelector.jsx +0 -586
  85. package/management-ui/src/components/codegen/index.js +0 -10
  86. package/management-ui/src/components/connections/ConnectionConfigForm.jsx +0 -362
  87. package/management-ui/src/components/connections/ConnectionHealthMonitor.jsx +0 -182
  88. package/management-ui/src/components/connections/ConnectionTester.jsx +0 -200
  89. package/management-ui/src/components/connections/EntityRelationshipMapper.jsx +0 -292
  90. package/management-ui/src/components/connections/OAuthFlow.jsx +0 -204
  91. package/management-ui/src/components/connections/index.js +0 -5
  92. package/management-ui/src/components/index.js +0 -21
  93. package/management-ui/src/components/monitoring/APIGatewayMetrics.jsx +0 -222
  94. package/management-ui/src/components/monitoring/LambdaMetrics.jsx +0 -169
  95. package/management-ui/src/components/monitoring/MetricsChart.jsx +0 -197
  96. package/management-ui/src/components/monitoring/MonitoringDashboard.jsx +0 -393
  97. package/management-ui/src/components/monitoring/SQSMetrics.jsx +0 -246
  98. package/management-ui/src/components/monitoring/index.js +0 -6
  99. package/management-ui/src/components/monitoring/monitoring.css +0 -218
  100. package/management-ui/src/components/theme-provider.jsx +0 -52
  101. package/management-ui/src/components/theme-toggle.jsx +0 -39
  102. package/management-ui/src/components/ui/badge.tsx +0 -36
  103. package/management-ui/src/components/ui/button.test.jsx +0 -56
  104. package/management-ui/src/components/ui/button.tsx +0 -57
  105. package/management-ui/src/components/ui/card.tsx +0 -76
  106. package/management-ui/src/components/ui/dropdown-menu.tsx +0 -199
  107. package/management-ui/src/components/ui/select.tsx +0 -157
  108. package/management-ui/src/components/ui/skeleton.jsx +0 -15
  109. package/management-ui/src/hooks/useFrigg.jsx +0 -387
  110. package/management-ui/src/hooks/useSocket.jsx +0 -58
  111. package/management-ui/src/index.css +0 -193
  112. package/management-ui/src/lib/utils.ts +0 -6
  113. package/management-ui/src/main.jsx +0 -10
  114. package/management-ui/src/pages/CodeGeneration.jsx +0 -14
  115. package/management-ui/src/pages/Connections.jsx +0 -252
  116. package/management-ui/src/pages/ConnectionsEnhanced.jsx +0 -633
  117. package/management-ui/src/pages/Dashboard.jsx +0 -311
  118. package/management-ui/src/pages/Environment.jsx +0 -314
  119. package/management-ui/src/pages/IntegrationConfigure.jsx +0 -669
  120. package/management-ui/src/pages/IntegrationDiscovery.jsx +0 -567
  121. package/management-ui/src/pages/IntegrationTest.jsx +0 -742
  122. package/management-ui/src/pages/Integrations.jsx +0 -253
  123. package/management-ui/src/pages/Monitoring.jsx +0 -17
  124. package/management-ui/src/pages/Simulation.jsx +0 -155
  125. package/management-ui/src/pages/Users.jsx +0 -492
  126. package/management-ui/src/services/api.js +0 -41
  127. package/management-ui/src/services/apiModuleService.js +0 -193
  128. package/management-ui/src/services/websocket-handlers.js +0 -120
  129. package/management-ui/src/test/api/project.test.js +0 -273
  130. package/management-ui/src/test/components/Welcome.test.jsx +0 -378
  131. package/management-ui/src/test/mocks/server.js +0 -178
  132. package/management-ui/src/test/setup.js +0 -61
  133. package/management-ui/src/test/utils/test-utils.jsx +0 -134
  134. package/management-ui/src/utils/repository.js +0 -98
  135. package/management-ui/src/utils/repository.test.js +0 -118
  136. package/management-ui/src/workflows/phase2-integration-workflows.js +0 -884
  137. package/management-ui/tailwind.config.js +0 -63
  138. package/management-ui/tsconfig.json +0 -37
  139. package/management-ui/tsconfig.node.json +0 -10
  140. package/management-ui/vite.config.js +0 -26
  141. package/management-ui/vitest.config.js +0 -38
  142. package/test/auther-definition-method-tester.js +0 -45
  143. package/test/index.js +0 -9
  144. package/test/integration-validator.js +0 -2
  145. package/test/mock-api-readme.md +0 -102
  146. package/test/mock-api.js +0 -284
  147. package/test/mock-integration.js +0 -78
@@ -1,320 +0,0 @@
1
- # Phase 2 Integration Guide
2
-
3
- ## Overview
4
-
5
- This guide covers the complete integration of all Phase 2 features for the Frigg Management UI as specified in RFC 0001. Phase 2 introduces core features that transform the developer experience with visual tools for integration management, testing, and deployment.
6
-
7
- ## Phase 2 Core Features
8
-
9
- ### 1. Integration Discovery and Installation
10
-
11
- The integration discovery system connects to the npm registry to find and install @friggframework modules.
12
-
13
- #### Key Components:
14
- - **IntegrationDiscoveryService**: Searches npm registry for Frigg integrations
15
- - **IntegrationInstallerService**: Handles package installation and dependency management
16
- - **UI Components**: Visual interface for browsing and installing integrations
17
-
18
- #### Usage:
19
- ```javascript
20
- // Discover integrations
21
- const discoveries = await discoveryService.searchIntegrations({
22
- query: 'hubspot',
23
- limit: 20
24
- });
25
-
26
- // Install integration
27
- const result = await installerService.installIntegration({
28
- packageName: '@friggframework/api-module-hubspot'
29
- });
30
- ```
31
-
32
- ### 2. Dummy User Management System
33
-
34
- Create and manage test users for development and testing purposes.
35
-
36
- #### Features:
37
- - Generate unique test IDs for each user
38
- - Create OAuth credentials for testing
39
- - Bulk user creation support
40
- - Complete isolation from production data
41
-
42
- #### API Endpoints:
43
- - `POST /api/users/dummy` - Create a dummy user
44
- - `GET /api/users/dummy` - List all dummy users
45
- - `POST /api/users/dummy/:id/credentials` - Generate test credentials
46
- - `POST /api/users/dummy/bulk` - Create multiple users
47
-
48
- ### 3. Connection/Entity Management
49
-
50
- Manage connections between users and integrations with full entity synchronization.
51
-
52
- #### Capabilities:
53
- - Create and manage user-integration connections
54
- - Health monitoring for active connections
55
- - Entity CRUD operations
56
- - Bulk synchronization support
57
-
58
- #### Connection Lifecycle:
59
- 1. Create connection with user credentials
60
- 2. Test connection health
61
- 3. Manage entities (contacts, deals, messages, etc.)
62
- 4. Monitor connection status
63
- 5. Handle refresh/reconnection
64
-
65
- ### 4. Environment Variable Editor
66
-
67
- Visual interface for managing environment variables across development and production.
68
-
69
- #### Features:
70
- - Read and display current variables
71
- - Mask sensitive values (passwords, keys, secrets)
72
- - Validate variable names
73
- - Differentiate local vs production environments
74
- - Bulk update support
75
-
76
- #### Security:
77
- - Automatic masking of sensitive values
78
- - Validation to prevent invalid variable names
79
- - Production update confirmation required
80
- - AWS Parameter Store integration for production
81
-
82
- ## Integration Workflows
83
-
84
- ### Complete Integration Setup Flow
85
-
86
- ```javascript
87
- const workflow = await phase2Workflows.setupIntegration('hubspot', {
88
- config: {
89
- clientId: 'your-client-id',
90
- clientSecret: 'your-client-secret'
91
- },
92
- testUserName: 'HubSpot Test User',
93
- environment: 'development'
94
- });
95
- ```
96
-
97
- This workflow automatically:
98
- 1. Discovers integration details
99
- 2. Installs the package
100
- 3. Configures the integration
101
- 4. Creates a test user
102
- 5. Generates credentials
103
- 6. Creates a connection
104
- 7. Tests the connection
105
- 8. Sets up environment variables
106
-
107
- ### Bulk Integration Management
108
-
109
- ```javascript
110
- const bulkResult = await phase2Workflows.bulkIntegrationSetup([
111
- { name: 'slack', options: { /* config */ } },
112
- { name: 'salesforce', options: { /* config */ } },
113
- { name: 'stripe', options: { /* config */ } }
114
- ], {
115
- batchSize: 3 // Process in parallel
116
- });
117
- ```
118
-
119
- ### Development Environment Setup
120
-
121
- ```javascript
122
- const devEnv = await phase2Workflows.setupDevelopmentEnvironment({
123
- projectType: 'saas',
124
- integrations: ['stripe', 'hubspot', 'slack'],
125
- testUserCount: 10,
126
- mockDataTypes: ['contacts', 'messages', 'payments']
127
- });
128
- ```
129
-
130
- ## Testing Phase 2 Features
131
-
132
- ### Integration Tests
133
-
134
- Run the comprehensive integration test suite:
135
-
136
- ```bash
137
- npm run test:integration
138
- ```
139
-
140
- Key test areas:
141
- - End-to-end user flows
142
- - WebSocket real-time updates
143
- - Concurrent operation handling
144
- - Error recovery
145
- - Data consistency
146
-
147
- ### Performance Benchmarks
148
-
149
- Run performance benchmarks:
150
-
151
- ```bash
152
- npm run benchmark:phase2
153
- ```
154
-
155
- Benchmark metrics:
156
- - Integration discovery speed
157
- - Installation throughput
158
- - API response times
159
- - WebSocket latency
160
- - Memory usage under load
161
- - Concurrent user capacity
162
-
163
- ### Validation Tests
164
-
165
- Ensure RFC compliance:
166
-
167
- ```bash
168
- npm run test:validation
169
- ```
170
-
171
- Validates:
172
- - All RFC requirements are met
173
- - Security requirements
174
- - Performance targets
175
- - API contracts
176
- - Migration compatibility
177
-
178
- ## Performance Optimization
179
-
180
- ### Caching Strategy
181
-
182
- The discovery service implements a 1-hour cache for npm queries:
183
- - Cold start: First request fetches from npm
184
- - Cached: Subsequent requests use in-memory cache
185
- - Cache invalidation: Manual or time-based
186
-
187
- ### Batch Processing
188
-
189
- For optimal performance with multiple operations:
190
- - Use bulk endpoints when available
191
- - Process in configurable batch sizes
192
- - Implement proper error handling per batch
193
-
194
- ### WebSocket Updates
195
-
196
- Real-time updates for long-running operations:
197
- - Installation progress
198
- - Connection status changes
199
- - Environment updates
200
- - Error notifications
201
-
202
- ## Security Considerations
203
-
204
- ### Environment Variables
205
- - Automatic masking of sensitive values
206
- - Patterns detected: PASSWORD, SECRET, KEY, TOKEN, etc.
207
- - Read-only access for discovery operations
208
- - Production updates require explicit confirmation
209
-
210
- ### Test Data Isolation
211
- - All dummy users marked with `isDummy: true`
212
- - Test IDs include 'test' prefix
213
- - Separate storage from production data
214
- - No cross-contamination possible
215
-
216
- ### Input Validation
217
- - Variable name validation (alphanumeric + underscore)
218
- - Package name verification
219
- - Credential format checking
220
- - SQL injection prevention
221
-
222
- ## Migration from create-frigg-app
223
-
224
- ### Automated Migration
225
-
226
- ```javascript
227
- const migration = await phase2Workflows.migrateProject('/path/to/project', {
228
- preserveCustom: true,
229
- integrationMapping: {
230
- 'old-integration': 'new-integration'
231
- }
232
- });
233
- ```
234
-
235
- ### Manual Migration Steps
236
-
237
- 1. **Backup existing project**
238
- 2. **Update dependencies**:
239
- ```json
240
- {
241
- "devDependencies": {
242
- "@friggframework/cli": "latest"
243
- }
244
- }
245
- ```
246
- 3. **Run migration command**:
247
- ```bash
248
- frigg migrate --from-create-frigg-app
249
- ```
250
- 4. **Verify integration configurations**
251
- 5. **Update environment variables**
252
- 6. **Test all connections**
253
-
254
- ## Troubleshooting
255
-
256
- ### Common Issues
257
-
258
- #### Integration Discovery Fails
259
- - Check network connectivity
260
- - Verify npm registry access
261
- - Clear discovery cache
262
- - Check for proxy settings
263
-
264
- #### Connection Test Failures
265
- - Verify credentials are correct
266
- - Check integration configuration
267
- - Review API rate limits
268
- - Inspect WebSocket connection
269
-
270
- #### Environment Variable Issues
271
- - Ensure valid variable names
272
- - Check file permissions for .env
273
- - Verify AWS credentials for production
274
- - Look for conflicting variables
275
-
276
- ### Debug Mode
277
-
278
- Enable debug logging:
279
- ```bash
280
- DEBUG=frigg:* npm run dev:server
281
- ```
282
-
283
- ### Health Checks
284
-
285
- Monitor system health:
286
- ```javascript
287
- // API endpoint
288
- GET /api/health
289
-
290
- // Returns
291
- {
292
- "status": "healthy",
293
- "services": {
294
- "discovery": "operational",
295
- "installer": "operational",
296
- "websocket": "connected",
297
- "environment": "configured"
298
- }
299
- }
300
- ```
301
-
302
- ## Best Practices
303
-
304
- 1. **Use Workflows**: Leverage the provided workflows for complex operations
305
- 2. **Monitor Performance**: Regularly run benchmarks to ensure optimal performance
306
- 3. **Test Thoroughly**: Use the comprehensive test suites before deployment
307
- 4. **Handle Errors**: Implement proper error handling for all async operations
308
- 5. **Cache Wisely**: Use caching for frequently accessed data
309
- 6. **Secure Sensitive Data**: Always mask sensitive environment variables
310
- 7. **Document Custom Integrations**: Maintain clear documentation for custom work
311
-
312
- ## Next Steps
313
-
314
- After Phase 2 implementation:
315
-
316
- 1. **Phase 3**: Advanced features including production monitoring
317
- 2. **Phase 4**: Multi-framework UI support
318
- 3. **Phase 5**: Complete migration and deprecation of create-frigg-app
319
-
320
- For questions or issues, refer to the [Frigg documentation](https://docs.frigg.dev) or open an issue on GitHub.
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>Frigg Management UI</title>
8
- </head>
9
- <body>
10
- <div id="root"></div>
11
- <script type="module" src="/src/main.jsx"></script>
12
- </body>
13
- </html>
@@ -1,76 +0,0 @@
1
- {
2
- "name": "@friggframework/management-ui",
3
- "version": "0.1.0",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "dev": "vite",
8
- "dev:server": "concurrently \"npm run server\" \"npm run dev\"",
9
- "build": "vite build",
10
- "preview": "vite preview",
11
- "server": "node server/server.js",
12
- "server:old": "node server/index.js",
13
- "server:dev": "nodemon server/server.js",
14
- "test": "vitest",
15
- "test:ui": "vitest --ui",
16
- "test:watch": "vitest --watch",
17
- "test:coverage": "vitest --coverage",
18
- "lint": "eslint src --ext js,jsx --report-unused-disable-directives --max-warnings 0",
19
- "lint:fix": "eslint src --ext js,jsx --fix",
20
- "typecheck": "tsc --noEmit"
21
- },
22
- "dependencies": {
23
- "@aws-sdk/client-api-gateway": "^3.478.0",
24
- "@aws-sdk/client-cloudwatch": "^3.478.0",
25
- "@aws-sdk/client-lambda": "^3.478.0",
26
- "@aws-sdk/client-sqs": "^3.478.0",
27
- "@friggframework/ui": "^2.0.0-next.0",
28
- "@friggframework/ui-react": "file:../../ui/react",
29
- "@radix-ui/react-dropdown-menu": "^2.1.15",
30
- "@radix-ui/react-select": "^2.2.5",
31
- "@radix-ui/react-slot": "^1.2.3",
32
- "axios": "^1.6.7",
33
- "class-variance-authority": "^0.7.1",
34
- "clsx": "^2.1.1",
35
- "cors": "^2.8.5",
36
- "express": "^4.18.2",
37
- "framer-motion": "^12.20.1",
38
- "fs-extra": "^11.2.0",
39
- "handlebars": "^4.7.8",
40
- "lucide-react": "^0.473.0",
41
- "node-cache": "^5.1.2",
42
- "node-fetch": "^3.3.2",
43
- "react": "^18.3.1",
44
- "react-dom": "^18.3.1",
45
- "react-router-dom": "^6.22.0",
46
- "semver": "^7.5.4",
47
- "socket.io": "^4.7.4",
48
- "socket.io-client": "^4.7.4",
49
- "tailwind-merge": "^2.6.0",
50
- "tailwindcss-animate": "^1.0.7"
51
- },
52
- "devDependencies": {
53
- "@types/react": "^18.3.3",
54
- "@types/react-dom": "^18.3.0",
55
- "@vitejs/plugin-react": "^4.3.1",
56
- "autoprefixer": "^10.4.20",
57
- "concurrently": "^8.2.2",
58
- "eslint": "^8.57.0",
59
- "eslint-plugin-react": "^7.34.3",
60
- "eslint-plugin-react-hooks": "^4.6.2",
61
- "eslint-plugin-react-refresh": "^0.4.7",
62
- "nodemon": "^3.0.3",
63
- "postcss": "^8.4.41",
64
- "tailwindcss": "^3.4.10",
65
- "typescript": "^5.2.2",
66
- "vite": "^5.3.4",
67
- "vitest": "^1.6.0",
68
- "@vitest/ui": "^1.6.0",
69
- "@vitest/coverage-v8": "^1.6.0",
70
- "@testing-library/react": "^14.3.1",
71
- "@testing-library/jest-dom": "^6.4.6",
72
- "@testing-library/user-event": "^14.5.2",
73
- "jsdom": "^24.1.0",
74
- "msw": "^2.3.1"
75
- }
76
- }