@friggframework/devtools 2.0.0--canary.522.cbd3d5a.0 → 2.0.0--canary.517.21b69ac.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 (247) hide show
  1. package/.eslintrc.json +3 -0
  2. package/CHANGELOG.md +132 -0
  3. package/frigg-cli/README.md +1 -1
  4. package/frigg-cli/__tests__/unit/commands/doctor.test.js +2 -0
  5. package/frigg-cli/__tests__/unit/commands/install.test.js +17 -21
  6. package/frigg-cli/doctor-command/index.js +16 -17
  7. package/frigg-cli/index.js +6 -21
  8. package/frigg-cli/index.test.js +1 -7
  9. package/frigg-cli/init-command/backend-first-handler.js +42 -124
  10. package/frigg-cli/init-command/index.js +1 -2
  11. package/frigg-cli/init-command/template-handler.js +3 -13
  12. package/frigg-cli/install-command/backend-js.js +3 -3
  13. package/frigg-cli/install-command/environment-variables.js +19 -16
  14. package/frigg-cli/install-command/environment-variables.test.js +13 -12
  15. package/frigg-cli/install-command/index.js +9 -14
  16. package/frigg-cli/install-command/integration-file.js +3 -3
  17. package/frigg-cli/install-command/logger.js +12 -0
  18. package/frigg-cli/install-command/validate-package.js +9 -5
  19. package/frigg-cli/jest.config.js +1 -4
  20. package/frigg-cli/repair-command/index.js +128 -101
  21. package/frigg-cli/start-command/index.js +2 -246
  22. package/frigg-cli/ui-command/index.js +36 -58
  23. package/frigg-cli/utils/repo-detection.js +37 -85
  24. package/infrastructure/docs/iam-policy-templates.md +1 -1
  25. package/infrastructure/domains/networking/vpc-builder.test.js +4 -2
  26. package/infrastructure/domains/networking/vpc-resolver.test.js +1 -1
  27. package/infrastructure/domains/shared/cloudformation-discovery.test.js +7 -4
  28. package/infrastructure/domains/shared/resource-discovery.js +5 -5
  29. package/infrastructure/domains/shared/types/discovery-result.test.js +1 -1
  30. package/infrastructure/domains/shared/utilities/base-definition-factory.js +2 -25
  31. package/infrastructure/domains/shared/utilities/base-definition-factory.test.js +2 -2
  32. package/infrastructure/infrastructure-composer.test.js +2 -2
  33. package/layers/prisma/.build-complete +3 -0
  34. package/layers/prisma/nodejs/package.json +8 -0
  35. package/management-ui/.eslintrc.js +22 -0
  36. package/management-ui/README.md +109 -245
  37. package/management-ui/components.json +21 -0
  38. package/management-ui/docs/phase2-integration-guide.md +320 -0
  39. package/management-ui/index.html +13 -0
  40. package/management-ui/package.json +76 -0
  41. package/management-ui/packages/devtools/frigg-cli/ui-command/index.js +302 -0
  42. package/management-ui/postcss.config.js +6 -0
  43. package/management-ui/server/api/backend.js +256 -0
  44. package/management-ui/server/api/cli.js +315 -0
  45. package/management-ui/server/api/codegen.js +663 -0
  46. package/management-ui/server/api/connections.js +857 -0
  47. package/management-ui/server/api/discovery.js +185 -0
  48. package/management-ui/server/api/environment/index.js +1 -0
  49. package/management-ui/server/api/environment/router.js +378 -0
  50. package/management-ui/server/api/environment.js +328 -0
  51. package/management-ui/server/api/integrations.js +876 -0
  52. package/management-ui/server/api/logs.js +248 -0
  53. package/management-ui/server/api/monitoring.js +282 -0
  54. package/management-ui/server/api/open-ide.js +31 -0
  55. package/management-ui/server/api/project.js +1029 -0
  56. package/management-ui/server/api/users/sessions.js +371 -0
  57. package/management-ui/server/api/users/simulation.js +254 -0
  58. package/management-ui/server/api/users.js +362 -0
  59. package/management-ui/server/api-contract.md +275 -0
  60. package/management-ui/server/index.js +873 -0
  61. package/management-ui/server/middleware/errorHandler.js +93 -0
  62. package/management-ui/server/middleware/security.js +32 -0
  63. package/management-ui/server/processManager.js +296 -0
  64. package/management-ui/server/server.js +346 -0
  65. package/management-ui/server/services/aws-monitor.js +413 -0
  66. package/management-ui/server/services/npm-registry.js +347 -0
  67. package/management-ui/server/services/template-engine.js +538 -0
  68. package/management-ui/server/utils/cliIntegration.js +220 -0
  69. package/management-ui/server/utils/environment/auditLogger.js +471 -0
  70. package/management-ui/server/utils/environment/awsParameterStore.js +275 -0
  71. package/management-ui/server/utils/environment/encryption.js +278 -0
  72. package/management-ui/server/utils/environment/envFileManager.js +286 -0
  73. package/management-ui/server/utils/import-commonjs.js +28 -0
  74. package/management-ui/server/utils/response.js +83 -0
  75. package/management-ui/server/websocket/handler.js +325 -0
  76. package/management-ui/src/App.jsx +25 -0
  77. package/management-ui/src/assets/FriggLogo.svg +1 -0
  78. package/management-ui/src/components/AppRouter.jsx +65 -0
  79. package/management-ui/src/components/Button.jsx +70 -0
  80. package/management-ui/src/components/Card.jsx +97 -0
  81. package/management-ui/src/components/EnvironmentCompare.jsx +400 -0
  82. package/management-ui/src/components/EnvironmentEditor.jsx +372 -0
  83. package/management-ui/src/components/EnvironmentImportExport.jsx +469 -0
  84. package/management-ui/src/components/EnvironmentSchema.jsx +491 -0
  85. package/management-ui/src/components/EnvironmentSecurity.jsx +463 -0
  86. package/management-ui/src/components/ErrorBoundary.jsx +73 -0
  87. package/management-ui/src/components/IntegrationCard.jsx +481 -0
  88. package/management-ui/src/components/IntegrationCardEnhanced.jsx +770 -0
  89. package/management-ui/src/components/IntegrationExplorer.jsx +379 -0
  90. package/management-ui/src/components/IntegrationStatus.jsx +336 -0
  91. package/management-ui/src/components/Layout.jsx +716 -0
  92. package/management-ui/src/components/LoadingSpinner.jsx +113 -0
  93. package/management-ui/src/components/RepositoryPicker.jsx +248 -0
  94. package/management-ui/src/components/SessionMonitor.jsx +350 -0
  95. package/management-ui/src/components/StatusBadge.jsx +208 -0
  96. package/management-ui/src/components/UserContextSwitcher.jsx +212 -0
  97. package/management-ui/src/components/UserSimulation.jsx +327 -0
  98. package/management-ui/src/components/Welcome.jsx +434 -0
  99. package/management-ui/src/components/codegen/APIEndpointGenerator.jsx +637 -0
  100. package/management-ui/src/components/codegen/APIModuleSelector.jsx +227 -0
  101. package/management-ui/src/components/codegen/CodeGenerationWizard.jsx +247 -0
  102. package/management-ui/src/components/codegen/CodePreviewEditor.jsx +316 -0
  103. package/management-ui/src/components/codegen/DynamicModuleForm.jsx +271 -0
  104. package/management-ui/src/components/codegen/FormBuilder.jsx +737 -0
  105. package/management-ui/src/components/codegen/IntegrationGenerator.jsx +855 -0
  106. package/management-ui/src/components/codegen/ProjectScaffoldWizard.jsx +797 -0
  107. package/management-ui/src/components/codegen/SchemaBuilder.jsx +303 -0
  108. package/management-ui/src/components/codegen/TemplateSelector.jsx +586 -0
  109. package/management-ui/src/components/codegen/index.js +10 -0
  110. package/management-ui/src/components/connections/ConnectionConfigForm.jsx +362 -0
  111. package/management-ui/src/components/connections/ConnectionHealthMonitor.jsx +182 -0
  112. package/management-ui/src/components/connections/ConnectionTester.jsx +200 -0
  113. package/management-ui/src/components/connections/EntityRelationshipMapper.jsx +292 -0
  114. package/management-ui/src/components/connections/OAuthFlow.jsx +204 -0
  115. package/management-ui/src/components/connections/index.js +5 -0
  116. package/management-ui/src/components/index.js +21 -0
  117. package/management-ui/src/components/monitoring/APIGatewayMetrics.jsx +222 -0
  118. package/management-ui/src/components/monitoring/LambdaMetrics.jsx +169 -0
  119. package/management-ui/src/components/monitoring/MetricsChart.jsx +197 -0
  120. package/management-ui/src/components/monitoring/MonitoringDashboard.jsx +393 -0
  121. package/management-ui/src/components/monitoring/SQSMetrics.jsx +246 -0
  122. package/management-ui/src/components/monitoring/index.js +6 -0
  123. package/management-ui/src/components/monitoring/monitoring.css +218 -0
  124. package/management-ui/src/components/theme-provider.jsx +52 -0
  125. package/management-ui/src/components/theme-toggle.jsx +39 -0
  126. package/management-ui/src/components/ui/badge.tsx +36 -0
  127. package/management-ui/src/components/ui/button.test.jsx +56 -0
  128. package/management-ui/src/components/ui/button.tsx +57 -0
  129. package/management-ui/src/components/ui/card.tsx +76 -0
  130. package/management-ui/src/components/ui/dropdown-menu.tsx +199 -0
  131. package/management-ui/src/components/ui/select.tsx +157 -0
  132. package/management-ui/src/components/ui/skeleton.jsx +15 -0
  133. package/management-ui/src/hooks/useFrigg.jsx +387 -0
  134. package/management-ui/src/hooks/useSocket.jsx +58 -0
  135. package/management-ui/src/index.css +193 -0
  136. package/management-ui/src/lib/utils.ts +6 -0
  137. package/management-ui/src/main.jsx +10 -0
  138. package/management-ui/src/pages/CodeGeneration.jsx +14 -0
  139. package/management-ui/src/pages/Connections.jsx +252 -0
  140. package/management-ui/src/pages/ConnectionsEnhanced.jsx +633 -0
  141. package/management-ui/src/pages/Dashboard.jsx +311 -0
  142. package/management-ui/src/pages/Environment.jsx +314 -0
  143. package/management-ui/src/pages/IntegrationConfigure.jsx +669 -0
  144. package/management-ui/src/pages/IntegrationDiscovery.jsx +567 -0
  145. package/management-ui/src/pages/IntegrationTest.jsx +742 -0
  146. package/management-ui/src/pages/Integrations.jsx +253 -0
  147. package/management-ui/src/pages/Monitoring.jsx +17 -0
  148. package/management-ui/src/pages/Simulation.jsx +155 -0
  149. package/management-ui/src/pages/Users.jsx +492 -0
  150. package/management-ui/src/services/api.js +41 -0
  151. package/management-ui/src/services/apiModuleService.js +193 -0
  152. package/management-ui/src/services/websocket-handlers.js +120 -0
  153. package/management-ui/src/test/api/project.test.js +273 -0
  154. package/management-ui/src/test/components/Welcome.test.jsx +378 -0
  155. package/management-ui/src/test/mocks/server.js +178 -0
  156. package/management-ui/src/test/setup.js +61 -0
  157. package/management-ui/src/test/utils/test-utils.jsx +134 -0
  158. package/management-ui/src/utils/repository.js +98 -0
  159. package/management-ui/src/utils/repository.test.js +118 -0
  160. package/management-ui/src/workflows/phase2-integration-workflows.js +884 -0
  161. package/management-ui/tailwind.config.js +63 -0
  162. package/management-ui/tsconfig.json +37 -0
  163. package/management-ui/tsconfig.node.json +10 -0
  164. package/management-ui/vite.config.js +26 -0
  165. package/management-ui/vitest.config.js +38 -0
  166. package/package.json +7 -17
  167. package/frigg-cli/__tests__/application/use-cases/AddApiModuleToIntegrationUseCase.test.js +0 -326
  168. package/frigg-cli/__tests__/application/use-cases/CreateApiModuleUseCase.test.js +0 -337
  169. package/frigg-cli/__tests__/domain/entities/ApiModule.test.js +0 -373
  170. package/frigg-cli/__tests__/domain/entities/AppDefinition.test.js +0 -313
  171. package/frigg-cli/__tests__/domain/services/IntegrationValidator.test.js +0 -269
  172. package/frigg-cli/__tests__/domain/value-objects/IntegrationName.test.js +0 -82
  173. package/frigg-cli/__tests__/infrastructure/adapters/IntegrationJsUpdater.test.js +0 -408
  174. package/frigg-cli/__tests__/infrastructure/repositories/FileSystemApiModuleRepository.test.js +0 -583
  175. package/frigg-cli/__tests__/infrastructure/repositories/FileSystemAppDefinitionRepository.test.js +0 -314
  176. package/frigg-cli/__tests__/infrastructure/repositories/FileSystemIntegrationRepository.test.js +0 -430
  177. package/frigg-cli/__tests__/unit/commands/init.test.js +0 -406
  178. package/frigg-cli/__tests__/unit/commands/repair.test.js +0 -275
  179. package/frigg-cli/__tests__/unit/start-command/application/RunPreflightChecksUseCase.test.js +0 -411
  180. package/frigg-cli/__tests__/unit/start-command/infrastructure/DatabaseAdapter.test.js +0 -405
  181. package/frigg-cli/__tests__/unit/start-command/infrastructure/DockerAdapter.test.js +0 -496
  182. package/frigg-cli/__tests__/unit/start-command/presentation/InteractivePromptAdapter.test.js +0 -474
  183. package/frigg-cli/__tests__/unit/utils/output.test.js +0 -196
  184. package/frigg-cli/application/use-cases/AddApiModuleToIntegrationUseCase.js +0 -93
  185. package/frigg-cli/application/use-cases/CreateApiModuleUseCase.js +0 -93
  186. package/frigg-cli/application/use-cases/CreateIntegrationUseCase.js +0 -103
  187. package/frigg-cli/container.js +0 -172
  188. package/frigg-cli/docs/OUTPUT_MIGRATION_GUIDE.md +0 -286
  189. package/frigg-cli/domain/entities/ApiModule.js +0 -272
  190. package/frigg-cli/domain/entities/AppDefinition.js +0 -227
  191. package/frigg-cli/domain/entities/Integration.js +0 -198
  192. package/frigg-cli/domain/exceptions/DomainException.js +0 -24
  193. package/frigg-cli/domain/ports/IApiModuleRepository.js +0 -53
  194. package/frigg-cli/domain/ports/IAppDefinitionRepository.js +0 -43
  195. package/frigg-cli/domain/ports/IIntegrationRepository.js +0 -61
  196. package/frigg-cli/domain/services/IntegrationValidator.js +0 -185
  197. package/frigg-cli/domain/value-objects/IntegrationId.js +0 -42
  198. package/frigg-cli/domain/value-objects/IntegrationName.js +0 -60
  199. package/frigg-cli/domain/value-objects/SemanticVersion.js +0 -70
  200. package/frigg-cli/infrastructure/UnitOfWork.js +0 -46
  201. package/frigg-cli/infrastructure/adapters/BackendJsUpdater.js +0 -197
  202. package/frigg-cli/infrastructure/adapters/FileSystemAdapter.js +0 -224
  203. package/frigg-cli/infrastructure/adapters/IntegrationJsUpdater.js +0 -249
  204. package/frigg-cli/infrastructure/adapters/SchemaValidator.js +0 -92
  205. package/frigg-cli/infrastructure/repositories/FileSystemApiModuleRepository.js +0 -373
  206. package/frigg-cli/infrastructure/repositories/FileSystemAppDefinitionRepository.js +0 -116
  207. package/frigg-cli/infrastructure/repositories/FileSystemIntegrationRepository.js +0 -277
  208. package/frigg-cli/package-lock.json +0 -16226
  209. package/frigg-cli/start-command/application/RunPreflightChecksUseCase.js +0 -376
  210. package/frigg-cli/start-command/infrastructure/DatabaseAdapter.js +0 -591
  211. package/frigg-cli/start-command/infrastructure/DockerAdapter.js +0 -306
  212. package/frigg-cli/start-command/presentation/InteractivePromptAdapter.js +0 -329
  213. package/frigg-cli/templates/backend/.env.example +0 -62
  214. package/frigg-cli/templates/backend/.eslintrc.json +0 -12
  215. package/frigg-cli/templates/backend/.prettierrc +0 -6
  216. package/frigg-cli/templates/backend/docker-compose.yml +0 -22
  217. package/frigg-cli/templates/backend/index.js +0 -96
  218. package/frigg-cli/templates/backend/infrastructure.js +0 -12
  219. package/frigg-cli/templates/backend/jest.config.js +0 -17
  220. package/frigg-cli/templates/backend/package.json +0 -50
  221. package/frigg-cli/templates/backend/src/api-modules/.gitkeep +0 -10
  222. package/frigg-cli/templates/backend/src/base/.gitkeep +0 -7
  223. package/frigg-cli/templates/backend/src/integrations/.gitkeep +0 -10
  224. package/frigg-cli/templates/backend/src/integrations/ExampleIntegration.js +0 -65
  225. package/frigg-cli/templates/backend/src/utils/.gitkeep +0 -7
  226. package/frigg-cli/templates/backend/test/setup.js +0 -30
  227. package/frigg-cli/templates/backend/ui-extensions/.gitkeep +0 -0
  228. package/frigg-cli/templates/backend/ui-extensions/README.md +0 -77
  229. package/frigg-cli/utils/__tests__/repo-detection.test.js +0 -436
  230. package/frigg-cli/utils/output.js +0 -382
  231. package/frigg-cli/validate-command/__tests__/adapters/validate-command.test.js +0 -205
  232. package/frigg-cli/validate-command/__tests__/application/validate-app-use-case.test.js +0 -104
  233. package/frigg-cli/validate-command/__tests__/domain/fix-suggestion.test.js +0 -153
  234. package/frigg-cli/validate-command/__tests__/domain/validation-error.test.js +0 -162
  235. package/frigg-cli/validate-command/__tests__/domain/validation-result.test.js +0 -152
  236. package/frigg-cli/validate-command/__tests__/infrastructure/api-module-validator.test.js +0 -332
  237. package/frigg-cli/validate-command/__tests__/infrastructure/app-definition-validator.test.js +0 -191
  238. package/frigg-cli/validate-command/__tests__/infrastructure/integration-class-validator.test.js +0 -146
  239. package/frigg-cli/validate-command/__tests__/infrastructure/template-validation.test.js +0 -155
  240. package/frigg-cli/validate-command/adapters/cli/validate-command.js +0 -199
  241. package/frigg-cli/validate-command/application/use-cases/validate-app-use-case.js +0 -35
  242. package/frigg-cli/validate-command/domain/entities/validation-result.js +0 -74
  243. package/frigg-cli/validate-command/domain/value-objects/fix-suggestion.js +0 -74
  244. package/frigg-cli/validate-command/domain/value-objects/validation-error.js +0 -68
  245. package/frigg-cli/validate-command/infrastructure/validators/api-module-validator.js +0 -181
  246. package/frigg-cli/validate-command/infrastructure/validators/app-definition-validator.js +0 -128
  247. package/frigg-cli/validate-command/infrastructure/validators/integration-class-validator.js +0 -113
@@ -589,8 +589,10 @@ describe('CloudFormationDiscovery', () => {
589
589
 
590
590
  describe('External VPC with routing infrastructure pattern', () => {
591
591
  it('should discover routing resources when VPC is external', async () => {
592
+ // This tests the external VPC pattern: external VPC/subnets/KMS,
593
+ // but stack creates routing infrastructure (route table, NAT route, VPC endpoints)
592
594
  const mockStack = {
593
- StackName: 'frigg-app-production',
595
+ StackName: 'create-frigg-app-production',
594
596
  Outputs: [],
595
597
  };
596
598
 
@@ -636,7 +638,7 @@ describe('CloudFormationDiscovery', () => {
636
638
  mockProvider.describeStack.mockResolvedValue(mockStack);
637
639
  mockProvider.listStackResources.mockResolvedValue(mockResources);
638
640
 
639
- const result = await cfDiscovery.discoverFromStack('frigg-app-production');
641
+ const result = await cfDiscovery.discoverFromStack('create-frigg-app-production');
640
642
 
641
643
  // Verify routing infrastructure was discovered
642
644
  expect(result.routeTableId).toBe('rtb-0b83aca77ccde20a6');
@@ -805,8 +807,9 @@ describe('CloudFormationDiscovery', () => {
805
807
 
806
808
  describe('existingLogicalIds tracking', () => {
807
809
  it('should track OLD VPC endpoint logical IDs (VPCEndpointS3 pattern) for backwards compatibility', async () => {
810
+ // CRITICAL: Frontify production uses OLD naming convention
808
811
  const mockStack = {
809
- StackName: 'frigg-app-production',
812
+ StackName: 'create-frigg-app-production',
810
813
  Outputs: []
811
814
  };
812
815
 
@@ -822,7 +825,7 @@ describe('CloudFormationDiscovery', () => {
822
825
  mockProvider.describeStack.mockResolvedValue(mockStack);
823
826
  mockProvider.listStackResources.mockResolvedValue(mockResources);
824
827
 
825
- const result = await cfDiscovery.discoverFromStack('frigg-app-production');
828
+ const result = await cfDiscovery.discoverFromStack('create-frigg-app-production');
826
829
 
827
830
  // CRITICAL: existingLogicalIds MUST contain old VPC endpoint names
828
831
  expect(result.existingLogicalIds).toBeDefined();
@@ -88,8 +88,8 @@ async function gatherDiscoveredResources(appDefinition) {
88
88
 
89
89
  // Build discovery configuration
90
90
  const stage = process.env.SLS_STAGE || 'dev';
91
- const stackName = `${appDefinition.name || 'frigg-app'}-${stage}`;
92
- const serviceName = appDefinition.name || 'frigg-app';
91
+ const stackName = `${appDefinition.name || 'create-frigg-app'}-${stage}`;
92
+ const serviceName = appDefinition.name || 'create-frigg-app';
93
93
 
94
94
  // Try CloudFormation-first discovery
95
95
  const cfDiscovery = new CloudFormationDiscovery(provider, { serviceName, stage });
@@ -135,9 +135,9 @@ async function gatherDiscoveredResources(appDefinition) {
135
135
  // KMS keys CAN be shared across stages (encryption keys are safe to reuse)
136
136
  const kmsDiscovery = new KmsDiscovery(provider);
137
137
  const kmsConfig = {
138
- serviceName: appDefinition.name || 'frigg-app',
138
+ serviceName: appDefinition.name || 'create-frigg-app',
139
139
  stage,
140
- keyAlias: `alias/${appDefinition.name || 'frigg-app'}-${stage}-frigg-kms`,
140
+ keyAlias: `alias/${appDefinition.name || 'create-frigg-app'}-${stage}-frigg-kms`,
141
141
  };
142
142
  const kmsResult = await kmsDiscovery.discover(kmsConfig);
143
143
 
@@ -166,7 +166,7 @@ async function gatherDiscoveredResources(appDefinition) {
166
166
  const ssmDiscovery = new SsmDiscovery(provider);
167
167
 
168
168
  const config = {
169
- serviceName: appDefinition.name || 'frigg-app',
169
+ serviceName: appDefinition.name || 'create-frigg-app',
170
170
  stage,
171
171
  vpcId: appDefinition.vpc?.vpcId,
172
172
  databaseId: appDefinition.database?.postgres?.clusterId ||
@@ -219,7 +219,7 @@ describe('Discovery Result Utilities', () => {
219
219
  ],
220
220
  external: [],
221
221
  fromCloudFormation: true,
222
- stackName: 'frigg-app-production'
222
+ stackName: 'create-frigg-app-production'
223
223
  };
224
224
 
225
225
  expect(discovery.fromCloudFormation).toBe(true);
@@ -81,13 +81,7 @@ function createBaseDefinition(
81
81
  'node_modules/serverless-kms-grants/**',
82
82
  // Note: DO NOT exclude serverless-http - it's a runtime dependency!
83
83
 
84
- // Exclude local dev files and environment files (NEVER deploy .env files!)
85
- '.env',
86
- '.env.*',
87
- '.env.local',
88
- '.env.*.local',
89
- '**/.env',
90
- '**/.env.*',
84
+ // Exclude local dev files
91
85
  'deploy.log',
92
86
  '.env.backup',
93
87
  'docker-compose.yml',
@@ -130,14 +124,6 @@ function createBaseDefinition(
130
124
  'node_modules/@friggframework/core/node_modules/**',
131
125
  'node_modules/@friggframework/devtools/node_modules/**',
132
126
 
133
- // Exclude environment files (NEVER deploy .env files!)
134
- '.env',
135
- '.env.*',
136
- '.env.local',
137
- '.env.*.local',
138
- '**/.env',
139
- '**/.env.*',
140
-
141
127
  // Exclude development/test files from backend project
142
128
  'coverage/**',
143
129
  'test/**',
@@ -165,7 +151,7 @@ function createBaseDefinition(
165
151
 
166
152
  return {
167
153
  frameworkVersion: '>=3.17.0',
168
- service: AppDefinition.name || 'frigg-app',
154
+ service: AppDefinition.name || 'create-frigg-app',
169
155
  package: {
170
156
  individually: true,
171
157
  },
@@ -311,15 +297,6 @@ function createBaseDefinition(
311
297
  { httpApi: { path: '/health/{proxy+}', method: 'GET' } },
312
298
  ],
313
299
  },
314
- docs: {
315
- handler: 'node_modules/@friggframework/core/handlers/routers/docs.handler',
316
- skipEsbuild: true,
317
- package: skipEsbuildPackageConfig,
318
- events: [
319
- { httpApi: { path: '/api/docs', method: 'GET' } },
320
- { httpApi: { path: '/api/openapi.json', method: 'GET' } },
321
- ],
322
- },
323
300
  // Note: dbMigrate removed - MigrationBuilder now handles migration infrastructure
324
301
  // See: packages/devtools/infrastructure/domains/database/migration-builder.js
325
302
  },
@@ -30,10 +30,10 @@ describe('Base Definition Factory', () => {
30
30
  expect(result.provider.stage).toBe('${opt:stage}');
31
31
  });
32
32
 
33
- it('should default service name to frigg-app', () => {
33
+ it('should default service name to create-frigg-app', () => {
34
34
  const result = createBaseDefinition({}, {}, {});
35
35
 
36
- expect(result.service).toBe('frigg-app');
36
+ expect(result.service).toBe('create-frigg-app');
37
37
  });
38
38
 
39
39
  it('should use custom provider if specified', () => {
@@ -157,7 +157,7 @@ describe('composeServerlessDefinition', () => {
157
157
 
158
158
  const result = await composeServerlessDefinition(appDefinition);
159
159
 
160
- expect(result.service).toBe('frigg-app');
160
+ expect(result.service).toBe('create-frigg-app');
161
161
  });
162
162
 
163
163
  it('should use custom provider when specified', async () => {
@@ -1859,7 +1859,7 @@ describe('composeServerlessDefinition', () => {
1859
1859
 
1860
1860
  await expect(composeServerlessDefinition(appDefinition)).resolves.not.toThrow();
1861
1861
  const result = await composeServerlessDefinition(appDefinition);
1862
- expect(result.service).toBe('frigg-app');
1862
+ expect(result.service).toBe('create-frigg-app');
1863
1863
  });
1864
1864
 
1865
1865
  it('should handle null/undefined integrations', async () => {
@@ -0,0 +1,3 @@
1
+ Build completed: 2025-11-17T22:06:29.204Z
2
+ Node: v20.12.1
3
+ Platform: darwin
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "prisma-lambda-layer",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "dependencies": {
6
+ "@prisma/client": "^6.16.3"
7
+ }
8
+ }
@@ -0,0 +1,22 @@
1
+ module.exports = {
2
+ root: true,
3
+ env: { browser: true, es2020: true },
4
+ extends: [
5
+ 'eslint:recommended',
6
+ '@eslint/js/recommended',
7
+ 'plugin:react/recommended',
8
+ 'plugin:react/jsx-runtime',
9
+ 'plugin:react-hooks/recommended',
10
+ ],
11
+ ignorePatterns: ['dist', '.eslintrc.js'],
12
+ parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
13
+ settings: { react: { version: '18.3' } },
14
+ plugins: ['react-refresh'],
15
+ rules: {
16
+ 'react/jsx-no-target-blank': 'off',
17
+ 'react-refresh/only-export-components': [
18
+ 'warn',
19
+ { allowConstantExport: true },
20
+ ],
21
+ },
22
+ }
@@ -1,24 +1,17 @@
1
1
  # Frigg Management UI
2
2
 
3
- A modern React-based **developer tool** for managing local Frigg projects. Built with Vite, React, and Tailwind CSS following DDD/Hexagonal architecture principles.
4
-
5
- ## Purpose
6
-
7
- The Management UI is a **local development tool** for Frigg framework developers to:
8
- - Manage Frigg project lifecycle (start/stop/inspect)
9
- - Perform git operations (branch management, sync)
10
- - Test integrations using `@friggframework/ui` in a sandboxed environment
11
-
12
- **NOT for runtime integration management** - that's handled by `@friggframework/ui` in deployed applications.
3
+ A modern React-based management interface for Frigg development environment. Built with Vite, React, and Tailwind CSS, this application provides developers with a comprehensive dashboard to manage integrations, users, connections, and environment variables.
13
4
 
14
5
  ## Features
15
6
 
16
- - **Project Management**: Discover, initialize, start/stop local Frigg projects
17
- - **Git Operations**: Branch management, repository status, sync operations
18
- - **Test Area**: Sandboxed environment using `@friggframework/ui` for integration testing
19
- - **Real-time Updates**: WebSocket-based live updates for process status
7
+ - **Dashboard**: Server control, metrics, and activity monitoring
8
+ - **Integration Discovery**: Browse, install, and manage Frigg integrations
9
+ - **Environment Management**: Configure environment variables and settings
10
+ - **User Management**: Create and manage test users
11
+ - **Connection Management**: Monitor and manage integration connections
12
+ - **Real-time Updates**: WebSocket-based live updates
20
13
  - **Responsive Design**: Mobile-friendly interface
21
- - **DDD Architecture**: Clean separation of concerns with hexagonal architecture
14
+ - **Error Boundaries**: Robust error handling
22
15
 
23
16
  ## Tech Stack
24
17
 
@@ -35,153 +28,111 @@ The Management UI is a **local development tool** for Frigg framework developers
35
28
 
36
29
  ### Prerequisites
37
30
 
38
- - Node.js 18+ and npm
39
- - A Frigg project directory to manage
40
-
41
- ### Quick Start
42
-
43
- ```bash
44
- # From any Frigg project directory
45
- frigg ui
46
-
47
- # Or install and run globally
48
- npm install -g @friggframework/devtools
49
- frigg ui
50
- ```
31
+ - Node.js 16+ and npm
32
+ - Running Frigg backend server
51
33
 
52
- ### Development
34
+ ### Installation
53
35
 
54
36
  ```bash
55
37
  # Install dependencies
56
38
  npm install
57
39
 
58
- # Start development server (frontend + backend)
59
- npm run dev:server
60
-
61
- # Frontend only
40
+ # Start development server (frontend only)
62
41
  npm run dev
63
42
 
64
- # Backend only
65
- npm run server:dev
43
+ # Start both frontend and backend
44
+ npm run dev:server
45
+
46
+ # Build for production
47
+ npm run build
66
48
  ```
67
49
 
68
50
  ### Available Scripts
69
51
 
70
- - `npm run dev` - Start Vite development server (port 5173)
52
+ - `npm run dev` - Start Vite development server
71
53
  - `npm run dev:server` - Start both frontend and backend concurrently
72
54
  - `npm run build` - Build for production
73
55
  - `npm run preview` - Preview production build
74
- - `npm run server` - Start backend server (port 3210)
56
+ - `npm run server` - Start backend server only
75
57
  - `npm run server:dev` - Start backend server with nodemon
76
58
  - `npm run lint` - Run ESLint
77
59
  - `npm run lint:fix` - Fix ESLint issues
78
- - `npm run test` - Run Jest tests
60
+ - `npm run typecheck` - Run TypeScript type checking
79
61
 
80
- ## Architecture
81
-
82
- ### DDD/Hexagonal Architecture (Clean Architecture)
83
-
84
- The Management UI follows Domain-Driven Design principles with clear separation of concerns:
62
+ ## Project Structure
85
63
 
86
64
  ```
87
- server/src/
88
- ├── presentation/ # Routes & Controllers (HTTP adapters)
89
- │ ├── routes/
90
- ├── projectRoutes.js # Project management endpoints
91
- ├── gitRoutes.js # Git operation endpoints
92
- │ └── testAreaRoutes.js # Test area endpoints
93
- └── controllers/
94
- ├── ProjectController.js
95
- └── GitController.js
96
- ├── application/ # Use Cases & Services (Business logic)
97
- ├── use-cases/
98
- ├── StartProjectUseCase.js
99
- ├── StopProjectUseCase.js
100
- │ │ ├── InspectProjectUseCase.js
101
- └── git/
102
- ├── CreateBranchUseCase.js
103
- ├── SwitchBranchUseCase.js
104
- │ └── SyncBranchUseCase.js
105
- │ └── services/
106
- ├── ProjectService.js
107
- └── GitService.js
108
- ├── domain/ # Domain Entities & Services
109
- ├── entities/
110
- │ │ ├── Project.js
111
- │ │ └── AppDefinition.js
112
- └── services/
113
- │ ├── ProcessManager.js
114
- │ └── GitService.js
115
- └── infrastructure/ # Repositories & Adapters
116
- ├── repositories/
117
- │ └── FileSystemProjectRepository.js
118
- ├── adapters/
119
- │ ├── FriggCliAdapter.js
120
- │ └── GitAdapter.js
121
- └── persistence/
122
- └── SimpleGitAdapter.js
123
-
124
- src/ # Frontend (React)
125
- ├── presentation/ # UI Layer
126
- │ ├── components/
127
- │ │ ├── common/ # Shared UI components
128
- │ │ ├── admin/ # Admin view components
129
- │ │ └── zones/ # Zone-based organization
130
- │ ├── pages/
131
- │ └── hooks/
132
- ├── application/ # Frontend use cases
133
- ├── domain/ # Frontend domain models
134
- └── infrastructure/ # API clients
65
+ src/
66
+ ├── components/ # Reusable UI components
67
+ │ ├── Button.jsx # Custom button component
68
+ │ ├── Card.jsx # Card container components
69
+ │ ├── ErrorBoundary.jsx
70
+ ├── IntegrationCard.jsx
71
+ ├── Layout.jsx # Main layout component
72
+ ├── LoadingSpinner.jsx
73
+ ├── StatusBadge.jsx
74
+ │ └── index.js # Component exports
75
+ ├── hooks/ # React hooks
76
+ │ ├── useFrigg.jsx # Main Frigg state management
77
+ └── useSocket.jsx # WebSocket connection
78
+ ├── pages/ # Page components
79
+ ├── Dashboard.jsx # Main dashboard
80
+ │ ├── Integrations.jsx
81
+ │ ├── Environment.jsx
82
+ ├── Users.jsx
83
+ │ └── Connections.jsx
84
+ ├── services/ # API services
85
+ └── api.js # Axios configuration
86
+ ├── utils/ # Utility functions
87
+ └── cn.js # Class name utility
88
+ ├── App.jsx # Root component
89
+ ├── main.jsx # Application entry point
90
+ └── index.css # Global styles
91
+
92
+ server/
93
+ ├── api/ # Backend API routes
94
+ ├── middleware/ # Express middleware
95
+ ├── utils/ # Server utilities
96
+ ├── websocket/ # WebSocket handlers
97
+ └── index.js # Server entry point
135
98
  ```
136
99
 
137
- ## Core Functionality
138
-
139
- ### 1. Project Management
140
- - **Discover Projects**: Automatically find Frigg projects in your workspace
141
- - **Initialize**: Set up new Frigg projects
142
- - **Start/Stop**: Manage local Frigg process lifecycle
143
- - **Inspect**: Deep project analysis (structure, config, dependencies)
144
-
145
- ### 2. Git Operations
146
- - **Branch Management**: Create, switch, delete branches
147
- - **Repository Status**: Real-time git status and branch info
148
- - **Sync Operations**: Pull, push, and synchronize branches
149
- - **Working Directory**: Track uncommitted changes
150
-
151
- ### 3. Test Area
152
- - **Integration Testing**: Uses `@friggframework/ui` for testing integrations
153
- - **User Simulation**: Switch between test users
154
- - **Live Testing**: Test integrations in real-time with hot reload
155
- - **Same UI**: Test with the exact UI end-users will see
156
-
157
- ## API Endpoints
158
-
159
- The management UI backend exposes clean REST APIs following DDD principles:
160
-
161
- ### Project Management (`/api/projects`)
162
- - `GET /api/projects/discover` - Discover Frigg projects in workspace
163
- - `POST /api/projects/initialize` - Initialize new Frigg project
164
- - `GET /api/projects/inspect` - Deep inspection of project structure
165
- - `GET /api/projects/status` - Get project and process status
166
- - `POST /api/projects/start` - Start Frigg project
167
- - `POST /api/projects/stop` - Stop Frigg project
168
-
169
- ### Git Operations (`/api/git`)
170
- - `GET /api/git/status` - Repository and branch status
171
- - `GET /api/git/branches` - List all branches
172
- - `POST /api/git/branches` - Create new branch
173
- - `PUT /api/git/branches/:name` - Switch to branch
174
- - `DELETE /api/git/branches/:name` - Delete branch
175
- - `POST /api/git/sync` - Sync branch with remote
176
-
177
- ### Test Area (`/api/test-area`)
178
- - `GET /api/test-area/status` - Check if Frigg is running for testing
179
- - `POST /api/test-area/start` - Start Frigg for test area
180
- - `POST /api/test-area/stop` - Stop test area Frigg instance
181
- - `GET /api/test-area/health` - Health check for test Frigg
182
-
183
- ### System
184
- - `GET /api/health` - Management UI health check
100
+ ## Component Architecture
101
+
102
+ ### Layout Components
103
+ - **Layout**: Main application layout with responsive sidebar
104
+ - **ErrorBoundary**: Catches and displays errors gracefully
105
+
106
+ ### UI Components
107
+ - **Button**: Customizable button with variants and sizes
108
+ - **Card**: Container components for content sections
109
+ - **StatusBadge**: Displays server status with color coding
110
+ - **LoadingSpinner**: Loading indicators
111
+ - **IntegrationCard**: Rich integration display component
112
+
113
+ ### State Management
114
+ - **useFrigg**: Central state management for Frigg data
115
+ - **useSocket**: WebSocket connection and real-time updates
116
+
117
+ ## API Integration
118
+
119
+ The management UI communicates with the Frigg backend through:
120
+
121
+ 1. **REST API**: Standard CRUD operations
122
+ 2. **WebSocket**: Real-time updates and notifications
123
+
124
+ ### API Endpoints
125
+
126
+ - `GET /api/frigg/status` - Server status
127
+ - `POST /api/frigg/start` - Start Frigg server
128
+ - `POST /api/frigg/stop` - Stop Frigg server
129
+ - `GET /api/integrations` - List integrations
130
+ - `POST /api/integrations/install` - Install integration
131
+ - `GET /api/environment` - Environment variables
132
+ - `PUT /api/environment` - Update environment variables
133
+ - `GET /api/users` - List test users
134
+ - `POST /api/users` - Create test user
135
+ - `GET /api/connections` - List connections
185
136
 
186
137
  ## Styling
187
138
 
@@ -205,46 +156,20 @@ This project uses Tailwind CSS for styling with:
205
156
 
206
157
  ## Development
207
158
 
208
- ### DDD/Hexagonal Architecture Guidelines
209
-
210
- **Golden Rule**: Handlers/Controllers ONLY call Use Cases, NEVER Repositories directly.
211
-
212
- ```
213
- Controller → Use Case → Repository → External System
214
- ```
215
-
216
- #### Layer Responsibilities
217
-
218
- 1. **Presentation Layer** (Routes & Controllers)
219
- - HTTP-specific logic only (status codes, headers, response formatting)
220
- - Calls use cases, never repositories
221
- - Thin adapters with minimal logic
222
- - Error mapping (domain errors → HTTP errors)
223
-
224
- 2. **Application Layer** (Use Cases & Services)
225
- - Business logic and orchestration
226
- - Coordinates multiple repository calls
227
- - Enforces business rules
228
- - Receives dependencies via constructor (dependency injection)
229
-
230
- 3. **Domain Layer** (Entities & Domain Services)
231
- - Core business objects
232
- - Domain logic and invariants
233
- - Technology-agnostic
234
-
235
- 4. **Infrastructure Layer** (Repositories & Adapters)
236
- - Pure database/file operations (CRUD)
237
- - External API calls
238
- - No business logic
239
- - Returns raw data
240
-
241
159
  ### Code Style
242
160
 
243
- - **DDD Principles**: Follow hexagonal architecture patterns
244
161
  - **ESLint**: Linting with React and React Hooks rules
245
- - **Functional Components**: React hooks and composition
246
- - **Dependency Injection**: Constructor-based injection
247
- - **Single Responsibility**: Each use case does one thing
162
+ - **Prettier**: Code formatting (recommended)
163
+ - **TypeScript Ready**: Prepared for TypeScript migration
164
+
165
+ ### Best Practices
166
+
167
+ - Functional components with hooks
168
+ - Component composition over inheritance
169
+ - Separation of concerns (UI, state, logic)
170
+ - Error boundaries for robustness
171
+ - Loading states for better UX
172
+ - Responsive design principles
248
173
 
249
174
  ## Building and Deployment
250
175
 
@@ -258,81 +183,20 @@ npm run preview
258
183
 
259
184
  The build output will be in the `dist/` directory and can be served by any static file server.
260
185
 
261
- ## Key Architectural Decisions
262
-
263
- ### Why No Integration Management in Management UI?
264
-
265
- The Management UI is a **developer tool** for managing local Frigg projects. Integration and connection management belongs in `@friggframework/ui`, which is:
266
- - Used by deployed Frigg applications (runtime)
267
- - End-user facing
268
- - Embedded in Test Area for testing
269
-
270
- This separation ensures:
271
- - ✅ Zero duplication between dev tools and runtime UI
272
- - ✅ Clear boundaries of responsibility
273
- - ✅ Developers test with the exact UI end-users see
274
- - ✅ Simpler maintenance (single source of truth)
275
-
276
- ### Test Area Pattern
277
-
278
- The Test Area embeds `@friggframework/ui` to provide:
279
- 1. **Integration testing** with the production UI
280
- 2. **User simulation** for multi-tenant scenarios
281
- 3. **Real-time testing** with hot reload
282
- 4. **Authentication context** for testing flows
283
-
284
186
  ## Environment Variables
285
187
 
286
- ### Backend
287
- - `PORT` - Server port (default: 3210)
288
- - `PROJECT_PATH` - Default project path to manage
188
+ The application automatically detects the environment:
289
189
 
290
- ### Frontend
291
- - Auto-detects environment:
292
- - **Development**: API at `http://localhost:3210`
293
- - **Production**: Same origin
190
+ - **Development**: API calls to `http://localhost:3001`
191
+ - **Production**: API calls to the same origin
294
192
 
295
193
  ## Contributing
296
194
 
297
- 1. **Follow DDD Architecture**:
298
- - Controllers call use cases, not repositories
299
- - Business logic in use cases, not controllers
300
- - Repositories only for data access
301
- 2. **Add error handling** for new features
302
- 3. **Include loading states** for async operations
303
- 4. **Write tests** using the established patterns
304
- 5. **Update documentation** for significant changes
305
- 6. **Use dependency injection** for all dependencies
306
-
307
- ## Testing
308
-
309
- ```bash
310
- # Run server tests
311
- npm run test
312
-
313
- # Run specific test file
314
- npm run test -- path/to/test.js
315
-
316
- # Watch mode
317
- npm run test -- --watch
318
- ```
319
-
320
- ### Test Structure
321
- - **Unit Tests**: Domain entities, value objects
322
- - **Integration Tests**: Use case workflows
323
- - **Controller Tests**: HTTP endpoint behavior
324
-
325
- ## Related Packages
326
-
327
- - **@friggframework/core**: Frigg framework core functionality
328
- - **@friggframework/ui**: Runtime integration UI (used in Test Area)
329
- - **@friggframework/devtools**: CLI tools for Frigg development
330
-
331
- ## Documentation
332
-
333
- - [DDD Architecture](./docs/ARCHITECTURE.md)
334
- - [Cleanup Summary](./CLEANUP_SUMMARY.md)
335
- - [Frigg Framework Docs](https://docs.friggframework.org)
195
+ 1. Follow the existing code style and patterns
196
+ 2. Add error handling for new features
197
+ 3. Include loading states for async operations
198
+ 4. Write tests for new components (when testing is set up)
199
+ 5. Update documentation for significant changes
336
200
 
337
201
  ## License
338
202
 
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": false,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "tailwind.config.js",
8
+ "css": "src/index.css",
9
+ "baseColor": "neutral",
10
+ "cssVariables": true,
11
+ "prefix": ""
12
+ },
13
+ "aliases": {
14
+ "components": "@/components",
15
+ "utils": "@/lib/utils",
16
+ "ui": "@/components/ui",
17
+ "lib": "@/lib",
18
+ "hooks": "@/hooks"
19
+ },
20
+ "iconLibrary": "lucide"
21
+ }