@specverse/engine-realize 3.5.3
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/assets/examples/09-api/ai-spec.yaml +194 -0
- package/assets/examples/09-api/converted.yaml +95 -0
- package/assets/examples/09-api/diagram-architecture.mmd +10 -0
- package/assets/examples/09-api/diagram-er.mmd +10 -0
- package/assets/examples/09-api/documentation.html +104 -0
- package/assets/examples/09-api/documentation.md +95 -0
- package/assets/examples/09-api/inferred-spec.yaml +420 -0
- package/assets/examples/09-api/openapi.json +61 -0
- package/assets/examples/10-api/README.md +216 -0
- package/assets/examples/10-api/ai-spec.yaml +194 -0
- package/assets/examples/10-api/converted.yaml +96 -0
- package/assets/examples/10-api/diagram-architecture.mmd +10 -0
- package/assets/examples/10-api/diagram-er.mmd +10 -0
- package/assets/examples/10-api/documentation.html +104 -0
- package/assets/examples/10-api/documentation.md +95 -0
- package/assets/examples/10-api/inferred-spec.yaml +7 -0
- package/assets/examples/10-api/metadata.yaml +89 -0
- package/assets/examples/10-api/openapi.json +61 -0
- package/assets/examples/10-api/package-integration-test.js +177 -0
- package/assets/examples/10-api/usage-example.js +323 -0
- package/assets/examples/10-api/usage-example.ts +363 -0
- package/assets/examples/10-api/workflow-test.js +113 -0
- package/assets/examples/manifests/01-simple-default-mappings.yaml +36 -0
- package/assets/examples/manifests/02-capability-mappings.yaml +55 -0
- package/assets/examples/manifests/03-hybrid-mappings.yaml +109 -0
- package/assets/examples/manifests/README.md +245 -0
- package/assets/examples/manifests/backend-only.yaml +43 -0
- package/assets/examples/manifests/blog-api.md +78 -0
- package/assets/examples/manifests/blog-api.specly +79 -0
- package/assets/examples/manifests/frontend-only.yaml +27 -0
- package/assets/examples/manifests/fullstack-app.yaml +44 -0
- package/assets/examples/manifests/fullstack-monorepo.yaml +62 -0
- package/assets/examples/validate-examples-with-expected-failures.cjs +328 -0
- package/assets/examples/validate-examples.cjs +225 -0
- package/assets/examples-decomposed/cloud-native-manifest.example.yaml +8 -0
- package/assets/examples-decomposed/cloud-native-manifest.md +379 -0
- package/assets/examples-decomposed/cloud-native-manifest.specly +60 -0
- package/assets/examples-decomposed/docker-compose-manifest.example.yaml +8 -0
- package/assets/examples-decomposed/docker-compose-manifest.md +326 -0
- package/assets/examples-decomposed/docker-compose-manifest.specly +40 -0
- package/assets/examples-decomposed/kubernetes-deployment-manifest.example.yaml +8 -0
- package/assets/examples-decomposed/kubernetes-deployment-manifest.md +237 -0
- package/assets/examples-decomposed/kubernetes-deployment-manifest.specly +41 -0
- package/assets/templates/README.md +559 -0
- package/assets/templates/TEMPLATE-ENHANCEMENTS-V33.md +462 -0
- package/assets/templates/backend-only/CLAUDE.md +73 -0
- package/assets/templates/backend-only/README.md +197 -0
- package/assets/templates/backend-only/deployments/README.md +149 -0
- package/assets/templates/backend-only/deployments/development.specly +53 -0
- package/assets/templates/backend-only/deployments/production.specly +87 -0
- package/assets/templates/backend-only/docs/README.md +50 -0
- package/assets/templates/backend-only/docs/api/README.md +7 -0
- package/assets/templates/backend-only/docs/diagrams/README.md +85 -0
- package/assets/templates/backend-only/docs/example-documentation-template.md +269 -0
- package/assets/templates/backend-only/docs/guides/README.md +15 -0
- package/assets/templates/backend-only/dot.env.example +18 -0
- package/assets/templates/backend-only/generated/README.md +56 -0
- package/assets/templates/backend-only/generated/code/integration-test.template.js +320 -0
- package/assets/templates/backend-only/generated/code/package.json.template +34 -0
- package/assets/templates/backend-only/generated/docs/README.md +49 -0
- package/assets/templates/backend-only/gitignore +54 -0
- package/assets/templates/backend-only/manifests/README.md +72 -0
- package/assets/templates/backend-only/manifests/docker-compose.specly +91 -0
- package/assets/templates/backend-only/manifests/implementation.yaml +100 -0
- package/assets/templates/backend-only/manifests/kubernetes.specly +140 -0
- package/assets/templates/backend-only/package.json +59 -0
- package/assets/templates/backend-only/scripts/test-all.sh +160 -0
- package/assets/templates/backend-only/scripts/test-generated-code.sh +165 -0
- package/assets/templates/backend-only/specs/main.specly +67 -0
- package/assets/templates/default/CLAUDE.md +141 -0
- package/assets/templates/default/README.md +404 -0
- package/assets/templates/default/deployments/README.md +149 -0
- package/assets/templates/default/deployments/development.specly +53 -0
- package/assets/templates/default/deployments/production.specly +87 -0
- package/assets/templates/default/docs/README.md +50 -0
- package/assets/templates/default/docs/api/README.md +7 -0
- package/assets/templates/default/docs/diagrams/README.md +85 -0
- package/assets/templates/default/docs/example-documentation-template.md +269 -0
- package/assets/templates/default/docs/guides/README.md +15 -0
- package/assets/templates/default/dot.env.example +18 -0
- package/assets/templates/default/generated/README.md +56 -0
- package/assets/templates/default/generated/code/integration-test.template.js +320 -0
- package/assets/templates/default/generated/code/package.json.template +34 -0
- package/assets/templates/default/generated/docs/README.md +49 -0
- package/assets/templates/default/gitignore +54 -0
- package/assets/templates/default/manifests/README.md +72 -0
- package/assets/templates/default/manifests/docker-compose.specly +91 -0
- package/assets/templates/default/manifests/implementation.yaml +176 -0
- package/assets/templates/default/manifests/kubernetes.specly +140 -0
- package/assets/templates/default/package.json +61 -0
- package/assets/templates/default/scripts/test-all.sh +160 -0
- package/assets/templates/default/scripts/test-generated-code.sh +165 -0
- package/assets/templates/default/specs/main.specly +67 -0
- package/assets/templates/frontend-only/CLAUDE.md +75 -0
- package/assets/templates/frontend-only/README.md +231 -0
- package/assets/templates/frontend-only/deployments/README.md +149 -0
- package/assets/templates/frontend-only/deployments/development.specly +53 -0
- package/assets/templates/frontend-only/deployments/production.specly +87 -0
- package/assets/templates/frontend-only/docs/README.md +50 -0
- package/assets/templates/frontend-only/docs/api/README.md +7 -0
- package/assets/templates/frontend-only/docs/diagrams/README.md +85 -0
- package/assets/templates/frontend-only/docs/example-documentation-template.md +269 -0
- package/assets/templates/frontend-only/docs/guides/README.md +15 -0
- package/assets/templates/frontend-only/dot.env.example +18 -0
- package/assets/templates/frontend-only/generated/README.md +56 -0
- package/assets/templates/frontend-only/generated/code/integration-test.template.js +320 -0
- package/assets/templates/frontend-only/generated/code/package.json.template +34 -0
- package/assets/templates/frontend-only/generated/docs/README.md +49 -0
- package/assets/templates/frontend-only/gitignore +54 -0
- package/assets/templates/frontend-only/manifests/README.md +72 -0
- package/assets/templates/frontend-only/manifests/docker-compose.specly +91 -0
- package/assets/templates/frontend-only/manifests/implementation.yaml +58 -0
- package/assets/templates/frontend-only/manifests/kubernetes.specly +140 -0
- package/assets/templates/frontend-only/package.json +59 -0
- package/assets/templates/frontend-only/scripts/test-all.sh +160 -0
- package/assets/templates/frontend-only/scripts/test-generated-code.sh +165 -0
- package/assets/templates/frontend-only/specs/main.specly +57 -0
- package/assets/templates/full-stack/AI-GUIDE.md +60 -0
- package/assets/templates/full-stack/CLAUDE.md +141 -0
- package/assets/templates/full-stack/README.md +382 -0
- package/assets/templates/full-stack/archive/AI-GUIDE-legacy.md +392 -0
- package/assets/templates/full-stack/deployments/README.md +149 -0
- package/assets/templates/full-stack/deployments/development.specly +53 -0
- package/assets/templates/full-stack/deployments/production.specly +87 -0
- package/assets/templates/full-stack/docs/README.md +51 -0
- package/assets/templates/full-stack/docs/api/README.md +7 -0
- package/assets/templates/full-stack/docs/diagrams/README.md +85 -0
- package/assets/templates/full-stack/docs/example-documentation-template.md +269 -0
- package/assets/templates/full-stack/docs/guides/README.md +15 -0
- package/assets/templates/full-stack/generated/README.md +56 -0
- package/assets/templates/full-stack/generated/code/integration-test.template.js +320 -0
- package/assets/templates/full-stack/generated/code/package.json.template +34 -0
- package/assets/templates/full-stack/generated/docs/README.md +49 -0
- package/assets/templates/full-stack/gitignore +54 -0
- package/assets/templates/full-stack/manifests/README.md +72 -0
- package/assets/templates/full-stack/manifests/docker-compose.specly +91 -0
- package/assets/templates/full-stack/manifests/implementation.yaml +155 -0
- package/assets/templates/full-stack/manifests/kubernetes.specly +140 -0
- package/assets/templates/full-stack/package.json +45 -0
- package/assets/templates/full-stack/scripts/test-all.sh +160 -0
- package/assets/templates/full-stack/scripts/test-generated-code.sh +165 -0
- package/assets/templates/full-stack/specs/example-v33.specly +297 -0
- package/assets/templates/full-stack/specs/main-simple.specly +73 -0
- package/assets/templates/full-stack/specs/main.specly +408 -0
- package/dist/engines/code-generator.d.ts +86 -0
- package/dist/engines/code-generator.d.ts.map +1 -0
- package/dist/engines/code-generator.js +159 -0
- package/dist/engines/code-generator.js.map +1 -0
- package/dist/engines/engine-registry.d.ts +94 -0
- package/dist/engines/engine-registry.d.ts.map +1 -0
- package/dist/engines/engine-registry.js +163 -0
- package/dist/engines/engine-registry.js.map +1 -0
- package/dist/engines/index.d.ts +10 -0
- package/dist/engines/index.d.ts.map +1 -0
- package/dist/engines/index.js +12 -0
- package/dist/engines/index.js.map +1 -0
- package/dist/engines/typescript-engine.d.ts +74 -0
- package/dist/engines/typescript-engine.d.ts.map +1 -0
- package/dist/engines/typescript-engine.js +288 -0
- package/dist/engines/typescript-engine.js.map +1 -0
- package/dist/generators/index.d.ts +11 -0
- package/dist/generators/index.d.ts.map +1 -0
- package/dist/generators/index.js +11 -0
- package/dist/generators/index.js.map +1 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +434 -0
- package/dist/index.js.map +1 -0
- package/dist/library/index.d.ts +12 -0
- package/dist/library/index.d.ts.map +1 -0
- package/dist/library/index.js +15 -0
- package/dist/library/index.js.map +1 -0
- package/dist/library/library.d.ts +132 -0
- package/dist/library/library.d.ts.map +1 -0
- package/dist/library/library.js +343 -0
- package/dist/library/library.js.map +1 -0
- package/dist/library/loader.d.ts +73 -0
- package/dist/library/loader.d.ts.map +1 -0
- package/dist/library/loader.js +150 -0
- package/dist/library/loader.js.map +1 -0
- package/dist/library/resolver.d.ts +104 -0
- package/dist/library/resolver.d.ts.map +1 -0
- package/dist/library/resolver.js +299 -0
- package/dist/library/resolver.js.map +1 -0
- package/dist/library/validator.d.ts +65 -0
- package/dist/library/validator.d.ts.map +1 -0
- package/dist/library/validator.js +203 -0
- package/dist/library/validator.js.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/instance-factory.d.ts +289 -0
- package/dist/types/instance-factory.d.ts.map +1 -0
- package/dist/types/instance-factory.js +8 -0
- package/dist/types/instance-factory.js.map +1 -0
- package/dist/types/unified-mappings.d.ts +163 -0
- package/dist/types/unified-mappings.d.ts.map +1 -0
- package/dist/types/unified-mappings.js +110 -0
- package/dist/types/unified-mappings.js.map +1 -0
- package/dist/utils/ai-spec-loader.d.ts +77 -0
- package/dist/utils/ai-spec-loader.d.ts.map +1 -0
- package/dist/utils/ai-spec-loader.js +138 -0
- package/dist/utils/ai-spec-loader.js.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/manifest-loader.d.ts +107 -0
- package/dist/utils/manifest-loader.d.ts.map +1 -0
- package/dist/utils/manifest-loader.js +168 -0
- package/dist/utils/manifest-loader.js.map +1 -0
- package/dist/utils/mapping-migration.d.ts +53 -0
- package/dist/utils/mapping-migration.d.ts.map +1 -0
- package/dist/utils/mapping-migration.js +194 -0
- package/dist/utils/mapping-migration.js.map +1 -0
- package/libs/instance-factories/CURVED-INTERFACE.md +278 -0
- package/libs/instance-factories/README.md +433 -0
- package/libs/instance-factories/applications/generic-app.yaml +52 -0
- package/libs/instance-factories/applications/react-app.yaml +186 -0
- package/libs/instance-factories/applications/templates/generic/backend-env-generator.ts +31 -0
- package/libs/instance-factories/applications/templates/generic/backend-package-json-generator.ts +80 -0
- package/libs/instance-factories/applications/templates/generic/backend-tsconfig-generator.ts +69 -0
- package/libs/instance-factories/applications/templates/generic/main-generator.ts +308 -0
- package/libs/instance-factories/applications/templates/react/_view-components-source.ts +555 -0
- package/libs/instance-factories/applications/templates/react/api-client-generator.ts +436 -0
- package/libs/instance-factories/applications/templates/react/api-types-generator.ts +153 -0
- package/libs/instance-factories/applications/templates/react/app-tsx-generator.ts +94 -0
- package/libs/instance-factories/applications/templates/react/env-example-generator.ts +24 -0
- package/libs/instance-factories/applications/templates/react/field-helpers-generator.ts +106 -0
- package/libs/instance-factories/applications/templates/react/gitignore-generator.ts +38 -0
- package/libs/instance-factories/applications/templates/react/index-css-generator.ts +85 -0
- package/libs/instance-factories/applications/templates/react/index-html-generator.ts +30 -0
- package/libs/instance-factories/applications/templates/react/main-tsx-generator.ts +34 -0
- package/libs/instance-factories/applications/templates/react/package-json-generator.ts +54 -0
- package/libs/instance-factories/applications/templates/react/pattern-adapter-generator.ts +179 -0
- package/libs/instance-factories/applications/templates/react/react-pattern-adapter.tsx +1347 -0
- package/libs/instance-factories/applications/templates/react/relationship-field-generator.ts +150 -0
- package/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.ts +704 -0
- package/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.ts +84 -0
- package/libs/instance-factories/applications/templates/react/tsconfig-generator.ts +35 -0
- package/libs/instance-factories/applications/templates/react/use-api-hooks-generator.ts +121 -0
- package/libs/instance-factories/applications/templates/react/view-dashboard-generator.ts +150 -0
- package/libs/instance-factories/applications/templates/react/view-detail-generator.ts +150 -0
- package/libs/instance-factories/applications/templates/react/view-form-generator.ts +362 -0
- package/libs/instance-factories/applications/templates/react/view-list-generator.ts +98 -0
- package/libs/instance-factories/applications/templates/react/view-router-generator.ts +89 -0
- package/libs/instance-factories/applications/templates/react/vite-config-generator.ts +49 -0
- package/libs/instance-factories/archived/fastify-prisma.yaml +104 -0
- package/libs/instance-factories/cli/commander-js.yaml +55 -0
- package/libs/instance-factories/cli/templates/commander/cli-entry-generator.d.ts +12 -0
- package/libs/instance-factories/cli/templates/commander/cli-entry-generator.d.ts.map +1 -0
- package/libs/instance-factories/cli/templates/commander/cli-entry-generator.js +115 -0
- package/libs/instance-factories/cli/templates/commander/cli-entry-generator.js.map +1 -0
- package/libs/instance-factories/cli/templates/commander/cli-entry-generator.ts +145 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.d.ts +14 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.d.ts.map +1 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.js +182 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.js.map +1 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.ts +992 -0
- package/libs/instance-factories/communication/event-emitter.yaml +56 -0
- package/libs/instance-factories/communication/rabbitmq-events.yaml +87 -0
- package/libs/instance-factories/communication/templates/eventemitter/bus-generator.ts +93 -0
- package/libs/instance-factories/communication/templates/eventemitter/publisher-generator.ts +117 -0
- package/libs/instance-factories/communication/templates/eventemitter/subscriber-generator.ts +101 -0
- package/libs/instance-factories/controllers/fastify.yaml +127 -0
- package/libs/instance-factories/controllers/templates/fastify/meta-routes-generator.ts +103 -0
- package/libs/instance-factories/controllers/templates/fastify/routes-generator.ts +389 -0
- package/libs/instance-factories/controllers/templates/fastify/server-generator.ts +76 -0
- package/libs/instance-factories/infrastructure/docker-k8s.yaml +61 -0
- package/libs/instance-factories/infrastructure/templates/docker-k8s/infrastructure-generator.ts +46 -0
- package/libs/instance-factories/orms/prisma.yaml +89 -0
- package/libs/instance-factories/orms/templates/prisma/schema-generator.ts +563 -0
- package/libs/instance-factories/orms/templates/prisma/services-generator.ts +408 -0
- package/libs/instance-factories/scaffolding/generic-scaffold.yaml +65 -0
- package/libs/instance-factories/scaffolding/templates/generic/env-example-generator.ts +73 -0
- package/libs/instance-factories/scaffolding/templates/generic/env-generator.ts +85 -0
- package/libs/instance-factories/scaffolding/templates/generic/gitignore-generator.ts +69 -0
- package/libs/instance-factories/scaffolding/templates/generic/package-json-generator.ts +176 -0
- package/libs/instance-factories/scaffolding/templates/generic/readme-generator.ts +207 -0
- package/libs/instance-factories/scaffolding/templates/generic/tsconfig-generator.ts +78 -0
- package/libs/instance-factories/scaffolding/templates/generic/tsconfig-react-generator.ts +41 -0
- package/libs/instance-factories/sdks/python-sdk.yaml +66 -0
- package/libs/instance-factories/sdks/templates/python/sdk-generator.ts +50 -0
- package/libs/instance-factories/sdks/templates/typescript/sdk-generator.ts +49 -0
- package/libs/instance-factories/sdks/typescript-sdk.yaml +59 -0
- package/libs/instance-factories/services/prisma-services.yaml +71 -0
- package/libs/instance-factories/services/templates/prisma/behavior-generator.ts +303 -0
- package/libs/instance-factories/services/templates/prisma/controller-generator.ts +532 -0
- package/libs/instance-factories/services/templates/prisma/service-generator.ts +315 -0
- package/libs/instance-factories/shared/path-resolver.ts +111 -0
- package/libs/instance-factories/storage/mongodb.yaml +79 -0
- package/libs/instance-factories/storage/postgresql.yaml +75 -0
- package/libs/instance-factories/storage/redis.yaml +79 -0
- package/libs/instance-factories/storage/templates/mongodb/config-generator.ts +15 -0
- package/libs/instance-factories/storage/templates/mongodb/docker-generator.ts +18 -0
- package/libs/instance-factories/storage/templates/postgresql/config-generator.ts +54 -0
- package/libs/instance-factories/storage/templates/postgresql/docker-generator.ts +55 -0
- package/libs/instance-factories/storage/templates/redis/config-generator.ts +16 -0
- package/libs/instance-factories/storage/templates/redis/docker-generator.ts +18 -0
- package/libs/instance-factories/test-generation.ts +192 -0
- package/libs/instance-factories/testing/templates/vitest/tests-generator.ts +51 -0
- package/libs/instance-factories/testing/vitest-tests.yaml +63 -0
- package/libs/instance-factories/tools/templates/mcp/mcp-server-generator.ts +136 -0
- package/libs/instance-factories/tools/templates/mcp/static/docs/DEPLOYMENT_GUIDE.md +630 -0
- package/libs/instance-factories/tools/templates/mcp/static/docs/HYBRID_RESOURCE_SYSTEM.md +330 -0
- package/libs/instance-factories/tools/templates/mcp/static/docs/deployments/EXTENSION_DEPLOYMENT.md +552 -0
- package/libs/instance-factories/tools/templates/mcp/static/docs/deployments/LOCAL_DEPLOYMENT.md +164 -0
- package/libs/instance-factories/tools/templates/mcp/static/docs/deployments/WEB_DEPLOYMENT.md +247 -0
- package/libs/instance-factories/tools/templates/mcp/static/package.json +92 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/build-enterprise.js +284 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/build-extension.js +139 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/build-local.js +74 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/build-web.js +156 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/copy-canonical-files.js +41 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/test-deployments.js +259 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/test-hybrid-resources.js +231 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/test-hybrid-simple.js +196 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/controllers/MCPServerController.ts +293 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/events/EventEmitter.ts +90 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/index.ts +24 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/interfaces/ResourceProvider.ts +15 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/models/LibrarySuggestion.ts +106 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/models/SpecVerseResource.ts +75 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/server/mcp-server.ts +239 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/CLIProxyService.ts +1501 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/EmbeddedResourcesAdapter.ts +211 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/EntityModuleService.ts +308 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/HybridResourcesProvider.ts +210 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/LibraryToolsService.ts +356 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/OrchestratorBridge.ts +524 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/OrchestratorToolsService.ts +530 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/PromptToolsService.ts +594 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/ResourcesProviderService.ts +170 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/tests/unit/CLIProxyService.init.test.ts +544 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/tests/unit/CLIProxyService.test.ts +189 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/tests/unit/ResourcesProviderService.test.ts +89 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/types/index.ts +110 -0
- package/libs/instance-factories/tools/templates/mcp/static/tsconfig.json +28 -0
- package/libs/instance-factories/tools/templates/vscode/static/extension.ts +1195 -0
- package/libs/instance-factories/tools/templates/vscode/static/language-configuration.json +34 -0
- package/libs/instance-factories/tools/templates/vscode/static/schemas/specverse-v3-schema.json +4279 -0
- package/libs/instance-factories/tools/templates/vscode/static/syntaxes/specverse.tmLanguage.json +138 -0
- package/libs/instance-factories/tools/templates/vscode/static/themes/README.md +74 -0
- package/libs/instance-factories/tools/templates/vscode/static/themes/complete-specverse-colors.json +122 -0
- package/libs/instance-factories/tools/templates/vscode/static/themes/specverse-basic-theme.json +65 -0
- package/libs/instance-factories/tools/templates/vscode/static/themes/specverse-complete-theme.json +123 -0
- package/libs/instance-factories/tools/templates/vscode/static/themes/specverse-theme-colors.json +64 -0
- package/libs/instance-factories/tools/templates/vscode/vscode-extension-generator.ts +214 -0
- package/libs/instance-factories/validation/templates/zod/validation-generator.ts +46 -0
- package/libs/instance-factories/validation/zod.yaml +56 -0
- package/libs/instance-factories/views/index.d.ts +13 -0
- package/libs/instance-factories/views/index.d.ts.map +1 -0
- package/libs/instance-factories/views/index.js +18 -0
- package/libs/instance-factories/views/index.js.map +1 -0
- package/libs/instance-factories/views/index.ts +45 -0
- package/libs/instance-factories/views/react-components.yaml +129 -0
- package/libs/instance-factories/views/templates/ARCHITECTURE.md +198 -0
- package/libs/instance-factories/views/templates/react/adapters/antd-adapter.ts +869 -0
- package/libs/instance-factories/views/templates/react/adapters/mui-adapter.ts +953 -0
- package/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.ts +806 -0
- package/libs/instance-factories/views/templates/react/app-generator.ts +55 -0
- package/libs/instance-factories/views/templates/react/components-generator.ts +391 -0
- package/libs/instance-factories/views/templates/react/forms-generator.ts +343 -0
- package/libs/instance-factories/views/templates/react/frontend-package-json-generator.ts +54 -0
- package/libs/instance-factories/views/templates/react/hooks-generator.ts +122 -0
- package/libs/instance-factories/views/templates/react/index-css-generator.ts +209 -0
- package/libs/instance-factories/views/templates/react/index-html-generator.ts +34 -0
- package/libs/instance-factories/views/templates/react/main-tsx-generator.ts +29 -0
- package/libs/instance-factories/views/templates/react/react-component-generator.d.ts +152 -0
- package/libs/instance-factories/views/templates/react/react-component-generator.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/react/react-component-generator.js +398 -0
- package/libs/instance-factories/views/templates/react/react-component-generator.js.map +1 -0
- package/libs/instance-factories/views/templates/react/react-component-generator.ts +533 -0
- package/libs/instance-factories/views/templates/react/router-generator.ts +197 -0
- package/libs/instance-factories/views/templates/react/router-generic-generator.ts +103 -0
- package/libs/instance-factories/views/templates/react/spec-json-generator.ts +17 -0
- package/libs/instance-factories/views/templates/react/types-generator.ts +76 -0
- package/libs/instance-factories/views/templates/react/views-metadata-generator.ts +42 -0
- package/libs/instance-factories/views/templates/react/vite-config-generator.ts +38 -0
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js.map +1 -0
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.ts +474 -0
- package/libs/instance-factories/views/templates/shared/__tests__/composite-patterns.test.ts +242 -0
- package/libs/instance-factories/views/templates/shared/adapter-types.d.ts +77 -0
- package/libs/instance-factories/views/templates/shared/adapter-types.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/adapter-types.js +47 -0
- package/libs/instance-factories/views/templates/shared/adapter-types.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/adapter-types.ts +142 -0
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts +63 -0
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.js +822 -0
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.ts +908 -0
- package/libs/instance-factories/views/templates/shared/base-generator.d.ts +247 -0
- package/libs/instance-factories/views/templates/shared/base-generator.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/base-generator.js +363 -0
- package/libs/instance-factories/views/templates/shared/base-generator.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/base-generator.ts +608 -0
- package/libs/instance-factories/views/templates/shared/component-metadata.d.ts +254 -0
- package/libs/instance-factories/views/templates/shared/component-metadata.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/component-metadata.js +602 -0
- package/libs/instance-factories/views/templates/shared/component-metadata.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/component-metadata.ts +803 -0
- package/libs/instance-factories/views/templates/shared/composite-pattern-types.ts +250 -0
- package/libs/instance-factories/views/templates/shared/composite-patterns.ts +535 -0
- package/libs/instance-factories/views/templates/shared/index.ts +68 -0
- package/libs/instance-factories/views/templates/shared/pattern-validator.ts +279 -0
- package/libs/instance-factories/views/templates/shared/property-mapper.d.ts +149 -0
- package/libs/instance-factories/views/templates/shared/property-mapper.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/property-mapper.js +580 -0
- package/libs/instance-factories/views/templates/shared/property-mapper.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/property-mapper.ts +700 -0
- package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts +143 -0
- package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/syntax-mapper.js +420 -0
- package/libs/instance-factories/views/templates/shared/syntax-mapper.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/syntax-mapper.ts +539 -0
- package/package.json +42 -0
- package/schema/SPECVERSE-SCHEMA.json +4274 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
# SpecVerse v3.3 Manifest Examples
|
|
2
|
+
|
|
3
|
+
This directory contains example manifests demonstrating the v3.3 hybrid mapping system.
|
|
4
|
+
|
|
5
|
+
## What is a Manifest?
|
|
6
|
+
|
|
7
|
+
A **manifest** defines **HOW** a deployment is physically implemented by mapping deployment instances to instance factories (technology implementations).
|
|
8
|
+
|
|
9
|
+
## Architecture Flow
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Components (WHAT)
|
|
13
|
+
↓
|
|
14
|
+
Deployments (WHERE)
|
|
15
|
+
↓ deployment reference
|
|
16
|
+
Manifests (HOW)
|
|
17
|
+
↓ hybrid mapping (3-tier priority)
|
|
18
|
+
Instance Factories
|
|
19
|
+
↓ code templates
|
|
20
|
+
Generated Code
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Hybrid Mapping System
|
|
24
|
+
|
|
25
|
+
v3.3 introduces a powerful 3-tier resolution system with clear priorities:
|
|
26
|
+
|
|
27
|
+
### Resolution Priority
|
|
28
|
+
|
|
29
|
+
1. **instanceMappings** (highest priority)
|
|
30
|
+
- Explicit instance name → instance factory
|
|
31
|
+
- Override everything else for specific instances
|
|
32
|
+
- Example: `analyticsDb` → `MongoDB6`
|
|
33
|
+
|
|
34
|
+
2. **capabilityMappings** (medium priority)
|
|
35
|
+
- Capability pattern → instance factory
|
|
36
|
+
- Supports wildcards (`api.rest.*`)
|
|
37
|
+
- Example: `api.rest.reports` → `ReportingAPI`
|
|
38
|
+
|
|
39
|
+
3. **defaultMappings** (lowest priority)
|
|
40
|
+
- Category → instance factory
|
|
41
|
+
- Fallback when no specific mapping found
|
|
42
|
+
- Example: all `controller` instances → `FastifyPrismaAPI`
|
|
43
|
+
|
|
44
|
+
## Examples
|
|
45
|
+
|
|
46
|
+
### 01-simple-default-mappings.yaml
|
|
47
|
+
|
|
48
|
+
**Simplest approach**: Use default mappings for all instances by category.
|
|
49
|
+
|
|
50
|
+
```yaml
|
|
51
|
+
defaultMappings:
|
|
52
|
+
controller: "FastifyPrismaAPI"
|
|
53
|
+
storage: "PostgreSQL15"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**When to use:**
|
|
57
|
+
- Small projects with consistent technology choices
|
|
58
|
+
- All instances of same category use same factory
|
|
59
|
+
- Minimal configuration needed
|
|
60
|
+
|
|
61
|
+
**Resolution example:**
|
|
62
|
+
```
|
|
63
|
+
Instance: userApi (category: controller)
|
|
64
|
+
→ Check instanceMappings: ❌ not found
|
|
65
|
+
→ Check capabilityMappings: ❌ not found
|
|
66
|
+
→ Check defaultMappings.controller: ✅ FastifyPrismaAPI
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 02-capability-mappings.yaml
|
|
70
|
+
|
|
71
|
+
**Medium complexity**: Different capabilities use different factories.
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
capabilityMappings:
|
|
75
|
+
- capability: "api.rest"
|
|
76
|
+
instanceFactory: "FastifyPrismaAPI"
|
|
77
|
+
|
|
78
|
+
- capability: "api.rest.reports"
|
|
79
|
+
instanceFactory: "ReportingAPI"
|
|
80
|
+
configuration:
|
|
81
|
+
caching: true
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**When to use:**
|
|
85
|
+
- Need different implementations for different capabilities
|
|
86
|
+
- Pattern-based routing (e.g., all `api.rest.*` → Fastify)
|
|
87
|
+
- Capability-specific configuration
|
|
88
|
+
|
|
89
|
+
**Resolution example:**
|
|
90
|
+
```
|
|
91
|
+
Instance: reportApi with capability "api.rest.reports"
|
|
92
|
+
→ Check instanceMappings: ❌ not found
|
|
93
|
+
→ Check capabilityMappings: ✅ matches "api.rest.reports" → ReportingAPI
|
|
94
|
+
→ (defaultMappings not checked)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 03-hybrid-mappings.yaml
|
|
98
|
+
|
|
99
|
+
**Full power**: All three strategies working together.
|
|
100
|
+
|
|
101
|
+
```yaml
|
|
102
|
+
defaultMappings:
|
|
103
|
+
controller: "FastifyPrismaAPI"
|
|
104
|
+
storage: "PostgreSQL15"
|
|
105
|
+
|
|
106
|
+
capabilityMappings:
|
|
107
|
+
- capability: "api.rest.reports"
|
|
108
|
+
instanceFactory: "ReportingAPI"
|
|
109
|
+
|
|
110
|
+
instanceMappings:
|
|
111
|
+
- instanceName: "analyticsDb"
|
|
112
|
+
instanceFactory: "MongoDB6"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**When to use:**
|
|
116
|
+
- Complex applications with mixed technologies
|
|
117
|
+
- Need fine-grained control over specific instances
|
|
118
|
+
- Different teams/services with different tech preferences
|
|
119
|
+
|
|
120
|
+
**Resolution examples:**
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
Instance: analyticsDb (category: storage)
|
|
124
|
+
→ Check instanceMappings: ✅ "analyticsDb" → MongoDB6
|
|
125
|
+
→ (capabilityMappings not checked - instance match takes priority)
|
|
126
|
+
→ (defaultMappings not checked)
|
|
127
|
+
|
|
128
|
+
Instance: reportApi (capability: "api.rest.reports")
|
|
129
|
+
→ Check instanceMappings: ❌ not found
|
|
130
|
+
→ Check capabilityMappings: ✅ "api.rest.reports" → ReportingAPI
|
|
131
|
+
→ (defaultMappings not checked)
|
|
132
|
+
|
|
133
|
+
Instance: userApi (category: controller, no specific mappings)
|
|
134
|
+
→ Check instanceMappings: ❌ not found
|
|
135
|
+
→ Check capabilityMappings: ❌ not found
|
|
136
|
+
→ Check defaultMappings.controller: ✅ FastifyPrismaAPI
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Deployment Specification
|
|
140
|
+
|
|
141
|
+
All examples reference `blog-api.specly`, which defines:
|
|
142
|
+
|
|
143
|
+
- **Components**: User, Post, Comment models
|
|
144
|
+
- **Deployment**: production environment with multiple instances
|
|
145
|
+
- `userApi` - main REST API (controller)
|
|
146
|
+
- `adminApi` - admin/reporting API (controller)
|
|
147
|
+
- `userDb` - PostgreSQL database (storage)
|
|
148
|
+
- `analyticsDb` - analytics database (storage, can override to MongoDB)
|
|
149
|
+
- `sessionCache` - Redis cache (storage)
|
|
150
|
+
- `validator` - Zod validation (service)
|
|
151
|
+
|
|
152
|
+
## Using These Examples
|
|
153
|
+
|
|
154
|
+
### Generate Code with Default Mappings
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
specverse realize all blog-api.specly \
|
|
158
|
+
-m examples/manifests/01-simple-default-mappings.yaml
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Generate with Capability-Based Routing
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
specverse realize all blog-api.specly \
|
|
165
|
+
-m examples/manifests/02-capability-mappings.yaml
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Generate with Full Hybrid Mapping
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
specverse realize all blog-api.specly \
|
|
172
|
+
-m examples/manifests/03-hybrid-mappings.yaml
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Best Practices
|
|
176
|
+
|
|
177
|
+
### Start Simple, Add Complexity As Needed
|
|
178
|
+
|
|
179
|
+
1. **Phase 1**: Use `defaultMappings` for all instances
|
|
180
|
+
2. **Phase 2**: Add `capabilityMappings` for specialized capabilities
|
|
181
|
+
3. **Phase 3**: Use `instanceMappings` for exceptional cases
|
|
182
|
+
|
|
183
|
+
### When to Use Each Strategy
|
|
184
|
+
|
|
185
|
+
**defaultMappings:**
|
|
186
|
+
- ✅ Consistent technology across all instances of same category
|
|
187
|
+
- ✅ Simple projects with unified tech stack
|
|
188
|
+
- ✅ Getting started quickly
|
|
189
|
+
|
|
190
|
+
**capabilityMappings:**
|
|
191
|
+
- ✅ Different technologies for different capabilities
|
|
192
|
+
- ✅ Pattern-based routing (reports, analytics, admin vs. user APIs)
|
|
193
|
+
- ✅ Capability-specific configuration
|
|
194
|
+
|
|
195
|
+
**instanceMappings:**
|
|
196
|
+
- ✅ Exceptional instances that need different technology
|
|
197
|
+
- ✅ Migration scenarios (moving one instance to new tech)
|
|
198
|
+
- ✅ Per-instance fine-tuning
|
|
199
|
+
|
|
200
|
+
### Configuration Precedence
|
|
201
|
+
|
|
202
|
+
Configuration merges in this order (later overrides earlier):
|
|
203
|
+
|
|
204
|
+
1. Instance factory defaults
|
|
205
|
+
2. Global manifest configuration
|
|
206
|
+
3. Mapping-specific configuration
|
|
207
|
+
4. (Future: instance-level configuration in deployment)
|
|
208
|
+
|
|
209
|
+
## Migration from v3.2
|
|
210
|
+
|
|
211
|
+
v3.2 manifests used `implementationTypes` array:
|
|
212
|
+
|
|
213
|
+
```yaml
|
|
214
|
+
# v3.2 (old)
|
|
215
|
+
implementationTypes:
|
|
216
|
+
- ref: "backend/fastify-prisma"
|
|
217
|
+
alias: "api"
|
|
218
|
+
|
|
219
|
+
capabilityMappings:
|
|
220
|
+
- capability: "api.rest"
|
|
221
|
+
implementationType: "api" # ← used alias
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
v3.3 hybrid mapping is cleaner:
|
|
225
|
+
|
|
226
|
+
```yaml
|
|
227
|
+
# v3.3 (new)
|
|
228
|
+
defaultMappings:
|
|
229
|
+
controller: "FastifyPrismaAPI"
|
|
230
|
+
|
|
231
|
+
# OR for more control
|
|
232
|
+
capabilityMappings:
|
|
233
|
+
- capability: "api.rest"
|
|
234
|
+
instanceFactory: "FastifyPrismaAPI" # ← direct reference
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
## See Also
|
|
238
|
+
|
|
239
|
+
- [SCHEMA-CONSOLIDATION-PROPOSAL.md](../../docs/implementation-plans/v3.3-implementation/SCHEMA-CONSOLIDATION-PROPOSAL.md) - Architecture details
|
|
240
|
+
- [SCHEMA-CONSOLIDATION-ADDENDUM.md](../../docs/implementation-plans/v3.3-implementation/SCHEMA-CONSOLIDATION-ADDENDUM.md) - Hybrid mapping deep dive
|
|
241
|
+
- [INSTANCE-FACTORY-EXTENSIBILITY.md](../../docs/implementation-plans/v3.3-implementation/INSTANCE-FACTORY-EXTENSIBILITY.md) - Extensibility patterns
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
**SpecVerse v3.3** - Define once, implement anywhere with hybrid mapping flexibility.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
manifests:
|
|
2
|
+
backendOnlyImplementation:
|
|
3
|
+
specVersion: "3.5.0"
|
|
4
|
+
deployment:
|
|
5
|
+
deploymentSource: "../specs/main.specly"
|
|
6
|
+
deploymentName: "production"
|
|
7
|
+
configuration:
|
|
8
|
+
outputStructure: "standalone"
|
|
9
|
+
backendDir: "."
|
|
10
|
+
apiPort: 3000
|
|
11
|
+
apiHost: "0.0.0.0"
|
|
12
|
+
corsOrigins: "${CORS_ORIGINS}"
|
|
13
|
+
capabilityMappings:
|
|
14
|
+
- capability: "orm.schema"
|
|
15
|
+
instanceFactory: "PrismaORM"
|
|
16
|
+
configuration:
|
|
17
|
+
outputStructure: "standalone"
|
|
18
|
+
backendDir: "."
|
|
19
|
+
- capability: "service.controller"
|
|
20
|
+
instanceFactory: "PrismaServices"
|
|
21
|
+
configuration:
|
|
22
|
+
outputStructure: "standalone"
|
|
23
|
+
backendDir: "."
|
|
24
|
+
- capability: "api.rest"
|
|
25
|
+
instanceFactory: "FastifyAPI"
|
|
26
|
+
configuration:
|
|
27
|
+
outputStructure: "standalone"
|
|
28
|
+
backendDir: "."
|
|
29
|
+
server:
|
|
30
|
+
cors:
|
|
31
|
+
enabled: true
|
|
32
|
+
origins:
|
|
33
|
+
- "${CORS_ORIGINS}"
|
|
34
|
+
- capability: "app.entrypoint"
|
|
35
|
+
instanceFactory: "GenericApp"
|
|
36
|
+
configuration:
|
|
37
|
+
outputStructure: "standalone"
|
|
38
|
+
backendDir: "."
|
|
39
|
+
- capability: "project.scaffold"
|
|
40
|
+
instanceFactory: "GenericScaffold"
|
|
41
|
+
configuration:
|
|
42
|
+
outputStructure: "standalone"
|
|
43
|
+
includeReadme: true
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Blog API - Manifest Example Specification
|
|
2
|
+
|
|
3
|
+
**File**: `blog-api.specly`
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Simple blog platform API specification used to demonstrate v3.3 hybrid manifest mappings and deployment configurations.
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
This is a **manifest reference example** used by:
|
|
12
|
+
- Manifest examples in `06-deploy/`
|
|
13
|
+
- v3.3 implementation type demonstrations
|
|
14
|
+
- Capability mapping examples
|
|
15
|
+
- Deployment configuration testing
|
|
16
|
+
|
|
17
|
+
## Key Features
|
|
18
|
+
|
|
19
|
+
- **Simple Models**: User, Post, Comment
|
|
20
|
+
- **Clean Architecture**: Minimal dependencies
|
|
21
|
+
- **Manifest Testing**: Referenced by multiple manifests
|
|
22
|
+
- **Deployment Target**: Used in deployment examples
|
|
23
|
+
|
|
24
|
+
## Models
|
|
25
|
+
|
|
26
|
+
### User
|
|
27
|
+
- Username and email authentication
|
|
28
|
+
- Password hash storage
|
|
29
|
+
- Audit timestamps
|
|
30
|
+
|
|
31
|
+
### Post
|
|
32
|
+
- Blog post content
|
|
33
|
+
- Title and slug (SEO-friendly URL)
|
|
34
|
+
- Publishing workflow (draft, published, archived)
|
|
35
|
+
- Author relationship with cascade delete
|
|
36
|
+
|
|
37
|
+
### Comment
|
|
38
|
+
- User-generated content
|
|
39
|
+
- Timestamp tracking
|
|
40
|
+
- Post and user relationships
|
|
41
|
+
|
|
42
|
+
## Usage with Manifests
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Docker Compose deployment
|
|
46
|
+
specverse realize all examples/manifests/blog-api.specly \
|
|
47
|
+
-m examples/06-deploy/06-04-docker-compose-manifest.specly
|
|
48
|
+
|
|
49
|
+
# Kubernetes deployment
|
|
50
|
+
specverse realize all examples/manifests/blog-api.specly \
|
|
51
|
+
-m examples/06-deploy/06-03-kubernetes-deployment-manifest.specly
|
|
52
|
+
|
|
53
|
+
# Cloud-native deployment
|
|
54
|
+
specverse realize all examples/manifests/blog-api.specly \
|
|
55
|
+
-m examples/06-deploy/06-05-cloud-native-manifest.specly
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Referenced By
|
|
59
|
+
|
|
60
|
+
This specification is referenced by:
|
|
61
|
+
- `06-04-docker-compose-manifest.specly`
|
|
62
|
+
- `06-03-kubernetes-deployment-manifest.specly`
|
|
63
|
+
- `06-05-cloud-native-manifest.specly`
|
|
64
|
+
- Various implementation manifest examples
|
|
65
|
+
|
|
66
|
+
## Deployment Scenarios
|
|
67
|
+
|
|
68
|
+
1. **Development**: Docker Compose with local database
|
|
69
|
+
2. **Staging**: Kubernetes cluster with managed database
|
|
70
|
+
3. **Production**: Cloud-native with auto-scaling
|
|
71
|
+
4. **Testing**: In-memory database for unit tests
|
|
72
|
+
|
|
73
|
+
## Related Examples
|
|
74
|
+
|
|
75
|
+
- `06-deploy/` - All deployment manifest examples
|
|
76
|
+
- `12-v3.3-features/12-01-blog-platform-v3.3.specly` - v3.3 blog features
|
|
77
|
+
- `08-service-layer/blog-api.specly` - Service layer version
|
|
78
|
+
- `12-end-to-end/manifests/` - Implementation manifests
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Simple Blog API Deployment Example
|
|
2
|
+
# Referenced by manifest examples to demonstrate v3.3 hybrid mapping
|
|
3
|
+
|
|
4
|
+
components:
|
|
5
|
+
BlogAPI:
|
|
6
|
+
version: "1.0.0"
|
|
7
|
+
description: "Simple blog platform API"
|
|
8
|
+
|
|
9
|
+
models:
|
|
10
|
+
User:
|
|
11
|
+
attributes:
|
|
12
|
+
username: String required unique
|
|
13
|
+
email: Email required unique
|
|
14
|
+
passwordHash: String required
|
|
15
|
+
createdAt: DateTime auto=now
|
|
16
|
+
|
|
17
|
+
Post:
|
|
18
|
+
attributes:
|
|
19
|
+
title: String required
|
|
20
|
+
slug: String required unique
|
|
21
|
+
content: Text required
|
|
22
|
+
publishedAt: DateTime
|
|
23
|
+
status: String required values=[draft,published,archived]
|
|
24
|
+
relationships:
|
|
25
|
+
author: belongsTo User cascade
|
|
26
|
+
|
|
27
|
+
Comment:
|
|
28
|
+
attributes:
|
|
29
|
+
content: Text required
|
|
30
|
+
createdAt: DateTime auto=now
|
|
31
|
+
relationships:
|
|
32
|
+
post: belongsTo Post cascade
|
|
33
|
+
author: belongsTo User
|
|
34
|
+
|
|
35
|
+
deployments:
|
|
36
|
+
production:
|
|
37
|
+
version: "1.0.0"
|
|
38
|
+
environment: production
|
|
39
|
+
description: "Production deployment with multiple instances"
|
|
40
|
+
|
|
41
|
+
instances:
|
|
42
|
+
controllers:
|
|
43
|
+
# Main API controller
|
|
44
|
+
userApi:
|
|
45
|
+
component: "BlogAPI"
|
|
46
|
+
advertises: ["api.rest", "api.rest.crud"]
|
|
47
|
+
uses: ["storage.database"]
|
|
48
|
+
|
|
49
|
+
# Admin API with additional capabilities
|
|
50
|
+
adminApi:
|
|
51
|
+
component: "BlogAPI"
|
|
52
|
+
advertises: ["api.rest.admin", "api.rest.reports"]
|
|
53
|
+
uses: ["storage.database", "storage.cache"]
|
|
54
|
+
|
|
55
|
+
storage:
|
|
56
|
+
# Main PostgreSQL database
|
|
57
|
+
userDb:
|
|
58
|
+
component: "BlogAPI"
|
|
59
|
+
type: "relational"
|
|
60
|
+
advertises: ["storage.database"]
|
|
61
|
+
|
|
62
|
+
# Analytics database (can be overridden to MongoDB)
|
|
63
|
+
analyticsDb:
|
|
64
|
+
component: "BlogAPI"
|
|
65
|
+
type: "document"
|
|
66
|
+
advertises: ["storage.database.analytics"]
|
|
67
|
+
|
|
68
|
+
# Session cache
|
|
69
|
+
sessionCache:
|
|
70
|
+
component: "BlogAPI"
|
|
71
|
+
type: "keyvalue"
|
|
72
|
+
advertises: ["storage.cache"]
|
|
73
|
+
|
|
74
|
+
services:
|
|
75
|
+
# Validation service
|
|
76
|
+
validator:
|
|
77
|
+
component: "BlogAPI"
|
|
78
|
+
advertises: ["validation.runtime"]
|
|
79
|
+
uses: ["api.rest"]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
manifests:
|
|
2
|
+
frontendOnlyImplementation:
|
|
3
|
+
specVersion: "3.5.0"
|
|
4
|
+
deployment:
|
|
5
|
+
deploymentSource: "../specs/main.specly"
|
|
6
|
+
deploymentName: "production"
|
|
7
|
+
configuration:
|
|
8
|
+
outputStructure: "standalone"
|
|
9
|
+
frontendDir: "."
|
|
10
|
+
apiBaseUrl: "${VITE_API_BASE_URL}"
|
|
11
|
+
apiPrefix: "/api"
|
|
12
|
+
capabilityMappings:
|
|
13
|
+
- capability: "app.frontend"
|
|
14
|
+
instanceFactory: "ReactApp"
|
|
15
|
+
configuration:
|
|
16
|
+
outputStructure: "standalone"
|
|
17
|
+
frontendDir: "."
|
|
18
|
+
apiBaseUrl: "${VITE_API_BASE_URL}"
|
|
19
|
+
vite:
|
|
20
|
+
port: 5173
|
|
21
|
+
proxy:
|
|
22
|
+
/api: "${VITE_API_BASE_URL}"
|
|
23
|
+
- capability: "ui.components"
|
|
24
|
+
instanceFactory: "ReactComponents"
|
|
25
|
+
configuration:
|
|
26
|
+
outputStructure: "standalone"
|
|
27
|
+
frontendDir: "."
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
manifests:
|
|
2
|
+
FullStackApp:
|
|
3
|
+
specVersion: "3.5.0"
|
|
4
|
+
name: "fullstack-app-implementation"
|
|
5
|
+
description: "Full-stack application with React frontend, Fastify API, and event-driven architecture"
|
|
6
|
+
version: "1.0.0"
|
|
7
|
+
deployment:
|
|
8
|
+
deploymentSource: "./blog-api.specly"
|
|
9
|
+
deploymentName: "production"
|
|
10
|
+
defaultMappings:
|
|
11
|
+
storage: "PostgreSQL15"
|
|
12
|
+
controller: "FastifyAPI"
|
|
13
|
+
service: "PrismaORM"
|
|
14
|
+
view: "ReactComponents"
|
|
15
|
+
communication: "EventEmitter"
|
|
16
|
+
capabilityMappings:
|
|
17
|
+
- capability: "api.rest"
|
|
18
|
+
instanceFactory: "FastifyAPI"
|
|
19
|
+
- capability: "api.rest.crud"
|
|
20
|
+
instanceFactory: "FastifyAPI"
|
|
21
|
+
- capability: "storage.database"
|
|
22
|
+
instanceFactory: "PostgreSQL15"
|
|
23
|
+
- capability: "ui.components"
|
|
24
|
+
instanceFactory: "ReactComponents"
|
|
25
|
+
- capability: "ui.views"
|
|
26
|
+
instanceFactory: "ReactComponents"
|
|
27
|
+
- capability: "ui.forms"
|
|
28
|
+
instanceFactory: "ReactComponents"
|
|
29
|
+
- capability: "messaging.pubsub"
|
|
30
|
+
instanceFactory: "EventEmitter"
|
|
31
|
+
- capability: "messaging.events"
|
|
32
|
+
instanceFactory: "EventEmitter"
|
|
33
|
+
- capability: "validation.runtime"
|
|
34
|
+
instanceFactory: "ZodValidation"
|
|
35
|
+
configuration:
|
|
36
|
+
frontend:
|
|
37
|
+
buildTool: "vite"
|
|
38
|
+
outputDir: "dist/client"
|
|
39
|
+
publicPath: "/app"
|
|
40
|
+
backend:
|
|
41
|
+
outputDir: "dist/server"
|
|
42
|
+
port: 3000
|
|
43
|
+
events:
|
|
44
|
+
mode: "development"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
manifests:
|
|
2
|
+
fullstackMonorepoImplementation:
|
|
3
|
+
specVersion: "3.5.0"
|
|
4
|
+
deployment:
|
|
5
|
+
deploymentSource: "../specs/main.specly"
|
|
6
|
+
deploymentName: "development"
|
|
7
|
+
configuration:
|
|
8
|
+
outputStructure: "monorepo"
|
|
9
|
+
frontendDir: "frontend"
|
|
10
|
+
backendDir: "backend"
|
|
11
|
+
apiBaseUrl: "http://localhost:3000"
|
|
12
|
+
apiPrefix: "/api"
|
|
13
|
+
capabilityMappings:
|
|
14
|
+
- capability: "orm.schema"
|
|
15
|
+
instanceFactory: "PrismaORM"
|
|
16
|
+
configuration:
|
|
17
|
+
outputStructure: "monorepo"
|
|
18
|
+
backendDir: "backend"
|
|
19
|
+
- capability: "service.controller"
|
|
20
|
+
instanceFactory: "PrismaServices"
|
|
21
|
+
configuration:
|
|
22
|
+
outputStructure: "monorepo"
|
|
23
|
+
backendDir: "backend"
|
|
24
|
+
- capability: "api.rest"
|
|
25
|
+
instanceFactory: "FastifyAPI"
|
|
26
|
+
configuration:
|
|
27
|
+
outputStructure: "monorepo"
|
|
28
|
+
backendDir: "backend"
|
|
29
|
+
server:
|
|
30
|
+
port: 3000
|
|
31
|
+
cors:
|
|
32
|
+
enabled: true
|
|
33
|
+
origins:
|
|
34
|
+
- "http://localhost:5173"
|
|
35
|
+
- capability: "app.entrypoint"
|
|
36
|
+
instanceFactory: "GenericApp"
|
|
37
|
+
configuration:
|
|
38
|
+
outputStructure: "monorepo"
|
|
39
|
+
backendDir: "backend"
|
|
40
|
+
- capability: "app.frontend"
|
|
41
|
+
instanceFactory: "ReactApp"
|
|
42
|
+
configuration:
|
|
43
|
+
outputStructure: "monorepo"
|
|
44
|
+
frontendDir: "frontend"
|
|
45
|
+
apiBaseUrl: "http://localhost:3000"
|
|
46
|
+
vite:
|
|
47
|
+
port: 5173
|
|
48
|
+
proxy:
|
|
49
|
+
/api: "http://localhost:3000"
|
|
50
|
+
- capability: "ui.components"
|
|
51
|
+
instanceFactory: "ReactComponents"
|
|
52
|
+
configuration:
|
|
53
|
+
outputStructure: "monorepo"
|
|
54
|
+
frontendDir: "frontend"
|
|
55
|
+
- capability: "project.scaffold"
|
|
56
|
+
instanceFactory: "GenericScaffold"
|
|
57
|
+
configuration:
|
|
58
|
+
outputStructure: "monorepo"
|
|
59
|
+
includeReadme: true
|
|
60
|
+
workspaces:
|
|
61
|
+
- "backend"
|
|
62
|
+
- "frontend"
|