@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,434 @@
|
|
|
1
|
+
import React, { useState, useEffect, useCallback } from 'react'
|
|
2
|
+
import { useNavigate } from 'react-router-dom'
|
|
3
|
+
import { useFrigg } from '../hooks/useFrigg'
|
|
4
|
+
import { motion, AnimatePresence } from 'framer-motion'
|
|
5
|
+
import { FolderOpen, Plus, Code, ChevronRight, RefreshCw, ChevronDown, Rocket, Settings, Layers, GitBranch, Search, BookOpen } from 'lucide-react'
|
|
6
|
+
import { Button } from './ui/button'
|
|
7
|
+
// Using RefreshCw for loading spinner
|
|
8
|
+
import { Card } from './ui/card'
|
|
9
|
+
// Temporarily disable IntegrationExplorer to test basic functionality
|
|
10
|
+
// const IntegrationExplorer = React.lazy(() => import('./IntegrationExplorer'))
|
|
11
|
+
const openInIDE = async (repoPath) => {
|
|
12
|
+
try {
|
|
13
|
+
const response = await fetch('/api/open-in-ide', {
|
|
14
|
+
method: 'POST',
|
|
15
|
+
headers: { 'Content-Type': 'application/json' },
|
|
16
|
+
body: JSON.stringify({ path: repoPath })
|
|
17
|
+
})
|
|
18
|
+
if (!response.ok) {
|
|
19
|
+
throw new Error('Failed to open in IDE')
|
|
20
|
+
}
|
|
21
|
+
} catch (error) {
|
|
22
|
+
console.error('Failed to open in IDE:', error)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const FalconLogo = ({ className, animate = false }) => (
|
|
27
|
+
<motion.svg
|
|
28
|
+
viewBox="0 0 83.72 100"
|
|
29
|
+
className={className}
|
|
30
|
+
animate={animate ? {
|
|
31
|
+
scale: [1, 1.05, 1]
|
|
32
|
+
} : {}}
|
|
33
|
+
transition={{
|
|
34
|
+
duration: 3,
|
|
35
|
+
ease: "easeInOut",
|
|
36
|
+
repeat: animate ? Infinity : 0,
|
|
37
|
+
repeatDelay: 2
|
|
38
|
+
}}
|
|
39
|
+
>
|
|
40
|
+
<defs>
|
|
41
|
+
<style>{`.cls-1{fill:#575959;}.cls-1,.cls-2{fill-rule:evenodd;}.cls-2{fill:#71a087;}`}</style>
|
|
42
|
+
</defs>
|
|
43
|
+
<g>
|
|
44
|
+
<path className="cls-2" d="M55.47,64.04c6.99-6.38,12.45-6.24,18.5,.64,2.62,3.87,.43,7.52-1.58,9.32-.02,.02-.03,.03-.05,.05l-2.02,1.71c2.06-3.99-1.7-4.53-3.13-3.6-.1,.07-.21,.14-.3,.23l-.03,.02-31.08,27.49c-.16,.14-.4,.12-.54-.04l-9.09-10.3c-.14-.16-.13-.4,.03-.54l29.29-24.99Z"/>
|
|
45
|
+
<path className="cls-1" d="M83.43,8.57l.29-7.73c.04-1.09-.36-1.12-1.65-.05l-37.42,31.68,7.1,6.98,29.72-25.82c1.26-1.11,1.92-3.7,1.97-5.06h0Z"/>
|
|
46
|
+
<path className="cls-2" d="M83.1,27.7l.29-7.73c.04-1.09-.36-1.12-1.65-.05l-26.93,22.8,7.16,6.68,19.16-16.64c1.26-1.11,1.92-3.7,1.97-5.06h0Z"/>
|
|
47
|
+
<path className="cls-1" d="M83.25,46.68l.29-7.73c.04-1.09-.36-1.12-1.65-.05l-16.02,13.55,7.01,6.56,8.38-7.27c1.26-1.11,1.92-3.7,1.98-5.06h0Z"/>
|
|
48
|
+
<path className="cls-2" d="M50.96,59.82L3.51,17.25C.72,14.75,.61,12.31,.73,9.61L1.06,1.46,58.48,53.26l-7.52,6.56Z"/>
|
|
49
|
+
<path className="cls-1" d="M39.79,69.37L3.03,36.42c-1.47-1.33-1.92-5.47-1.85-6.98l.57-7.63L47.23,62.94l-7.44,6.43Z"/>
|
|
50
|
+
<path className="cls-2" d="M27.6,80.1L2.74,56.36C1.02,54.72-.08,52.17,0,50.43l.5-8.69,34.92,31.54-7.82,6.82Z"/>
|
|
51
|
+
</g>
|
|
52
|
+
</motion.svg>
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
const loadingMessages = [
|
|
56
|
+
"Scanning for local Frigg repositories...",
|
|
57
|
+
"Checking installed integrations...",
|
|
58
|
+
"Pinging npm for up-to-date API modules...",
|
|
59
|
+
"Loading Frigg core plugins...",
|
|
60
|
+
"Initializing management interface..."
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
export default function Welcome() {
|
|
64
|
+
const navigate = useNavigate()
|
|
65
|
+
const { repositories, isLoading, switchRepository, currentRepository } = useFrigg()
|
|
66
|
+
const [selectedRepo, setSelectedRepo] = useState(null)
|
|
67
|
+
const [loadingStep, setLoadingStep] = useState(0)
|
|
68
|
+
const [showContent, setShowContent] = useState(false)
|
|
69
|
+
const [isChangingRepo, setIsChangingRepo] = useState(false)
|
|
70
|
+
const [showDropdown, setShowDropdown] = useState(false)
|
|
71
|
+
const [activeMode, setActiveMode] = useState('project') // 'project', 'explore', 'analyze'
|
|
72
|
+
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
// Always show loading steps for better UX, even if data loads quickly
|
|
75
|
+
const timer = setInterval(() => {
|
|
76
|
+
setLoadingStep(prev => {
|
|
77
|
+
if (prev >= loadingMessages.length - 1) {
|
|
78
|
+
// Add a minimum delay to ensure loading feels substantial
|
|
79
|
+
setTimeout(() => setShowContent(true), 800)
|
|
80
|
+
return prev
|
|
81
|
+
}
|
|
82
|
+
return prev + 1
|
|
83
|
+
})
|
|
84
|
+
}, 600)
|
|
85
|
+
return () => clearInterval(timer)
|
|
86
|
+
}, [])
|
|
87
|
+
|
|
88
|
+
// Always show the repository selection screen - never auto-navigate
|
|
89
|
+
// User should explicitly choose their project
|
|
90
|
+
|
|
91
|
+
const handleRepoSelect = async (repo) => {
|
|
92
|
+
setSelectedRepo(repo)
|
|
93
|
+
setShowDropdown(false)
|
|
94
|
+
setIsChangingRepo(true)
|
|
95
|
+
try {
|
|
96
|
+
await switchRepository(repo.path)
|
|
97
|
+
// Add a brief delay to show the selection, then navigate
|
|
98
|
+
setTimeout(() => navigate('/dashboard'), 800)
|
|
99
|
+
} catch (error) {
|
|
100
|
+
console.error('Failed to switch repository:', error)
|
|
101
|
+
setIsChangingRepo(false)
|
|
102
|
+
setSelectedRepo(null)
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const handleCreateNew = () => {
|
|
107
|
+
// Launch frigg init wizard
|
|
108
|
+
window.open('/api/cli/init-wizard', '_blank')
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const handleProceed = () => {
|
|
112
|
+
if (selectedRepo) {
|
|
113
|
+
handleRepoSelect(selectedRepo)
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<div className="min-h-screen bg-background flex items-center justify-center p-4">
|
|
120
|
+
<AnimatePresence mode="wait">
|
|
121
|
+
{!showContent ? (
|
|
122
|
+
<motion.div
|
|
123
|
+
key="loading"
|
|
124
|
+
initial={{ opacity: 0, scale: 0.8 }}
|
|
125
|
+
animate={{ opacity: 1, scale: 1 }}
|
|
126
|
+
exit={{ opacity: 0, scale: 0.8 }}
|
|
127
|
+
className="text-center"
|
|
128
|
+
>
|
|
129
|
+
<motion.div
|
|
130
|
+
initial={{ rotate: 0 }}
|
|
131
|
+
animate={{
|
|
132
|
+
rotate: 360,
|
|
133
|
+
transition: { duration: 2, ease: "linear", repeat: Infinity }
|
|
134
|
+
}}
|
|
135
|
+
className="mb-8"
|
|
136
|
+
>
|
|
137
|
+
<FalconLogo className="w-24 h-24 mx-auto text-primary" />
|
|
138
|
+
</motion.div>
|
|
139
|
+
|
|
140
|
+
<div className="space-y-2">
|
|
141
|
+
{loadingMessages.slice(0, loadingStep + 1).map((message, index) => (
|
|
142
|
+
<motion.p
|
|
143
|
+
key={index}
|
|
144
|
+
initial={{ opacity: 0, y: 10 }}
|
|
145
|
+
animate={{ opacity: 1, y: 0 }}
|
|
146
|
+
transition={{ delay: index * 0.1 }}
|
|
147
|
+
className="text-muted-foreground text-sm"
|
|
148
|
+
>
|
|
149
|
+
{message}
|
|
150
|
+
</motion.p>
|
|
151
|
+
))}
|
|
152
|
+
</div>
|
|
153
|
+
</motion.div>
|
|
154
|
+
) : (
|
|
155
|
+
<motion.div
|
|
156
|
+
key="content"
|
|
157
|
+
initial={{ opacity: 0, y: 20 }}
|
|
158
|
+
animate={{ opacity: 1, y: 0 }}
|
|
159
|
+
className="w-full max-w-2xl text-center"
|
|
160
|
+
>
|
|
161
|
+
{/* Welcome Header */}
|
|
162
|
+
<div className="mb-12">
|
|
163
|
+
<motion.div
|
|
164
|
+
initial={{ scale: 0.8 }}
|
|
165
|
+
animate={{ scale: 1 }}
|
|
166
|
+
transition={{ delay: 0.2 }}
|
|
167
|
+
>
|
|
168
|
+
<FalconLogo className="w-20 h-20 mx-auto text-primary mb-6" animate />
|
|
169
|
+
</motion.div>
|
|
170
|
+
|
|
171
|
+
<motion.h1
|
|
172
|
+
initial={{ opacity: 0, y: 20 }}
|
|
173
|
+
animate={{ opacity: 1, y: 0 }}
|
|
174
|
+
transition={{ delay: 0.3 }}
|
|
175
|
+
className="text-5xl font-bold mb-6 bg-gradient-to-r from-primary to-blue-600 bg-clip-text text-transparent"
|
|
176
|
+
>
|
|
177
|
+
Welcome to Frigg
|
|
178
|
+
</motion.h1>
|
|
179
|
+
|
|
180
|
+
<motion.p
|
|
181
|
+
initial={{ opacity: 0, y: 20 }}
|
|
182
|
+
animate={{ opacity: 1, y: 0 }}
|
|
183
|
+
transition={{ delay: 0.4 }}
|
|
184
|
+
className="text-xl text-muted-foreground max-w-xl mx-auto leading-relaxed"
|
|
185
|
+
>
|
|
186
|
+
Your local development interface for managing Frigg applications.
|
|
187
|
+
Create integrations, manage connections, and configure your APIs.
|
|
188
|
+
</motion.p>
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
{/* Builder Assistant Section */}
|
|
192
|
+
<motion.div
|
|
193
|
+
initial={{ opacity: 0, y: 30 }}
|
|
194
|
+
animate={{ opacity: 1, y: 0 }}
|
|
195
|
+
transition={{ delay: 0.5 }}
|
|
196
|
+
className="mb-8"
|
|
197
|
+
>
|
|
198
|
+
<h2 className="text-2xl font-semibold mb-6">Frigg Builder Assistant</h2>
|
|
199
|
+
|
|
200
|
+
{/* Quick Actions */}
|
|
201
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 mb-8">
|
|
202
|
+
<Card className="p-4 hover:shadow-lg transition-all cursor-pointer border-2 hover:border-primary/50" onClick={() => setActiveMode('explore')}>
|
|
203
|
+
<div className="flex items-center gap-3">
|
|
204
|
+
<Search className="w-6 h-6 text-primary" />
|
|
205
|
+
<div>
|
|
206
|
+
<h3 className="font-semibold">Explore Integrations</h3>
|
|
207
|
+
<p className="text-sm text-muted-foreground">Browse available API modules</p>
|
|
208
|
+
</div>
|
|
209
|
+
</div>
|
|
210
|
+
</Card>
|
|
211
|
+
|
|
212
|
+
<Card className="p-4 hover:shadow-lg transition-all cursor-pointer border-2 hover:border-primary/50" onClick={() => setActiveMode('analyze')}>
|
|
213
|
+
<div className="flex items-center gap-3">
|
|
214
|
+
<Layers className="w-6 h-6 text-primary" />
|
|
215
|
+
<div>
|
|
216
|
+
<h3 className="font-semibold">Code Analysis</h3>
|
|
217
|
+
<p className="text-sm text-muted-foreground">Analyze project structure</p>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
</Card>
|
|
221
|
+
|
|
222
|
+
<Card className="p-4 hover:shadow-lg transition-all cursor-pointer border-2 hover:border-primary/50" onClick={() => setActiveMode('project')}>
|
|
223
|
+
<div className="flex items-center gap-3">
|
|
224
|
+
<GitBranch className="w-6 h-6 text-primary" />
|
|
225
|
+
<div>
|
|
226
|
+
<h3 className="font-semibold">Project Selection</h3>
|
|
227
|
+
<p className="text-sm text-muted-foreground">Choose or create project</p>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
</Card>
|
|
231
|
+
</div>
|
|
232
|
+
|
|
233
|
+
{/* Mode-specific Content */}
|
|
234
|
+
{activeMode === 'project' && (
|
|
235
|
+
<>
|
|
236
|
+
<h3 className="text-xl font-semibold mb-4">Choose Your Project</h3>
|
|
237
|
+
{isLoading || isChangingRepo ? (
|
|
238
|
+
<div className="flex items-center justify-center py-12">
|
|
239
|
+
<RefreshCw className="w-8 h-8 animate-spin text-primary" />
|
|
240
|
+
<span className="ml-3 text-lg">
|
|
241
|
+
{isChangingRepo ? 'Loading project...' : 'Discovering projects...'}
|
|
242
|
+
</span>
|
|
243
|
+
</div>
|
|
244
|
+
) : repositories && repositories.length > 0 ? (
|
|
245
|
+
<div className="space-y-6">
|
|
246
|
+
{/* Central Dropdown */}
|
|
247
|
+
<div className="relative">
|
|
248
|
+
<Card
|
|
249
|
+
className={`p-6 cursor-pointer transition-all hover:shadow-lg border-2 ${
|
|
250
|
+
selectedRepo ? 'border-primary bg-primary/5' : 'border-border hover:border-primary/50'
|
|
251
|
+
}`}
|
|
252
|
+
onClick={() => setShowDropdown(!showDropdown)}
|
|
253
|
+
>
|
|
254
|
+
<div className="flex items-center justify-between">
|
|
255
|
+
<div className="flex items-center gap-4">
|
|
256
|
+
<FolderOpen className="w-6 h-6 text-primary" />
|
|
257
|
+
<div className="text-left">
|
|
258
|
+
<h3 className="text-lg font-semibold">
|
|
259
|
+
{selectedRepo ? selectedRepo.name : 'Select a Frigg Project'}
|
|
260
|
+
</h3>
|
|
261
|
+
{selectedRepo && (
|
|
262
|
+
<p className="text-sm text-muted-foreground mt-1">
|
|
263
|
+
{selectedRepo.path}
|
|
264
|
+
</p>
|
|
265
|
+
)}
|
|
266
|
+
{!selectedRepo && (
|
|
267
|
+
<p className="text-sm text-muted-foreground mt-1">
|
|
268
|
+
{repositories.length} project{repositories.length !== 1 ? 's' : ''} available
|
|
269
|
+
</p>
|
|
270
|
+
)}
|
|
271
|
+
</div>
|
|
272
|
+
</div>
|
|
273
|
+
<ChevronDown className={`w-5 h-5 text-muted-foreground transition-transform ${
|
|
274
|
+
showDropdown ? 'rotate-180' : ''
|
|
275
|
+
}`} />
|
|
276
|
+
</div>
|
|
277
|
+
</Card>
|
|
278
|
+
|
|
279
|
+
{/* Dropdown Options */}
|
|
280
|
+
<AnimatePresence>
|
|
281
|
+
{showDropdown && (
|
|
282
|
+
<motion.div
|
|
283
|
+
initial={{ opacity: 0, y: -10, scale: 0.95 }}
|
|
284
|
+
animate={{ opacity: 1, y: 0, scale: 1 }}
|
|
285
|
+
exit={{ opacity: 0, y: -10, scale: 0.95 }}
|
|
286
|
+
transition={{ duration: 0.2 }}
|
|
287
|
+
className="absolute top-full left-0 right-0 mt-2 z-50"
|
|
288
|
+
>
|
|
289
|
+
<Card className="border-2 border-border shadow-lg">
|
|
290
|
+
<div className="max-h-64 overflow-y-auto">
|
|
291
|
+
{repositories.map((repo, index) => (
|
|
292
|
+
<motion.div
|
|
293
|
+
key={repo.path}
|
|
294
|
+
initial={{ opacity: 0, x: -10 }}
|
|
295
|
+
animate={{ opacity: 1, x: 0 }}
|
|
296
|
+
transition={{ delay: index * 0.05 }}
|
|
297
|
+
className={`p-4 cursor-pointer transition-colors hover:bg-primary/10 ${
|
|
298
|
+
selectedRepo?.path === repo.path ? 'bg-primary/5 border-l-4 border-l-primary' : ''
|
|
299
|
+
} ${index !== repositories.length - 1 ? 'border-b border-border' : ''}`}
|
|
300
|
+
onClick={() => setSelectedRepo(repo)}
|
|
301
|
+
>
|
|
302
|
+
<div className="flex items-center justify-between">
|
|
303
|
+
<div className="flex items-center gap-3">
|
|
304
|
+
<FolderOpen className="w-5 h-5 text-muted-foreground" />
|
|
305
|
+
<div>
|
|
306
|
+
<h4 className="font-medium">{repo.name}</h4>
|
|
307
|
+
<p className="text-sm text-muted-foreground">{repo.path}</p>
|
|
308
|
+
{repo.framework && repo.framework !== 'Unknown' && (
|
|
309
|
+
<span className="text-xs bg-primary/10 text-primary px-2 py-1 rounded mt-1 inline-block">
|
|
310
|
+
{repo.framework}
|
|
311
|
+
</span>
|
|
312
|
+
)}
|
|
313
|
+
</div>
|
|
314
|
+
</div>
|
|
315
|
+
<div className="flex items-center gap-2">
|
|
316
|
+
<Button
|
|
317
|
+
variant="ghost"
|
|
318
|
+
size="sm"
|
|
319
|
+
onClick={(e) => {
|
|
320
|
+
e.stopPropagation()
|
|
321
|
+
openInIDE(repo.path)
|
|
322
|
+
}}
|
|
323
|
+
>
|
|
324
|
+
<Code className="w-4 h-4" />
|
|
325
|
+
</Button>
|
|
326
|
+
</div>
|
|
327
|
+
</div>
|
|
328
|
+
</motion.div>
|
|
329
|
+
))}
|
|
330
|
+
</div>
|
|
331
|
+
</Card>
|
|
332
|
+
</motion.div>
|
|
333
|
+
)}
|
|
334
|
+
</AnimatePresence>
|
|
335
|
+
</div>
|
|
336
|
+
|
|
337
|
+
{/* Action Buttons */}
|
|
338
|
+
<div className="flex gap-4 justify-center pt-4">
|
|
339
|
+
<Button
|
|
340
|
+
onClick={handleProceed}
|
|
341
|
+
disabled={!selectedRepo}
|
|
342
|
+
size="lg"
|
|
343
|
+
className="gap-2 px-8"
|
|
344
|
+
>
|
|
345
|
+
<Rocket className="w-5 h-5" />
|
|
346
|
+
Launch Project
|
|
347
|
+
</Button>
|
|
348
|
+
|
|
349
|
+
<Button
|
|
350
|
+
onClick={handleCreateNew}
|
|
351
|
+
variant="outline"
|
|
352
|
+
size="lg"
|
|
353
|
+
className="gap-2 px-6"
|
|
354
|
+
>
|
|
355
|
+
<Plus className="w-5 h-5" />
|
|
356
|
+
Create New
|
|
357
|
+
</Button>
|
|
358
|
+
</div>
|
|
359
|
+
</div>
|
|
360
|
+
) : (
|
|
361
|
+
<div className="text-center py-12">
|
|
362
|
+
<FolderOpen className="w-16 h-16 mx-auto text-muted-foreground mb-4" />
|
|
363
|
+
<h3 className="text-lg font-semibold mb-2">No Frigg Projects Found</h3>
|
|
364
|
+
<p className="text-muted-foreground mb-6">
|
|
365
|
+
No Frigg applications found in your local environment.
|
|
366
|
+
</p>
|
|
367
|
+
<Button onClick={handleCreateNew} size="lg" className="gap-2">
|
|
368
|
+
<Plus className="w-5 h-5" />
|
|
369
|
+
Create Your First Frigg Application
|
|
370
|
+
</Button>
|
|
371
|
+
</div>
|
|
372
|
+
)}
|
|
373
|
+
</>
|
|
374
|
+
)}
|
|
375
|
+
|
|
376
|
+
{/* Integration Explorer Mode */}
|
|
377
|
+
{activeMode === 'explore' && (
|
|
378
|
+
<div className="space-y-6">
|
|
379
|
+
<h3 className="text-xl font-semibold mb-4">Integration Explorer</h3>
|
|
380
|
+
<Card className="p-6">
|
|
381
|
+
<div className="text-center py-8">
|
|
382
|
+
<Search className="w-12 h-12 mx-auto text-muted-foreground mb-4" />
|
|
383
|
+
<h4 className="font-semibold mb-2">Integration Explorer</h4>
|
|
384
|
+
<p className="text-muted-foreground mb-4">
|
|
385
|
+
Browse and explore available integrations
|
|
386
|
+
</p>
|
|
387
|
+
<p className="text-sm text-muted-foreground">
|
|
388
|
+
Integration Explorer coming soon...
|
|
389
|
+
</p>
|
|
390
|
+
</div>
|
|
391
|
+
</Card>
|
|
392
|
+
</div>
|
|
393
|
+
)}
|
|
394
|
+
|
|
395
|
+
{/* Code Analysis Mode */}
|
|
396
|
+
{activeMode === 'analyze' && (
|
|
397
|
+
<div className="space-y-6">
|
|
398
|
+
<h3 className="text-xl font-semibold mb-4">Project Code Analysis</h3>
|
|
399
|
+
<Card className="p-6">
|
|
400
|
+
<div className="text-center py-8">
|
|
401
|
+
<Layers className="w-12 h-12 mx-auto text-muted-foreground mb-4" />
|
|
402
|
+
<h4 className="font-semibold mb-2">Static Code Analysis</h4>
|
|
403
|
+
<p className="text-muted-foreground mb-4">
|
|
404
|
+
Select a project to analyze its integration structure and dependencies
|
|
405
|
+
</p>
|
|
406
|
+
<Button
|
|
407
|
+
onClick={() => setActiveMode('project')}
|
|
408
|
+
variant="outline"
|
|
409
|
+
>
|
|
410
|
+
<GitBranch className="w-4 h-4 mr-2" />
|
|
411
|
+
Choose Project First
|
|
412
|
+
</Button>
|
|
413
|
+
</div>
|
|
414
|
+
</Card>
|
|
415
|
+
</div>
|
|
416
|
+
)}
|
|
417
|
+
</motion.div>
|
|
418
|
+
|
|
419
|
+
{/* Footer */}
|
|
420
|
+
<motion.div
|
|
421
|
+
initial={{ opacity: 0 }}
|
|
422
|
+
animate={{ opacity: 1 }}
|
|
423
|
+
transition={{ delay: 0.8 }}
|
|
424
|
+
className="text-center text-sm text-muted-foreground border-t border-border pt-6"
|
|
425
|
+
>
|
|
426
|
+
<p>All features are available via CLI and directly in code.</p>
|
|
427
|
+
<p>This UI is here to help you use those tools more efficiently.</p>
|
|
428
|
+
</motion.div>
|
|
429
|
+
</motion.div>
|
|
430
|
+
)}
|
|
431
|
+
</AnimatePresence>
|
|
432
|
+
</div>
|
|
433
|
+
)
|
|
434
|
+
}
|