@friggframework/devtools 2.0.0-next.5 → 2.0.0-next.50
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.
- package/frigg-cli/README.md +1290 -0
- package/frigg-cli/__tests__/unit/commands/build.test.js +279 -0
- package/frigg-cli/__tests__/unit/commands/db-setup.test.js +548 -0
- package/frigg-cli/__tests__/unit/commands/deploy.test.js +320 -0
- package/frigg-cli/__tests__/unit/commands/doctor.test.js +309 -0
- package/frigg-cli/__tests__/unit/commands/install.test.js +400 -0
- package/frigg-cli/__tests__/unit/commands/ui.test.js +346 -0
- package/frigg-cli/__tests__/unit/dependencies.test.js +74 -0
- package/frigg-cli/__tests__/unit/utils/database-validator.test.js +366 -0
- package/frigg-cli/__tests__/unit/utils/error-messages.test.js +304 -0
- package/frigg-cli/__tests__/unit/version-detection.test.js +171 -0
- package/frigg-cli/__tests__/utils/mock-factory.js +270 -0
- package/frigg-cli/__tests__/utils/prisma-mock.js +194 -0
- package/frigg-cli/__tests__/utils/test-fixtures.js +463 -0
- package/frigg-cli/__tests__/utils/test-setup.js +287 -0
- package/frigg-cli/build-command/index.js +66 -0
- package/frigg-cli/db-setup-command/index.js +193 -0
- package/frigg-cli/deploy-command/SPEC-DEPLOY-DRY-RUN.md +981 -0
- package/frigg-cli/deploy-command/index.js +302 -0
- package/frigg-cli/doctor-command/index.js +335 -0
- package/frigg-cli/generate-command/__tests__/generate-command.test.js +301 -0
- package/frigg-cli/generate-command/azure-generator.js +43 -0
- package/frigg-cli/generate-command/gcp-generator.js +47 -0
- package/frigg-cli/generate-command/index.js +332 -0
- package/frigg-cli/generate-command/terraform-generator.js +555 -0
- package/frigg-cli/generate-iam-command.js +118 -0
- package/frigg-cli/index.js +154 -1
- package/frigg-cli/index.test.js +1 -4
- package/frigg-cli/init-command/backend-first-handler.js +756 -0
- package/frigg-cli/init-command/index.js +93 -0
- package/frigg-cli/init-command/template-handler.js +143 -0
- package/frigg-cli/install-command/index.js +1 -4
- package/frigg-cli/jest.config.js +124 -0
- package/frigg-cli/package.json +63 -0
- package/frigg-cli/repair-command/index.js +564 -0
- package/frigg-cli/start-command/index.js +125 -6
- package/frigg-cli/start-command/start-command.test.js +297 -0
- package/frigg-cli/test/init-command.test.js +180 -0
- package/frigg-cli/test/npm-registry.test.js +319 -0
- package/frigg-cli/ui-command/index.js +154 -0
- package/frigg-cli/utils/app-resolver.js +319 -0
- package/frigg-cli/utils/backend-path.js +16 -17
- package/frigg-cli/utils/database-validator.js +154 -0
- package/frigg-cli/utils/error-messages.js +257 -0
- package/frigg-cli/utils/npm-registry.js +167 -0
- package/frigg-cli/utils/process-manager.js +199 -0
- package/frigg-cli/utils/repo-detection.js +405 -0
- package/infrastructure/ARCHITECTURE.md +487 -0
- package/infrastructure/CLAUDE.md +481 -0
- package/infrastructure/HEALTH.md +468 -0
- package/infrastructure/README.md +494 -0
- package/infrastructure/__tests__/fixtures/mock-aws-resources.js +391 -0
- package/infrastructure/__tests__/helpers/test-utils.js +277 -0
- package/infrastructure/__tests__/postgres-config.test.js +914 -0
- package/infrastructure/__tests__/template-generation.test.js +687 -0
- package/infrastructure/create-frigg-infrastructure.js +129 -20
- package/infrastructure/docs/POSTGRES-CONFIGURATION.md +630 -0
- package/infrastructure/docs/PRE-DEPLOYMENT-HEALTH-CHECK-SPEC.md +1317 -0
- package/infrastructure/docs/WEBSOCKET-CONFIGURATION.md +105 -0
- package/infrastructure/docs/deployment-instructions.md +268 -0
- package/infrastructure/docs/generate-iam-command.md +278 -0
- package/infrastructure/docs/iam-policy-templates.md +193 -0
- package/infrastructure/domains/database/aurora-builder.js +809 -0
- package/infrastructure/domains/database/aurora-builder.test.js +950 -0
- package/infrastructure/domains/database/aurora-discovery.js +87 -0
- package/infrastructure/domains/database/aurora-discovery.test.js +188 -0
- package/infrastructure/domains/database/aurora-resolver.js +210 -0
- package/infrastructure/domains/database/aurora-resolver.test.js +347 -0
- package/infrastructure/domains/database/migration-builder.js +695 -0
- package/infrastructure/domains/database/migration-builder.test.js +294 -0
- package/infrastructure/domains/database/migration-resolver.js +163 -0
- package/infrastructure/domains/database/migration-resolver.test.js +337 -0
- package/infrastructure/domains/health/application/ports/IPropertyReconciler.js +164 -0
- package/infrastructure/domains/health/application/ports/IResourceDetector.js +129 -0
- package/infrastructure/domains/health/application/ports/IResourceImporter.js +142 -0
- package/infrastructure/domains/health/application/ports/IStackRepository.js +131 -0
- package/infrastructure/domains/health/application/ports/index.js +26 -0
- package/infrastructure/domains/health/application/use-cases/__tests__/execute-resource-import-use-case.test.js +679 -0
- package/infrastructure/domains/health/application/use-cases/__tests__/mismatch-analyzer-method-name.test.js +167 -0
- package/infrastructure/domains/health/application/use-cases/__tests__/repair-via-import-use-case.test.js +1130 -0
- package/infrastructure/domains/health/application/use-cases/execute-resource-import-use-case.js +221 -0
- package/infrastructure/domains/health/application/use-cases/reconcile-properties-use-case.js +152 -0
- package/infrastructure/domains/health/application/use-cases/reconcile-properties-use-case.test.js +343 -0
- package/infrastructure/domains/health/application/use-cases/repair-via-import-use-case.js +535 -0
- package/infrastructure/domains/health/application/use-cases/repair-via-import-use-case.test.js +376 -0
- package/infrastructure/domains/health/application/use-cases/run-health-check-use-case.js +213 -0
- package/infrastructure/domains/health/application/use-cases/run-health-check-use-case.test.js +441 -0
- package/infrastructure/domains/health/docs/ACME-DEV-DRIFT-ANALYSIS.md +267 -0
- package/infrastructure/domains/health/docs/BUILD-VS-DEPLOYED-TEMPLATE-ANALYSIS.md +324 -0
- package/infrastructure/domains/health/docs/ORPHAN-DETECTION-ANALYSIS.md +386 -0
- package/infrastructure/domains/health/docs/SPEC-CLEANUP-COMMAND.md +1419 -0
- package/infrastructure/domains/health/docs/TDD-IMPLEMENTATION-SUMMARY.md +391 -0
- package/infrastructure/domains/health/docs/TEMPLATE-COMPARISON-IMPLEMENTATION.md +551 -0
- package/infrastructure/domains/health/domain/entities/issue.js +299 -0
- package/infrastructure/domains/health/domain/entities/issue.test.js +528 -0
- package/infrastructure/domains/health/domain/entities/property-mismatch.js +108 -0
- package/infrastructure/domains/health/domain/entities/property-mismatch.test.js +275 -0
- package/infrastructure/domains/health/domain/entities/resource.js +159 -0
- package/infrastructure/domains/health/domain/entities/resource.test.js +432 -0
- package/infrastructure/domains/health/domain/entities/stack-health-report.js +306 -0
- package/infrastructure/domains/health/domain/entities/stack-health-report.test.js +601 -0
- package/infrastructure/domains/health/domain/services/__tests__/health-score-percentage-based.test.js +380 -0
- package/infrastructure/domains/health/domain/services/__tests__/import-progress-monitor.test.js +971 -0
- package/infrastructure/domains/health/domain/services/__tests__/import-template-generator.test.js +1150 -0
- package/infrastructure/domains/health/domain/services/__tests__/logical-id-mapper.test.js +672 -0
- package/infrastructure/domains/health/domain/services/__tests__/template-parser.test.js +496 -0
- package/infrastructure/domains/health/domain/services/__tests__/update-progress-monitor.test.js +419 -0
- package/infrastructure/domains/health/domain/services/health-score-calculator.js +248 -0
- package/infrastructure/domains/health/domain/services/health-score-calculator.test.js +504 -0
- package/infrastructure/domains/health/domain/services/import-progress-monitor.js +195 -0
- package/infrastructure/domains/health/domain/services/import-template-generator.js +435 -0
- package/infrastructure/domains/health/domain/services/logical-id-mapper.js +345 -0
- package/infrastructure/domains/health/domain/services/mismatch-analyzer.js +234 -0
- package/infrastructure/domains/health/domain/services/mismatch-analyzer.test.js +431 -0
- package/infrastructure/domains/health/domain/services/property-mutability-config.js +382 -0
- package/infrastructure/domains/health/domain/services/template-parser.js +245 -0
- package/infrastructure/domains/health/domain/services/update-progress-monitor.js +192 -0
- package/infrastructure/domains/health/domain/value-objects/health-score.js +138 -0
- package/infrastructure/domains/health/domain/value-objects/health-score.test.js +267 -0
- package/infrastructure/domains/health/domain/value-objects/property-mutability.js +161 -0
- package/infrastructure/domains/health/domain/value-objects/property-mutability.test.js +198 -0
- package/infrastructure/domains/health/domain/value-objects/resource-state.js +167 -0
- package/infrastructure/domains/health/domain/value-objects/resource-state.test.js +196 -0
- package/infrastructure/domains/health/domain/value-objects/stack-identifier.js +192 -0
- package/infrastructure/domains/health/domain/value-objects/stack-identifier.test.js +262 -0
- package/infrastructure/domains/health/infrastructure/adapters/__tests__/orphan-detection-cfn-tagged.test.js +312 -0
- package/infrastructure/domains/health/infrastructure/adapters/__tests__/orphan-detection-multi-stack.test.js +367 -0
- package/infrastructure/domains/health/infrastructure/adapters/__tests__/orphan-detection-relationship-analysis.test.js +432 -0
- package/infrastructure/domains/health/infrastructure/adapters/aws-property-reconciler.js +784 -0
- package/infrastructure/domains/health/infrastructure/adapters/aws-property-reconciler.test.js +1133 -0
- package/infrastructure/domains/health/infrastructure/adapters/aws-resource-detector.js +565 -0
- package/infrastructure/domains/health/infrastructure/adapters/aws-resource-detector.test.js +554 -0
- package/infrastructure/domains/health/infrastructure/adapters/aws-resource-importer.js +318 -0
- package/infrastructure/domains/health/infrastructure/adapters/aws-resource-importer.test.js +398 -0
- package/infrastructure/domains/health/infrastructure/adapters/aws-stack-repository.js +777 -0
- package/infrastructure/domains/health/infrastructure/adapters/aws-stack-repository.test.js +580 -0
- package/infrastructure/domains/integration/integration-builder.js +397 -0
- package/infrastructure/domains/integration/integration-builder.test.js +593 -0
- package/infrastructure/domains/integration/integration-resolver.js +170 -0
- package/infrastructure/domains/integration/integration-resolver.test.js +369 -0
- package/infrastructure/domains/integration/websocket-builder.js +69 -0
- package/infrastructure/domains/integration/websocket-builder.test.js +195 -0
- package/infrastructure/domains/networking/vpc-builder.js +1829 -0
- package/infrastructure/domains/networking/vpc-builder.test.js +1262 -0
- package/infrastructure/domains/networking/vpc-discovery.js +177 -0
- package/infrastructure/domains/networking/vpc-discovery.test.js +350 -0
- package/infrastructure/domains/networking/vpc-resolver.js +324 -0
- package/infrastructure/domains/networking/vpc-resolver.test.js +501 -0
- package/infrastructure/domains/parameters/ssm-builder.js +79 -0
- package/infrastructure/domains/parameters/ssm-builder.test.js +189 -0
- package/infrastructure/domains/parameters/ssm-discovery.js +84 -0
- package/infrastructure/domains/parameters/ssm-discovery.test.js +210 -0
- package/infrastructure/domains/security/iam-generator.js +816 -0
- package/infrastructure/domains/security/iam-generator.test.js +204 -0
- package/infrastructure/domains/security/kms-builder.js +366 -0
- package/infrastructure/domains/security/kms-builder.test.js +374 -0
- package/infrastructure/domains/security/kms-discovery.js +80 -0
- package/infrastructure/domains/security/kms-discovery.test.js +177 -0
- package/infrastructure/domains/security/kms-resolver.js +96 -0
- package/infrastructure/domains/security/kms-resolver.test.js +216 -0
- package/infrastructure/domains/security/templates/frigg-deployment-iam-stack.yaml +401 -0
- package/infrastructure/domains/security/templates/iam-policy-basic.json +218 -0
- package/infrastructure/domains/security/templates/iam-policy-full.json +288 -0
- package/infrastructure/domains/shared/base-builder.js +112 -0
- package/infrastructure/domains/shared/base-resolver.js +186 -0
- package/infrastructure/domains/shared/base-resolver.test.js +305 -0
- package/infrastructure/domains/shared/builder-orchestrator.js +212 -0
- package/infrastructure/domains/shared/builder-orchestrator.test.js +213 -0
- package/infrastructure/domains/shared/cloudformation-discovery-v2.js +334 -0
- package/infrastructure/domains/shared/cloudformation-discovery.js +375 -0
- package/infrastructure/domains/shared/cloudformation-discovery.test.js +590 -0
- package/infrastructure/domains/shared/environment-builder.js +119 -0
- package/infrastructure/domains/shared/environment-builder.test.js +247 -0
- package/infrastructure/domains/shared/providers/aws-provider-adapter.js +544 -0
- package/infrastructure/domains/shared/providers/aws-provider-adapter.test.js +377 -0
- package/infrastructure/domains/shared/providers/azure-provider-adapter.stub.js +93 -0
- package/infrastructure/domains/shared/providers/cloud-provider-adapter.js +136 -0
- package/infrastructure/domains/shared/providers/gcp-provider-adapter.stub.js +82 -0
- package/infrastructure/domains/shared/providers/provider-factory.js +108 -0
- package/infrastructure/domains/shared/providers/provider-factory.test.js +170 -0
- package/infrastructure/domains/shared/resource-discovery.enhanced.test.js +306 -0
- package/infrastructure/domains/shared/resource-discovery.js +221 -0
- package/infrastructure/domains/shared/resource-discovery.test.js +552 -0
- package/infrastructure/domains/shared/types/app-definition.js +205 -0
- package/infrastructure/domains/shared/types/discovery-result.js +106 -0
- package/infrastructure/domains/shared/types/discovery-result.test.js +258 -0
- package/infrastructure/domains/shared/types/index.js +46 -0
- package/infrastructure/domains/shared/types/resource-ownership.js +108 -0
- package/infrastructure/domains/shared/types/resource-ownership.test.js +101 -0
- package/infrastructure/domains/shared/utilities/base-definition-factory.js +380 -0
- package/infrastructure/domains/shared/utilities/base-definition-factory.js.bak +338 -0
- package/infrastructure/domains/shared/utilities/base-definition-factory.test.js +248 -0
- package/infrastructure/domains/shared/utilities/handler-path-resolver.js +134 -0
- package/infrastructure/domains/shared/utilities/handler-path-resolver.test.js +268 -0
- package/infrastructure/domains/shared/utilities/prisma-layer-manager.js +159 -0
- package/infrastructure/domains/shared/utilities/prisma-layer-manager.test.js +444 -0
- package/infrastructure/domains/shared/validation/env-validator.js +78 -0
- package/infrastructure/domains/shared/validation/env-validator.test.js +173 -0
- package/infrastructure/domains/shared/validation/plugin-validator.js +187 -0
- package/infrastructure/domains/shared/validation/plugin-validator.test.js +323 -0
- package/infrastructure/esbuild.config.js +53 -0
- package/infrastructure/infrastructure-composer.js +109 -0
- package/infrastructure/infrastructure-composer.test.js +1895 -0
- package/infrastructure/integration.test.js +383 -0
- package/infrastructure/scripts/build-prisma-layer.js +553 -0
- package/infrastructure/scripts/build-prisma-layer.test.js +102 -0
- package/infrastructure/scripts/build-time-discovery.js +238 -0
- package/infrastructure/scripts/build-time-discovery.test.js +379 -0
- package/infrastructure/scripts/run-discovery.js +110 -0
- package/layers/prisma/.build-complete +3 -0
- package/layers/prisma/nodejs/package.json +8 -0
- package/management-ui/.eslintrc.js +22 -0
- package/management-ui/README.md +203 -0
- package/management-ui/components.json +21 -0
- package/management-ui/docs/phase2-integration-guide.md +320 -0
- package/management-ui/index.html +13 -0
- package/management-ui/package.json +76 -0
- package/management-ui/packages/devtools/frigg-cli/ui-command/index.js +302 -0
- package/management-ui/postcss.config.js +6 -0
- package/management-ui/server/api/backend.js +256 -0
- package/management-ui/server/api/cli.js +315 -0
- package/management-ui/server/api/codegen.js +663 -0
- package/management-ui/server/api/connections.js +857 -0
- package/management-ui/server/api/discovery.js +185 -0
- package/management-ui/server/api/environment/index.js +1 -0
- package/management-ui/server/api/environment/router.js +378 -0
- package/management-ui/server/api/environment.js +328 -0
- package/management-ui/server/api/integrations.js +876 -0
- package/management-ui/server/api/logs.js +248 -0
- package/management-ui/server/api/monitoring.js +282 -0
- package/management-ui/server/api/open-ide.js +31 -0
- package/management-ui/server/api/project.js +1029 -0
- package/management-ui/server/api/users/sessions.js +371 -0
- package/management-ui/server/api/users/simulation.js +254 -0
- package/management-ui/server/api/users.js +362 -0
- package/management-ui/server/api-contract.md +275 -0
- package/management-ui/server/index.js +873 -0
- package/management-ui/server/middleware/errorHandler.js +93 -0
- package/management-ui/server/middleware/security.js +32 -0
- package/management-ui/server/processManager.js +296 -0
- package/management-ui/server/server.js +346 -0
- package/management-ui/server/services/aws-monitor.js +413 -0
- package/management-ui/server/services/npm-registry.js +347 -0
- package/management-ui/server/services/template-engine.js +538 -0
- package/management-ui/server/utils/cliIntegration.js +220 -0
- package/management-ui/server/utils/environment/auditLogger.js +471 -0
- package/management-ui/server/utils/environment/awsParameterStore.js +275 -0
- package/management-ui/server/utils/environment/encryption.js +278 -0
- package/management-ui/server/utils/environment/envFileManager.js +286 -0
- package/management-ui/server/utils/import-commonjs.js +28 -0
- package/management-ui/server/utils/response.js +83 -0
- package/management-ui/server/websocket/handler.js +325 -0
- package/management-ui/src/App.jsx +25 -0
- package/management-ui/src/assets/FriggLogo.svg +1 -0
- package/management-ui/src/components/AppRouter.jsx +65 -0
- package/management-ui/src/components/Button.jsx +70 -0
- package/management-ui/src/components/Card.jsx +97 -0
- package/management-ui/src/components/EnvironmentCompare.jsx +400 -0
- package/management-ui/src/components/EnvironmentEditor.jsx +372 -0
- package/management-ui/src/components/EnvironmentImportExport.jsx +469 -0
- package/management-ui/src/components/EnvironmentSchema.jsx +491 -0
- package/management-ui/src/components/EnvironmentSecurity.jsx +463 -0
- package/management-ui/src/components/ErrorBoundary.jsx +73 -0
- package/management-ui/src/components/IntegrationCard.jsx +481 -0
- package/management-ui/src/components/IntegrationCardEnhanced.jsx +770 -0
- package/management-ui/src/components/IntegrationExplorer.jsx +379 -0
- package/management-ui/src/components/IntegrationStatus.jsx +336 -0
- package/management-ui/src/components/Layout.jsx +716 -0
- package/management-ui/src/components/LoadingSpinner.jsx +113 -0
- package/management-ui/src/components/RepositoryPicker.jsx +248 -0
- package/management-ui/src/components/SessionMonitor.jsx +350 -0
- package/management-ui/src/components/StatusBadge.jsx +208 -0
- package/management-ui/src/components/UserContextSwitcher.jsx +212 -0
- package/management-ui/src/components/UserSimulation.jsx +327 -0
- package/management-ui/src/components/Welcome.jsx +434 -0
- package/management-ui/src/components/codegen/APIEndpointGenerator.jsx +637 -0
- package/management-ui/src/components/codegen/APIModuleSelector.jsx +227 -0
- package/management-ui/src/components/codegen/CodeGenerationWizard.jsx +247 -0
- package/management-ui/src/components/codegen/CodePreviewEditor.jsx +316 -0
- package/management-ui/src/components/codegen/DynamicModuleForm.jsx +271 -0
- package/management-ui/src/components/codegen/FormBuilder.jsx +737 -0
- package/management-ui/src/components/codegen/IntegrationGenerator.jsx +855 -0
- package/management-ui/src/components/codegen/ProjectScaffoldWizard.jsx +797 -0
- package/management-ui/src/components/codegen/SchemaBuilder.jsx +303 -0
- package/management-ui/src/components/codegen/TemplateSelector.jsx +586 -0
- package/management-ui/src/components/codegen/index.js +10 -0
- package/management-ui/src/components/connections/ConnectionConfigForm.jsx +362 -0
- package/management-ui/src/components/connections/ConnectionHealthMonitor.jsx +182 -0
- package/management-ui/src/components/connections/ConnectionTester.jsx +200 -0
- package/management-ui/src/components/connections/EntityRelationshipMapper.jsx +292 -0
- package/management-ui/src/components/connections/OAuthFlow.jsx +204 -0
- package/management-ui/src/components/connections/index.js +5 -0
- package/management-ui/src/components/index.js +21 -0
- package/management-ui/src/components/monitoring/APIGatewayMetrics.jsx +222 -0
- package/management-ui/src/components/monitoring/LambdaMetrics.jsx +169 -0
- package/management-ui/src/components/monitoring/MetricsChart.jsx +197 -0
- package/management-ui/src/components/monitoring/MonitoringDashboard.jsx +393 -0
- package/management-ui/src/components/monitoring/SQSMetrics.jsx +246 -0
- package/management-ui/src/components/monitoring/index.js +6 -0
- package/management-ui/src/components/monitoring/monitoring.css +218 -0
- package/management-ui/src/components/theme-provider.jsx +52 -0
- package/management-ui/src/components/theme-toggle.jsx +39 -0
- package/management-ui/src/components/ui/badge.tsx +36 -0
- package/management-ui/src/components/ui/button.test.jsx +56 -0
- package/management-ui/src/components/ui/button.tsx +57 -0
- package/management-ui/src/components/ui/card.tsx +76 -0
- package/management-ui/src/components/ui/dropdown-menu.tsx +199 -0
- package/management-ui/src/components/ui/select.tsx +157 -0
- package/management-ui/src/components/ui/skeleton.jsx +15 -0
- package/management-ui/src/hooks/useFrigg.jsx +387 -0
- package/management-ui/src/hooks/useSocket.jsx +58 -0
- package/management-ui/src/index.css +193 -0
- package/management-ui/src/lib/utils.ts +6 -0
- package/management-ui/src/main.jsx +10 -0
- package/management-ui/src/pages/CodeGeneration.jsx +14 -0
- package/management-ui/src/pages/Connections.jsx +252 -0
- package/management-ui/src/pages/ConnectionsEnhanced.jsx +633 -0
- package/management-ui/src/pages/Dashboard.jsx +311 -0
- package/management-ui/src/pages/Environment.jsx +314 -0
- package/management-ui/src/pages/IntegrationConfigure.jsx +669 -0
- package/management-ui/src/pages/IntegrationDiscovery.jsx +567 -0
- package/management-ui/src/pages/IntegrationTest.jsx +742 -0
- package/management-ui/src/pages/Integrations.jsx +253 -0
- package/management-ui/src/pages/Monitoring.jsx +17 -0
- package/management-ui/src/pages/Simulation.jsx +155 -0
- package/management-ui/src/pages/Users.jsx +492 -0
- package/management-ui/src/services/api.js +41 -0
- package/management-ui/src/services/apiModuleService.js +193 -0
- package/management-ui/src/services/websocket-handlers.js +120 -0
- package/management-ui/src/test/api/project.test.js +273 -0
- package/management-ui/src/test/components/Welcome.test.jsx +378 -0
- package/management-ui/src/test/mocks/server.js +178 -0
- package/management-ui/src/test/setup.js +61 -0
- package/management-ui/src/test/utils/test-utils.jsx +134 -0
- package/management-ui/src/utils/repository.js +98 -0
- package/management-ui/src/utils/repository.test.js +118 -0
- package/management-ui/src/workflows/phase2-integration-workflows.js +884 -0
- package/management-ui/tailwind.config.js +63 -0
- package/management-ui/tsconfig.json +37 -0
- package/management-ui/tsconfig.node.json +10 -0
- package/management-ui/vite.config.js +26 -0
- package/management-ui/vitest.config.js +38 -0
- package/package.json +35 -13
- package/test/index.js +2 -4
- package/test/mock-integration.js +4 -14
- package/infrastructure/app-handler-helpers.js +0 -57
- package/infrastructure/backend-utils.js +0 -87
- package/infrastructure/routers/auth.js +0 -26
- package/infrastructure/routers/integration-defined-routers.js +0 -42
- package/infrastructure/routers/middleware/loadUser.js +0 -15
- package/infrastructure/routers/middleware/requireLoggedInUser.js +0 -12
- package/infrastructure/routers/user.js +0 -41
- package/infrastructure/routers/websocket.js +0 -55
- package/infrastructure/serverless-template.js +0 -291
- package/infrastructure/workers/integration-defined-workers.js +0 -24
- package/test/auther-definition-tester.js +0 -125
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import React, { useState, useMemo } from 'react'
|
|
2
|
+
import { Search, Filter, Grid3X3, List, Package } from 'lucide-react'
|
|
3
|
+
import { useFrigg } from '../hooks/useFrigg'
|
|
4
|
+
import IntegrationCard from '../components/IntegrationCard'
|
|
5
|
+
import { Button } from '../components/Button'
|
|
6
|
+
import { cn } from '../lib/utils'
|
|
7
|
+
|
|
8
|
+
const Integrations = () => {
|
|
9
|
+
const { integrations, installIntegration, uninstallIntegration } = useFrigg()
|
|
10
|
+
const [searchQuery, setSearchQuery] = useState('')
|
|
11
|
+
const [selectedCategory, setSelectedCategory] = useState('all')
|
|
12
|
+
const [viewMode, setViewMode] = useState('grid') // 'grid' or 'list'
|
|
13
|
+
const [installing, setInstalling] = useState(false)
|
|
14
|
+
const [selectedIntegration, setSelectedIntegration] = useState(null)
|
|
15
|
+
|
|
16
|
+
// Mock available integrations - in real app, this would come from API
|
|
17
|
+
const availableIntegrations = [
|
|
18
|
+
{
|
|
19
|
+
name: 'slack',
|
|
20
|
+
displayName: 'Slack',
|
|
21
|
+
description: 'Team communication and collaboration platform',
|
|
22
|
+
category: 'communication',
|
|
23
|
+
tags: ['messaging', 'team', 'notifications'],
|
|
24
|
+
version: '2.1.0',
|
|
25
|
+
docsUrl: 'https://docs.frigg.dev/integrations/slack'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'salesforce',
|
|
29
|
+
displayName: 'Salesforce',
|
|
30
|
+
description: 'Customer relationship management and sales platform',
|
|
31
|
+
category: 'crm',
|
|
32
|
+
tags: ['sales', 'crm', 'leads'],
|
|
33
|
+
version: '1.8.2',
|
|
34
|
+
docsUrl: 'https://docs.frigg.dev/integrations/salesforce'
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'hubspot',
|
|
38
|
+
displayName: 'HubSpot',
|
|
39
|
+
description: 'Inbound marketing, sales, and service software',
|
|
40
|
+
category: 'marketing',
|
|
41
|
+
tags: ['marketing', 'automation', 'analytics'],
|
|
42
|
+
version: '3.0.1',
|
|
43
|
+
docsUrl: 'https://docs.frigg.dev/integrations/hubspot'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'google-sheets',
|
|
47
|
+
displayName: 'Google Sheets',
|
|
48
|
+
description: 'Online spreadsheet collaboration and data management',
|
|
49
|
+
category: 'productivity',
|
|
50
|
+
tags: ['spreadsheet', 'data', 'collaboration'],
|
|
51
|
+
version: '1.5.0',
|
|
52
|
+
docsUrl: 'https://docs.frigg.dev/integrations/google-sheets'
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'stripe',
|
|
56
|
+
displayName: 'Stripe',
|
|
57
|
+
description: 'Online payment processing and financial services',
|
|
58
|
+
category: 'payments',
|
|
59
|
+
tags: ['payments', 'ecommerce', 'billing'],
|
|
60
|
+
version: '2.3.1',
|
|
61
|
+
docsUrl: 'https://docs.frigg.dev/integrations/stripe'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'mailchimp',
|
|
65
|
+
displayName: 'Mailchimp',
|
|
66
|
+
description: 'Email marketing and automation platform',
|
|
67
|
+
category: 'marketing',
|
|
68
|
+
tags: ['email', 'marketing', 'campaigns'],
|
|
69
|
+
version: '1.9.0',
|
|
70
|
+
docsUrl: 'https://docs.frigg.dev/integrations/mailchimp'
|
|
71
|
+
},
|
|
72
|
+
].map(integration => ({
|
|
73
|
+
...integration,
|
|
74
|
+
installed: integrations.some(i => i.name === integration.name),
|
|
75
|
+
connections: Math.floor(Math.random() * 10), // Mock data
|
|
76
|
+
lastUpdated: new Date(Date.now() - Math.random() * 30 * 24 * 60 * 60 * 1000).toISOString()
|
|
77
|
+
}))
|
|
78
|
+
|
|
79
|
+
const categories = ['all', 'communication', 'crm', 'marketing', 'productivity', 'payments']
|
|
80
|
+
|
|
81
|
+
const filteredIntegrations = useMemo(() => {
|
|
82
|
+
return availableIntegrations.filter(integration => {
|
|
83
|
+
const matchesSearch = integration.displayName.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
|
84
|
+
integration.description.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
|
85
|
+
integration.tags.some(tag => tag.toLowerCase().includes(searchQuery.toLowerCase()))
|
|
86
|
+
|
|
87
|
+
const matchesCategory = selectedCategory === 'all' || integration.category === selectedCategory
|
|
88
|
+
return matchesSearch && matchesCategory
|
|
89
|
+
})
|
|
90
|
+
}, [availableIntegrations, searchQuery, selectedCategory])
|
|
91
|
+
|
|
92
|
+
const installedIntegrations = useMemo(() => {
|
|
93
|
+
return availableIntegrations.filter(integration => integration.installed)
|
|
94
|
+
}, [availableIntegrations])
|
|
95
|
+
|
|
96
|
+
const availableForInstall = useMemo(() => {
|
|
97
|
+
return filteredIntegrations.filter(integration => !integration.installed)
|
|
98
|
+
}, [filteredIntegrations])
|
|
99
|
+
|
|
100
|
+
const handleInstall = async (integrationName) => {
|
|
101
|
+
setInstalling(true)
|
|
102
|
+
setSelectedIntegration(integrationName)
|
|
103
|
+
try {
|
|
104
|
+
await installIntegration(integrationName)
|
|
105
|
+
} catch (error) {
|
|
106
|
+
console.error('Installation failed:', error)
|
|
107
|
+
} finally {
|
|
108
|
+
setInstalling(false)
|
|
109
|
+
setSelectedIntegration(null)
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const handleUninstall = async (integrationName) => {
|
|
114
|
+
try {
|
|
115
|
+
if (uninstallIntegration) {
|
|
116
|
+
await uninstallIntegration(integrationName)
|
|
117
|
+
}
|
|
118
|
+
} catch (error) {
|
|
119
|
+
console.error('Uninstall failed:', error)
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const handleConfigure = (integrationName) => {
|
|
124
|
+
// Navigate to configuration page or open modal
|
|
125
|
+
console.log('Configure integration:', integrationName)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return (
|
|
129
|
+
<div className="space-y-6">
|
|
130
|
+
{/* Header */}
|
|
131
|
+
<div>
|
|
132
|
+
<h2 className="text-3xl font-bold text-gray-900">Integration Discovery</h2>
|
|
133
|
+
<p className="mt-2 text-gray-600">Browse and manage Frigg integrations</p>
|
|
134
|
+
</div>
|
|
135
|
+
|
|
136
|
+
{/* Search and Filters */}
|
|
137
|
+
<div className="flex flex-col sm:flex-row gap-4">
|
|
138
|
+
<div className="relative flex-1">
|
|
139
|
+
<Search size={20} className="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400" />
|
|
140
|
+
<input
|
|
141
|
+
type="text"
|
|
142
|
+
className="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
143
|
+
placeholder="Search integrations..."
|
|
144
|
+
value={searchQuery}
|
|
145
|
+
onChange={(e) => setSearchQuery(e.target.value)}
|
|
146
|
+
/>
|
|
147
|
+
</div>
|
|
148
|
+
|
|
149
|
+
<div className="flex items-center gap-2">
|
|
150
|
+
<select
|
|
151
|
+
value={selectedCategory}
|
|
152
|
+
onChange={(e) => setSelectedCategory(e.target.value)}
|
|
153
|
+
className="px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
154
|
+
>
|
|
155
|
+
{categories.map(category => (
|
|
156
|
+
<option key={category} value={category}>
|
|
157
|
+
{category.charAt(0).toUpperCase() + category.slice(1)}
|
|
158
|
+
</option>
|
|
159
|
+
))}
|
|
160
|
+
</select>
|
|
161
|
+
|
|
162
|
+
<div className="flex border border-gray-300 rounded-lg">
|
|
163
|
+
<Button
|
|
164
|
+
variant={viewMode === 'grid' ? 'default' : 'ghost'}
|
|
165
|
+
size="sm"
|
|
166
|
+
onClick={() => setViewMode('grid')}
|
|
167
|
+
className="rounded-r-none"
|
|
168
|
+
>
|
|
169
|
+
<Grid3X3 size={16} />
|
|
170
|
+
</Button>
|
|
171
|
+
<Button
|
|
172
|
+
variant={viewMode === 'list' ? 'default' : 'ghost'}
|
|
173
|
+
size="sm"
|
|
174
|
+
onClick={() => setViewMode('list')}
|
|
175
|
+
className="rounded-l-none border-l"
|
|
176
|
+
>
|
|
177
|
+
<List size={16} />
|
|
178
|
+
</Button>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
|
|
183
|
+
{/* Installed Integrations */}
|
|
184
|
+
{installedIntegrations.length > 0 && (
|
|
185
|
+
<div>
|
|
186
|
+
<div className="flex items-center mb-4">
|
|
187
|
+
<Package size={20} className="mr-2 text-green-600" />
|
|
188
|
+
<h3 className="text-lg font-medium text-gray-900">
|
|
189
|
+
Installed Integrations ({installedIntegrations.length})
|
|
190
|
+
</h3>
|
|
191
|
+
</div>
|
|
192
|
+
<div className={cn(
|
|
193
|
+
viewMode === 'grid'
|
|
194
|
+
? 'grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6'
|
|
195
|
+
: 'space-y-4'
|
|
196
|
+
)}>
|
|
197
|
+
{installedIntegrations.map((integration) => (
|
|
198
|
+
<IntegrationCard
|
|
199
|
+
key={integration.name}
|
|
200
|
+
integration={integration}
|
|
201
|
+
onConfigure={handleConfigure}
|
|
202
|
+
onUninstall={handleUninstall}
|
|
203
|
+
className={viewMode === 'list' ? 'max-w-none' : ''}
|
|
204
|
+
/>
|
|
205
|
+
))}
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
)}
|
|
209
|
+
|
|
210
|
+
{/* Available Integrations */}
|
|
211
|
+
<div>
|
|
212
|
+
<h3 className="text-lg font-medium text-gray-900 mb-4">
|
|
213
|
+
Available Integrations ({availableForInstall.length})
|
|
214
|
+
</h3>
|
|
215
|
+
|
|
216
|
+
{availableForInstall.length === 0 ? (
|
|
217
|
+
<div className="text-center py-12">
|
|
218
|
+
<Package size={48} className="mx-auto text-gray-300 mb-4" />
|
|
219
|
+
<p className="text-gray-500">No integrations found matching your criteria</p>
|
|
220
|
+
<Button
|
|
221
|
+
variant="outline"
|
|
222
|
+
onClick={() => {
|
|
223
|
+
setSearchQuery('')
|
|
224
|
+
setSelectedCategory('all')
|
|
225
|
+
}}
|
|
226
|
+
className="mt-4"
|
|
227
|
+
>
|
|
228
|
+
Clear Filters
|
|
229
|
+
</Button>
|
|
230
|
+
</div>
|
|
231
|
+
) : (
|
|
232
|
+
<div className={cn(
|
|
233
|
+
viewMode === 'grid'
|
|
234
|
+
? 'grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6'
|
|
235
|
+
: 'space-y-4'
|
|
236
|
+
)}>
|
|
237
|
+
{availableForInstall.map((integration) => (
|
|
238
|
+
<IntegrationCard
|
|
239
|
+
key={integration.name}
|
|
240
|
+
integration={integration}
|
|
241
|
+
onInstall={handleInstall}
|
|
242
|
+
installing={installing && selectedIntegration === integration.name}
|
|
243
|
+
className={viewMode === 'list' ? 'max-w-none' : ''}
|
|
244
|
+
/>
|
|
245
|
+
))}
|
|
246
|
+
</div>
|
|
247
|
+
)}
|
|
248
|
+
</div>
|
|
249
|
+
</div>
|
|
250
|
+
)
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export default Integrations
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { Layout } from '../components/Layout'
|
|
3
|
+
import { MonitoringDashboard } from '../components/monitoring'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Monitoring Page Component
|
|
7
|
+
* Provides production monitoring and metrics visualization
|
|
8
|
+
*/
|
|
9
|
+
function Monitoring() {
|
|
10
|
+
return (
|
|
11
|
+
<Layout>
|
|
12
|
+
<MonitoringDashboard />
|
|
13
|
+
</Layout>
|
|
14
|
+
)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default Monitoring
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import { useFrigg } from '../hooks/useFrigg'
|
|
3
|
+
import UserSimulation from '../components/UserSimulation'
|
|
4
|
+
|
|
5
|
+
const Simulation = () => {
|
|
6
|
+
const { users, integrations, currentUser } = useFrigg()
|
|
7
|
+
const [selectedUser, setSelectedUser] = useState(null)
|
|
8
|
+
const [selectedIntegration, setSelectedIntegration] = useState(null)
|
|
9
|
+
|
|
10
|
+
// Use current user context if available
|
|
11
|
+
const simulationUser = selectedUser || currentUser
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div>
|
|
15
|
+
<div className="mb-8">
|
|
16
|
+
<h2 className="text-3xl font-bold text-gray-900">Integration Testing Simulator</h2>
|
|
17
|
+
<p className="mt-2 text-gray-600">Simulate user interactions with integrations for development testing</p>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
{/* Selection Controls */}
|
|
21
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
|
|
22
|
+
{/* User Selection */}
|
|
23
|
+
<div className="bg-white shadow rounded-lg p-6">
|
|
24
|
+
<h3 className="text-lg font-medium text-gray-900 mb-4">Select Test User</h3>
|
|
25
|
+
{currentUser && (
|
|
26
|
+
<div className="mb-4 p-3 bg-blue-50 border border-blue-200 rounded-md">
|
|
27
|
+
<p className="text-sm text-blue-800">
|
|
28
|
+
Using context user: <strong>{currentUser.firstName} {currentUser.lastName}</strong>
|
|
29
|
+
</p>
|
|
30
|
+
</div>
|
|
31
|
+
)}
|
|
32
|
+
<div className="space-y-2 max-h-64 overflow-y-auto">
|
|
33
|
+
{users.length === 0 ? (
|
|
34
|
+
<p className="text-sm text-gray-500 text-center py-4">
|
|
35
|
+
No test users available. Create some users first.
|
|
36
|
+
</p>
|
|
37
|
+
) : (
|
|
38
|
+
users.map(user => (
|
|
39
|
+
<label
|
|
40
|
+
key={user.id}
|
|
41
|
+
className={`flex items-center p-3 border rounded-md cursor-pointer transition-colors ${
|
|
42
|
+
(simulationUser?.id === user.id)
|
|
43
|
+
? 'border-blue-500 bg-blue-50'
|
|
44
|
+
: 'border-gray-200 hover:border-gray-300'
|
|
45
|
+
}`}
|
|
46
|
+
>
|
|
47
|
+
<input
|
|
48
|
+
type="radio"
|
|
49
|
+
name="user"
|
|
50
|
+
value={user.id}
|
|
51
|
+
checked={simulationUser?.id === user.id}
|
|
52
|
+
onChange={() => setSelectedUser(user)}
|
|
53
|
+
className="mr-3"
|
|
54
|
+
/>
|
|
55
|
+
<div className="flex-1">
|
|
56
|
+
<p className="text-sm font-medium text-gray-900">
|
|
57
|
+
{user.firstName} {user.lastName}
|
|
58
|
+
</p>
|
|
59
|
+
<p className="text-xs text-gray-500">{user.email}</p>
|
|
60
|
+
<div className="flex items-center space-x-2 mt-1">
|
|
61
|
+
<span className="text-xs bg-gray-100 text-gray-600 px-2 py-0.5 rounded">
|
|
62
|
+
{user.role}
|
|
63
|
+
</span>
|
|
64
|
+
{user.appOrgId && (
|
|
65
|
+
<span className="text-xs text-gray-500">
|
|
66
|
+
Org: {user.appOrgId}
|
|
67
|
+
</span>
|
|
68
|
+
)}
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</label>
|
|
72
|
+
))
|
|
73
|
+
)}
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
{/* Integration Selection */}
|
|
78
|
+
<div className="bg-white shadow rounded-lg p-6">
|
|
79
|
+
<h3 className="text-lg font-medium text-gray-900 mb-4">Select Integration</h3>
|
|
80
|
+
<div className="space-y-2 max-h-64 overflow-y-auto">
|
|
81
|
+
{integrations.length === 0 ? (
|
|
82
|
+
<p className="text-sm text-gray-500 text-center py-4">
|
|
83
|
+
No integrations available. Install some integrations first.
|
|
84
|
+
</p>
|
|
85
|
+
) : (
|
|
86
|
+
integrations.map(integration => (
|
|
87
|
+
<label
|
|
88
|
+
key={integration.id}
|
|
89
|
+
className={`flex items-center p-3 border rounded-md cursor-pointer transition-colors ${
|
|
90
|
+
selectedIntegration?.id === integration.id
|
|
91
|
+
? 'border-blue-500 bg-blue-50'
|
|
92
|
+
: 'border-gray-200 hover:border-gray-300'
|
|
93
|
+
}`}
|
|
94
|
+
>
|
|
95
|
+
<input
|
|
96
|
+
type="radio"
|
|
97
|
+
name="integration"
|
|
98
|
+
value={integration.id}
|
|
99
|
+
checked={selectedIntegration?.id === integration.id}
|
|
100
|
+
onChange={() => setSelectedIntegration(integration)}
|
|
101
|
+
className="mr-3"
|
|
102
|
+
/>
|
|
103
|
+
<div className="flex-1">
|
|
104
|
+
<p className="text-sm font-medium text-gray-900">
|
|
105
|
+
{integration.name}
|
|
106
|
+
</p>
|
|
107
|
+
<p className="text-xs text-gray-500">
|
|
108
|
+
{integration.description || 'No description'}
|
|
109
|
+
</p>
|
|
110
|
+
<div className="flex items-center space-x-2 mt-1">
|
|
111
|
+
<span className={`text-xs px-2 py-0.5 rounded ${
|
|
112
|
+
integration.status === 'active'
|
|
113
|
+
? 'bg-green-100 text-green-700'
|
|
114
|
+
: 'bg-gray-100 text-gray-600'
|
|
115
|
+
}`}>
|
|
116
|
+
{integration.status || 'inactive'}
|
|
117
|
+
</span>
|
|
118
|
+
<span className="text-xs text-gray-500">
|
|
119
|
+
v{integration.version || '1.0.0'}
|
|
120
|
+
</span>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</label>
|
|
124
|
+
))
|
|
125
|
+
)}
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
{/* Simulation Component */}
|
|
131
|
+
<UserSimulation
|
|
132
|
+
user={simulationUser}
|
|
133
|
+
integration={selectedIntegration}
|
|
134
|
+
/>
|
|
135
|
+
|
|
136
|
+
{/* Help Section */}
|
|
137
|
+
<div className="mt-8 bg-yellow-50 border border-yellow-200 rounded-lg p-6">
|
|
138
|
+
<h4 className="text-sm font-semibold text-yellow-900 mb-2">How to Use the Simulator</h4>
|
|
139
|
+
<ol className="text-sm text-yellow-800 space-y-2 list-decimal list-inside">
|
|
140
|
+
<li>Select a test user or use the current context user from the header</li>
|
|
141
|
+
<li>Choose an integration to test</li>
|
|
142
|
+
<li>Start a simulation session</li>
|
|
143
|
+
<li>Execute actions and observe the responses</li>
|
|
144
|
+
<li>Simulate webhook events to test integration reactions</li>
|
|
145
|
+
<li>Monitor the activity log for debugging</li>
|
|
146
|
+
</ol>
|
|
147
|
+
<p className="text-xs text-yellow-700 mt-3">
|
|
148
|
+
Note: All simulations are for local development only and do not affect real data.
|
|
149
|
+
</p>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export default Simulation
|