@specverse/engines 4.1.30 → 4.2.1
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/manifests/frontend-only.yaml +3 -6
- package/assets/examples/manifests/fullstack-app.yaml +5 -7
- package/assets/examples/manifests/fullstack-monorepo.yaml +3 -6
- package/assets/templates/default/specs/main.specly +65 -0
- package/dist/inference/comprehensive-engine.d.ts.map +1 -1
- package/dist/inference/comprehensive-engine.js +3 -19
- package/dist/inference/comprehensive-engine.js.map +1 -1
- package/dist/inference/core/rule-engine.d.ts +31 -0
- package/dist/inference/core/rule-engine.d.ts.map +1 -1
- package/dist/inference/core/rule-engine.js +117 -33
- package/dist/inference/core/rule-engine.js.map +1 -1
- package/dist/inference/core/rule-file-types.d.ts +0 -2
- package/dist/inference/core/rule-file-types.d.ts.map +1 -1
- package/dist/inference/core/rule-file-types.js +3 -6
- package/dist/inference/core/rule-file-types.js.map +1 -1
- package/dist/inference/core/rule-loader.d.ts +5 -15
- package/dist/inference/core/rule-loader.d.ts.map +1 -1
- package/dist/inference/core/rule-loader.js +43 -132
- package/dist/inference/core/rule-loader.js.map +1 -1
- package/dist/inference/core/types.d.ts +0 -6
- package/dist/inference/core/types.d.ts.map +1 -1
- package/dist/inference/core/types.js +0 -4
- package/dist/inference/core/types.js.map +1 -1
- package/dist/inference/logical/generators/component-type-resolver.d.ts +0 -26
- package/dist/inference/logical/generators/component-type-resolver.d.ts.map +1 -1
- package/dist/inference/logical/generators/component-type-resolver.js +0 -19
- package/dist/inference/logical/generators/component-type-resolver.js.map +1 -1
- package/dist/inference/logical/generators/specialist-view-expander.d.ts +1 -17
- package/dist/inference/logical/generators/specialist-view-expander.d.ts.map +1 -1
- package/dist/inference/logical/generators/specialist-view-expander.js +0 -15
- package/dist/inference/logical/generators/specialist-view-expander.js.map +1 -1
- package/dist/inference/logical/generators/view-generator.d.ts +4 -14
- package/dist/inference/logical/generators/view-generator.d.ts.map +1 -1
- package/dist/inference/logical/generators/view-generator.js +6 -26
- package/dist/inference/logical/generators/view-generator.js.map +1 -1
- package/dist/inference/logical/index.d.ts +2 -2
- package/dist/inference/logical/index.d.ts.map +1 -1
- package/dist/inference/logical/logical-engine.d.ts.map +1 -1
- package/dist/inference/logical/logical-engine.js +17 -80
- package/dist/inference/logical/logical-engine.js.map +1 -1
- package/dist/inference/quint-transpiler.d.ts +5 -3
- package/dist/inference/quint-transpiler.d.ts.map +1 -1
- package/dist/inference/quint-transpiler.js +11 -6
- package/dist/inference/quint-transpiler.js.map +1 -1
- package/dist/libs/instance-factories/CURVED-INTERFACE.md +278 -0
- package/dist/libs/instance-factories/README.md +73 -0
- package/dist/libs/instance-factories/applications/README.md +51 -0
- package/dist/libs/instance-factories/applications/generic-app.yaml +52 -0
- package/{libs/instance-factories/applications/react-app.yaml → dist/libs/instance-factories/applications/react-app-runtime.yaml} +30 -77
- package/dist/libs/instance-factories/applications/react-app-starter.yaml +143 -0
- package/dist/libs/instance-factories/applications/templates/react/env-example-generator.js +24 -2
- package/dist/libs/instance-factories/applications/templates/react/vite-config-generator.js +54 -33
- package/dist/libs/instance-factories/applications/templates/react-starter/README.md +211 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/api-types-starter-generator.js +69 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/app-tsx-generator.js +110 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/belongs-to.js +40 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/dashboard-body-composer.js +129 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/detail-body-composer.js +80 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/form-body-composer.js +217 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/helpers-emitter.js +51 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/html-to-jsx.js +192 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/list-body-composer.js +56 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/orchestrator.js +41 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/package-json-generator.js +38 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/regen-safety.js +89 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/skeletons/dashboard.tsx.template +49 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/skeletons/detail.tsx.template +96 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/skeletons/form.tsx.template +116 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/skeletons/list.tsx.template +74 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/use-api-hooks-starter-generator.js +95 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/view-emitter.js +81 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/views-generator.js +66 -0
- package/dist/libs/instance-factories/archived/fastify-prisma.yaml +104 -0
- package/dist/libs/instance-factories/cli/README.md +43 -0
- package/dist/libs/instance-factories/cli/commander-js.yaml +55 -0
- package/dist/libs/instance-factories/cli/templates/commander/command-generator.js +63 -12
- package/dist/libs/instance-factories/communication/README.md +47 -0
- package/dist/libs/instance-factories/communication/event-emitter.yaml +60 -0
- package/dist/libs/instance-factories/communication/rabbitmq-events.yaml +87 -0
- package/dist/libs/instance-factories/controllers/README.md +42 -0
- package/dist/libs/instance-factories/controllers/fastify.yaml +139 -0
- package/dist/libs/instance-factories/controllers/templates/fastify/server-generator.js +29 -2
- package/dist/libs/instance-factories/infrastructure/README.md +29 -0
- package/dist/libs/instance-factories/infrastructure/docker-k8s.yaml +61 -0
- package/dist/libs/instance-factories/orms/README.md +54 -0
- package/dist/libs/instance-factories/orms/prisma.yaml +89 -0
- package/dist/libs/instance-factories/orms/templates/prisma/schema-generator.js +2 -2
- package/dist/libs/instance-factories/scaffolding/README.md +49 -0
- package/dist/libs/instance-factories/scaffolding/generic-scaffold.yaml +65 -0
- package/dist/libs/instance-factories/sdks/README.md +28 -0
- package/dist/libs/instance-factories/sdks/python-sdk.yaml +66 -0
- package/dist/libs/instance-factories/sdks/typescript-sdk.yaml +59 -0
- package/dist/libs/instance-factories/services/README.md +55 -0
- package/dist/libs/instance-factories/services/prisma-services.yaml +71 -0
- package/dist/libs/instance-factories/storage/README.md +34 -0
- package/dist/libs/instance-factories/storage/mongodb.yaml +79 -0
- package/dist/libs/instance-factories/storage/postgresql.yaml +75 -0
- package/dist/libs/instance-factories/storage/redis.yaml +79 -0
- package/dist/libs/instance-factories/testing/README.md +40 -0
- package/dist/libs/instance-factories/testing/vitest-tests.yaml +63 -0
- package/dist/libs/instance-factories/tools/README.md +70 -0
- package/dist/libs/instance-factories/tools/mcp.yaml +36 -0
- package/dist/libs/instance-factories/tools/vscode.yaml +35 -0
- package/dist/libs/instance-factories/validation/README.md +38 -0
- package/dist/libs/instance-factories/validation/zod.yaml +56 -0
- package/dist/realize/engines/code-generator.d.ts.map +1 -1
- package/dist/realize/engines/code-generator.js +3 -0
- package/dist/realize/engines/code-generator.js.map +1 -1
- package/dist/realize/index.d.ts.map +1 -1
- package/dist/realize/index.js +15 -22
- package/dist/realize/index.js.map +1 -1
- package/dist/registry/utils/manifest-adapter.d.ts +8 -1
- package/dist/registry/utils/manifest-adapter.d.ts.map +1 -1
- package/dist/registry/utils/manifest-adapter.js +8 -1
- package/dist/registry/utils/manifest-adapter.js.map +1 -1
- package/libs/instance-factories/applications/react-app-starter.yaml +143 -0
- package/libs/instance-factories/applications/templates/react/env-example-generator.ts +24 -2
- package/libs/instance-factories/applications/templates/react/vite-config-generator.ts +54 -33
- package/libs/instance-factories/applications/templates/react-starter/README.md +211 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/dashboard-body-composer.test.ts +153 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/detail-body-composer.test.ts +146 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/form-body-composer.test.ts +188 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/helpers-emitter.test.ts +55 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/html-to-jsx.test.ts +140 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/list-body-composer.test.ts +146 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/orchestrator.test.ts +184 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/parity-p2-factory-imports.test.ts +116 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/parity-p3-rendered-output.test.ts +183 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/regen-safety.test.ts +144 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/starter-generators.test.ts +114 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/view-emitter.test.ts +107 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/views-generator.test.ts +139 -0
- package/libs/instance-factories/applications/templates/react-starter/api-types-starter-generator.ts +98 -0
- package/libs/instance-factories/applications/templates/react-starter/app-tsx-generator.ts +141 -0
- package/libs/instance-factories/applications/templates/react-starter/belongs-to.ts +82 -0
- package/libs/instance-factories/applications/templates/react-starter/dashboard-body-composer.ts +189 -0
- package/libs/instance-factories/applications/templates/react-starter/detail-body-composer.ts +135 -0
- package/libs/instance-factories/applications/templates/react-starter/form-body-composer.ts +383 -0
- package/libs/instance-factories/applications/templates/react-starter/helpers-emitter.ts +66 -0
- package/libs/instance-factories/applications/templates/react-starter/html-to-jsx.ts +334 -0
- package/libs/instance-factories/applications/templates/react-starter/list-body-composer.ts +146 -0
- package/libs/instance-factories/applications/templates/react-starter/orchestrator.ts +95 -0
- package/libs/instance-factories/applications/templates/react-starter/package-json-generator.ts +57 -0
- package/libs/instance-factories/applications/templates/react-starter/regen-safety.ts +157 -0
- package/libs/instance-factories/applications/templates/react-starter/skeletons/dashboard.tsx.template +49 -0
- package/libs/instance-factories/applications/templates/react-starter/skeletons/detail.tsx.template +96 -0
- package/libs/instance-factories/applications/templates/react-starter/skeletons/form.tsx.template +116 -0
- package/libs/instance-factories/applications/templates/react-starter/skeletons/list.tsx.template +74 -0
- package/libs/instance-factories/applications/templates/react-starter/use-api-hooks-starter-generator.ts +124 -0
- package/libs/instance-factories/applications/templates/react-starter/view-emitter.ts +209 -0
- package/libs/instance-factories/applications/templates/react-starter/views-generator.ts +137 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.ts +63 -12
- package/libs/instance-factories/controllers/fastify.yaml +7 -0
- package/libs/instance-factories/controllers/templates/fastify/server-generator.ts +36 -2
- package/libs/instance-factories/orms/templates/prisma/schema-generator.ts +11 -4
- package/package.json +3 -3
- package/dist/libs/instance-factories/applications/templates/react/_view-components-source.js +0 -530
- package/dist/libs/instance-factories/applications/templates/react/app-tsx-generator.js +0 -73
- package/dist/libs/instance-factories/applications/templates/react/field-helpers-generator.js +0 -99
- package/dist/libs/instance-factories/applications/templates/react/package-json-generator.js +0 -49
- package/dist/libs/instance-factories/applications/templates/react/pattern-adapter-generator.js +0 -156
- package/dist/libs/instance-factories/applications/templates/react/react-pattern-adapter.js +0 -935
- package/dist/libs/instance-factories/applications/templates/react/relationship-field-generator.js +0 -143
- package/dist/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.js +0 -646
- package/dist/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.js +0 -65
- package/dist/libs/instance-factories/applications/templates/react/view-dashboard-generator.js +0 -143
- package/dist/libs/instance-factories/applications/templates/react/view-detail-generator.js +0 -143
- package/dist/libs/instance-factories/applications/templates/react/view-form-generator.js +0 -355
- package/dist/libs/instance-factories/applications/templates/react/view-list-generator.js +0 -91
- package/dist/libs/instance-factories/applications/templates/react/view-router-generator.js +0 -79
- package/dist/libs/instance-factories/views/index.js +0 -48
- package/dist/libs/instance-factories/views/templates/react/adapters/antd-adapter.js +0 -742
- package/dist/libs/instance-factories/views/templates/react/adapters/mui-adapter.js +0 -824
- package/dist/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.js +0 -719
- package/dist/libs/instance-factories/views/templates/react/app-generator.js +0 -45
- package/dist/libs/instance-factories/views/templates/react/components-generator.js +0 -820
- package/dist/libs/instance-factories/views/templates/react/forms-generator.js +0 -275
- package/dist/libs/instance-factories/views/templates/react/frontend-package-json-generator.js +0 -46
- package/dist/libs/instance-factories/views/templates/react/hooks-generator.js +0 -81
- package/dist/libs/instance-factories/views/templates/react/index-css-generator.js +0 -9
- package/dist/libs/instance-factories/views/templates/react/index-html-generator.js +0 -23
- package/dist/libs/instance-factories/views/templates/react/main-tsx-generator.js +0 -21
- package/dist/libs/instance-factories/views/templates/react/react-component-generator.js +0 -299
- package/dist/libs/instance-factories/views/templates/react/router-generator.js +0 -136
- package/dist/libs/instance-factories/views/templates/react/router-generic-generator.js +0 -107
- package/dist/libs/instance-factories/views/templates/react/shared-utils-generator.js +0 -187
- package/dist/libs/instance-factories/views/templates/react/spec-json-generator.js +0 -7
- package/dist/libs/instance-factories/views/templates/react/types-generator.js +0 -56
- package/dist/libs/instance-factories/views/templates/react/views-metadata-generator.js +0 -27
- package/dist/libs/instance-factories/views/templates/react/vite-config-generator.js +0 -29
- package/dist/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js +0 -261
- package/dist/libs/instance-factories/views/templates/shared/adapter-types.js +0 -34
- package/dist/libs/instance-factories/views/templates/shared/atomic-components-registry.js +0 -800
- package/dist/libs/instance-factories/views/templates/shared/base-generator.js +0 -305
- package/dist/libs/instance-factories/views/templates/shared/component-metadata.js +0 -517
- package/dist/libs/instance-factories/views/templates/shared/composite-pattern-types.js +0 -0
- package/dist/libs/instance-factories/views/templates/shared/composite-patterns.js +0 -445
- package/dist/libs/instance-factories/views/templates/shared/index.js +0 -80
- package/dist/libs/instance-factories/views/templates/shared/pattern-validator.js +0 -210
- package/dist/libs/instance-factories/views/templates/shared/property-mapper.js +0 -492
- package/dist/libs/instance-factories/views/templates/shared/syntax-mapper.js +0 -321
- package/dist/realize/index.js.bak +0 -758
- package/libs/instance-factories/applications/templates/react/_view-components-source.ts +0 -555
- package/libs/instance-factories/applications/templates/react/app-tsx-generator.ts +0 -94
- package/libs/instance-factories/applications/templates/react/field-helpers-generator.ts +0 -106
- package/libs/instance-factories/applications/templates/react/package-json-generator.ts +0 -57
- package/libs/instance-factories/applications/templates/react/pattern-adapter-generator.ts +0 -179
- package/libs/instance-factories/applications/templates/react/react-pattern-adapter.tsx +0 -1347
- package/libs/instance-factories/applications/templates/react/relationship-field-generator.ts +0 -150
- package/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.ts +0 -704
- package/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.ts +0 -84
- package/libs/instance-factories/applications/templates/react/view-dashboard-generator.ts +0 -150
- package/libs/instance-factories/applications/templates/react/view-detail-generator.ts +0 -150
- package/libs/instance-factories/applications/templates/react/view-form-generator.ts +0 -362
- package/libs/instance-factories/applications/templates/react/view-list-generator.ts +0 -98
- package/libs/instance-factories/applications/templates/react/view-router-generator.ts +0 -89
- package/libs/instance-factories/views/README.md +0 -62
- package/libs/instance-factories/views/index.d.ts +0 -13
- package/libs/instance-factories/views/index.d.ts.map +0 -1
- package/libs/instance-factories/views/index.js +0 -18
- package/libs/instance-factories/views/index.js.map +0 -1
- package/libs/instance-factories/views/index.ts +0 -45
- package/libs/instance-factories/views/react-components.yaml +0 -129
- package/libs/instance-factories/views/templates/ARCHITECTURE.md +0 -198
- package/libs/instance-factories/views/templates/react/adapters/antd-adapter.ts +0 -869
- package/libs/instance-factories/views/templates/react/adapters/mui-adapter.ts +0 -953
- package/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.ts +0 -806
- package/libs/instance-factories/views/templates/react/app-generator.ts +0 -55
- package/libs/instance-factories/views/templates/react/components-generator.ts +0 -938
- package/libs/instance-factories/views/templates/react/forms-generator.ts +0 -325
- package/libs/instance-factories/views/templates/react/frontend-package-json-generator.ts +0 -57
- package/libs/instance-factories/views/templates/react/hooks-generator.ts +0 -106
- package/libs/instance-factories/views/templates/react/index-css-generator.ts +0 -14
- package/libs/instance-factories/views/templates/react/index-html-generator.ts +0 -34
- package/libs/instance-factories/views/templates/react/main-tsx-generator.ts +0 -29
- package/libs/instance-factories/views/templates/react/react-component-generator.d.ts +0 -152
- package/libs/instance-factories/views/templates/react/react-component-generator.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/react/react-component-generator.js +0 -398
- package/libs/instance-factories/views/templates/react/react-component-generator.js.map +0 -1
- package/libs/instance-factories/views/templates/react/react-component-generator.ts +0 -533
- package/libs/instance-factories/views/templates/react/router-generator.ts +0 -197
- package/libs/instance-factories/views/templates/react/router-generic-generator.ts +0 -132
- package/libs/instance-factories/views/templates/react/shared-utils-generator.ts +0 -196
- package/libs/instance-factories/views/templates/react/spec-json-generator.ts +0 -17
- package/libs/instance-factories/views/templates/react/types-generator.ts +0 -76
- package/libs/instance-factories/views/templates/react/views-metadata-generator.ts +0 -42
- package/libs/instance-factories/views/templates/react/vite-config-generator.ts +0 -38
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js.map +0 -1
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.ts +0 -474
- package/libs/instance-factories/views/templates/shared/__tests__/composite-patterns.test.ts +0 -242
- package/libs/instance-factories/views/templates/shared/adapter-types.d.ts +0 -77
- package/libs/instance-factories/views/templates/shared/adapter-types.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/adapter-types.js +0 -47
- package/libs/instance-factories/views/templates/shared/adapter-types.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/adapter-types.ts +0 -142
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts +0 -63
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.js +0 -822
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.ts +0 -908
- package/libs/instance-factories/views/templates/shared/base-generator.d.ts +0 -247
- package/libs/instance-factories/views/templates/shared/base-generator.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/base-generator.js +0 -363
- package/libs/instance-factories/views/templates/shared/base-generator.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/base-generator.ts +0 -608
- package/libs/instance-factories/views/templates/shared/component-metadata.d.ts +0 -254
- package/libs/instance-factories/views/templates/shared/component-metadata.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/component-metadata.js +0 -602
- package/libs/instance-factories/views/templates/shared/component-metadata.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/component-metadata.ts +0 -803
- package/libs/instance-factories/views/templates/shared/composite-pattern-types.ts +0 -250
- package/libs/instance-factories/views/templates/shared/composite-patterns.ts +0 -535
- package/libs/instance-factories/views/templates/shared/index.ts +0 -68
- package/libs/instance-factories/views/templates/shared/pattern-validator.ts +0 -279
- package/libs/instance-factories/views/templates/shared/property-mapper.d.ts +0 -149
- package/libs/instance-factories/views/templates/shared/property-mapper.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/property-mapper.js +0 -580
- package/libs/instance-factories/views/templates/shared/property-mapper.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/property-mapper.ts +0 -700
- package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts +0 -143
- package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/syntax-mapper.js +0 -420
- package/libs/instance-factories/views/templates/shared/syntax-mapper.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/syntax-mapper.ts +0 -539
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
# CURVED Interface Standard
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
**CURVED** is the standard interface that all SpecVerse business logic controllers must implement. It defines the complete set of operations for managing domain models.
|
|
6
|
+
|
|
7
|
+
## CURVED Operations
|
|
8
|
+
|
|
9
|
+
| Letter | Operation | Description | Required |
|
|
10
|
+
|--------|-----------|-------------|----------|
|
|
11
|
+
| **C** | Create | Create a new entity | Yes |
|
|
12
|
+
| **U** | Update | Update an existing entity | Yes |
|
|
13
|
+
| **R** | Retrieve | Retrieve entity (single + list) | Yes |
|
|
14
|
+
| **V** | Validate | Validate data before operations | Yes |
|
|
15
|
+
| **E** | Evolve | Lifecycle-aware state transitions | Yes |
|
|
16
|
+
| **D** | Delete | Delete an entity | Yes |
|
|
17
|
+
|
|
18
|
+
## TypeScript Interface
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
/**
|
|
22
|
+
* Standard CURVED interface for all service controllers
|
|
23
|
+
* All business logic controllers must implement this interface
|
|
24
|
+
*/
|
|
25
|
+
interface CurvedController<T> {
|
|
26
|
+
// C - Create
|
|
27
|
+
create(data: any): Promise<T>;
|
|
28
|
+
|
|
29
|
+
// U - Update
|
|
30
|
+
update(id: string, data: any): Promise<T>;
|
|
31
|
+
|
|
32
|
+
// R - Retrieve (single)
|
|
33
|
+
retrieve(id: string): Promise<T>;
|
|
34
|
+
|
|
35
|
+
// R - Retrieve (list)
|
|
36
|
+
retrieveAll(options?: RetrieveOptions): Promise<T[]>;
|
|
37
|
+
|
|
38
|
+
// V - Validate
|
|
39
|
+
validate(
|
|
40
|
+
data: any,
|
|
41
|
+
context: { operation: 'create' | 'update' | 'evolve' }
|
|
42
|
+
): ValidationResult;
|
|
43
|
+
|
|
44
|
+
// E - Evolve (lifecycle-aware updates)
|
|
45
|
+
evolve(id: string, data: any): Promise<T>;
|
|
46
|
+
|
|
47
|
+
// D - Delete
|
|
48
|
+
delete(id: string): Promise<void>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface RetrieveOptions {
|
|
52
|
+
skip?: number;
|
|
53
|
+
take?: number;
|
|
54
|
+
where?: Record<string, any>;
|
|
55
|
+
orderBy?: Record<string, 'asc' | 'desc'>;
|
|
56
|
+
include?: string[];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
interface ValidationResult {
|
|
60
|
+
valid: boolean;
|
|
61
|
+
errors: string[];
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Architecture Layers
|
|
66
|
+
|
|
67
|
+
### 1. Controllers (Model-specific)
|
|
68
|
+
- **Must implement**: Full CURVED interface
|
|
69
|
+
- **Examples**: `UserController`, `ProjectController`, `TaskController`
|
|
70
|
+
- **Location**: `src/controllers/`
|
|
71
|
+
- **Generated by**: Service factories (PrismaServices, TypeORMServices, etc.)
|
|
72
|
+
- **Additional**: Can have custom actions beyond CURVED
|
|
73
|
+
|
|
74
|
+
```yaml
|
|
75
|
+
# In SpecVerse spec
|
|
76
|
+
controllers:
|
|
77
|
+
UserController:
|
|
78
|
+
model: User
|
|
79
|
+
curved: # ← CURVED operations
|
|
80
|
+
create: {}
|
|
81
|
+
update: {}
|
|
82
|
+
retrieve: {}
|
|
83
|
+
validate: {}
|
|
84
|
+
evolve: {}
|
|
85
|
+
delete: {}
|
|
86
|
+
actions: # ← Custom actions (beyond CURVED)
|
|
87
|
+
resetPassword: {}
|
|
88
|
+
verifyEmail: {}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 2. Services (Abstract business logic)
|
|
92
|
+
- **Must implement**: Custom operations (NOT CURVED)
|
|
93
|
+
- **Examples**: `NotificationService`, `TaskAssignmentService`
|
|
94
|
+
- **Location**: `src/services/`
|
|
95
|
+
- **Generated by**: Service factories (PrismaServices, etc.)
|
|
96
|
+
- **Operations**: Custom business logic operations
|
|
97
|
+
|
|
98
|
+
```yaml
|
|
99
|
+
# In SpecVerse spec
|
|
100
|
+
services:
|
|
101
|
+
NotificationService:
|
|
102
|
+
operations: # ← Custom operations (NOT CURVED)
|
|
103
|
+
sendWelcomeEmail: {}
|
|
104
|
+
sendPasswordReset: {}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 3. Storage/ORM Layer
|
|
108
|
+
- **Must support**: CURVED primitives
|
|
109
|
+
- **Examples**: Prisma client, TypeORM repositories, Mongoose models
|
|
110
|
+
- **Location**: ORM-specific (e.g., `prisma/schema.prisma`)
|
|
111
|
+
- **Generated by**: ORM factories (PrismaORM, TypeORM, Mongoose)
|
|
112
|
+
- **Provides**: Database access methods that enable CURVED operations
|
|
113
|
+
|
|
114
|
+
## Implementation Requirements
|
|
115
|
+
|
|
116
|
+
### All Service Factories Must:
|
|
117
|
+
|
|
118
|
+
1. **Generate controllers** that implement the full CURVED interface
|
|
119
|
+
2. **Support all CURVED operations** for every model
|
|
120
|
+
3. **Provide consistent signatures** across different ORMs
|
|
121
|
+
4. **Include validation** as part of the CURVED interface
|
|
122
|
+
5. **Support evolve** for lifecycle-aware updates
|
|
123
|
+
|
|
124
|
+
### Example Implementations:
|
|
125
|
+
|
|
126
|
+
#### PrismaServices
|
|
127
|
+
- Uses: `@prisma/client`
|
|
128
|
+
- Controllers: `src/controllers/{Model}Controller.ts`
|
|
129
|
+
- Pattern: Class-based with Prisma client calls
|
|
130
|
+
|
|
131
|
+
#### TypeORMServices (future)
|
|
132
|
+
- Uses: `typeorm` repositories
|
|
133
|
+
- Controllers: `src/controllers/{Model}Controller.ts`
|
|
134
|
+
- Pattern: Class-based with TypeORM repository calls
|
|
135
|
+
|
|
136
|
+
#### MongooseServices (future)
|
|
137
|
+
- Uses: `mongoose` models
|
|
138
|
+
- Controllers: `src/controllers/{Model}Controller.ts`
|
|
139
|
+
- Pattern: Class-based with Mongoose model calls
|
|
140
|
+
|
|
141
|
+
## Data Flow
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
API Layer (Fastify/SOAP/GraphQL)
|
|
145
|
+
↓ calls
|
|
146
|
+
├─→ Controllers (CURVED + actions)
|
|
147
|
+
│ ↓ calls
|
|
148
|
+
│ Storage/ORM (CURVED primitives)
|
|
149
|
+
│ ↓
|
|
150
|
+
│ Database
|
|
151
|
+
│
|
|
152
|
+
└─→ Services (custom operations)
|
|
153
|
+
↓ can call
|
|
154
|
+
├─→ Controllers (CURVED)
|
|
155
|
+
└─→ Storage/ORM (directly)
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Key points:**
|
|
159
|
+
- API layer can call **both** Controllers and Services
|
|
160
|
+
- Services can call Controllers OR ORM directly
|
|
161
|
+
- Controllers always call ORM/Storage layer
|
|
162
|
+
|
|
163
|
+
## Validation in CURVED
|
|
164
|
+
|
|
165
|
+
The **V** (Validate) operation is special:
|
|
166
|
+
|
|
167
|
+
### Internal Validation
|
|
168
|
+
All CURVED operations internally call `validate()` before execution:
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
async create(data: any): Promise<T> {
|
|
172
|
+
// Internal validation
|
|
173
|
+
const validation = this.validate(data, { operation: 'create' });
|
|
174
|
+
if (!validation.valid) {
|
|
175
|
+
throw new Error(`Validation failed: ${validation.errors.join(', ')}`);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Proceed with creation
|
|
179
|
+
return await this.orm.create(data);
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### External Validation
|
|
184
|
+
The validate operation can also be exposed as an API endpoint for dry-run validation:
|
|
185
|
+
|
|
186
|
+
```typescript
|
|
187
|
+
// POST /api/users/validate
|
|
188
|
+
{
|
|
189
|
+
"data": { "email": "invalid", "name": "John" },
|
|
190
|
+
"operation": "create"
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Response
|
|
194
|
+
{
|
|
195
|
+
"valid": false,
|
|
196
|
+
"errors": ["email must be a valid email address"]
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Evolve vs Update
|
|
201
|
+
|
|
202
|
+
### Update
|
|
203
|
+
Standard field updates without lifecycle validation:
|
|
204
|
+
```typescript
|
|
205
|
+
// Update any field
|
|
206
|
+
await userController.update(userId, { name: 'New Name', email: 'new@email.com' });
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Evolve
|
|
210
|
+
Lifecycle-aware state transitions with validation:
|
|
211
|
+
```typescript
|
|
212
|
+
// Evolve through lifecycle states
|
|
213
|
+
await taskController.evolve(taskId, {
|
|
214
|
+
status: 'in_progress' // Must follow lifecycle: todo → in_progress
|
|
215
|
+
});
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Extension Points
|
|
219
|
+
|
|
220
|
+
While CURVED defines the core interface, controllers can extend it with:
|
|
221
|
+
|
|
222
|
+
1. **Custom Actions** - Additional operations specific to the model
|
|
223
|
+
2. **Event Publishing** - Emit events after CURVED operations
|
|
224
|
+
3. **Hooks** - Before/after hooks for operations
|
|
225
|
+
4. **Caching** - Add caching layer for retrieve operations
|
|
226
|
+
5. **Authorization** - Add permission checks before operations
|
|
227
|
+
|
|
228
|
+
## Testing CURVED Implementations
|
|
229
|
+
|
|
230
|
+
All service factories should provide tests verifying:
|
|
231
|
+
|
|
232
|
+
```typescript
|
|
233
|
+
describe('CurvedController', () => {
|
|
234
|
+
it('implements create operation', async () => {
|
|
235
|
+
const result = await controller.create(validData);
|
|
236
|
+
expect(result).toBeDefined();
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
it('implements update operation', async () => {
|
|
240
|
+
const result = await controller.update(id, updateData);
|
|
241
|
+
expect(result).toBeDefined();
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
it('implements retrieve operation', async () => {
|
|
245
|
+
const result = await controller.retrieve(id);
|
|
246
|
+
expect(result).toBeDefined();
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
it('implements retrieveAll operation', async () => {
|
|
250
|
+
const result = await controller.retrieveAll();
|
|
251
|
+
expect(Array.isArray(result)).toBe(true);
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
it('implements validate operation', async () => {
|
|
255
|
+
const result = controller.validate(data, { operation: 'create' });
|
|
256
|
+
expect(result).toHaveProperty('valid');
|
|
257
|
+
expect(result).toHaveProperty('errors');
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
it('implements evolve operation', async () => {
|
|
261
|
+
const result = await controller.evolve(id, evolveData);
|
|
262
|
+
expect(result).toBeDefined();
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
it('implements delete operation', async () => {
|
|
266
|
+
await expect(controller.delete(id)).resolves.not.toThrow();
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
## Summary
|
|
272
|
+
|
|
273
|
+
**CURVED is the universal interface for all SpecVerse business logic controllers:**
|
|
274
|
+
- Ensures consistency across different ORMs (Prisma, TypeORM, Mongoose)
|
|
275
|
+
- Enables protocol-agnostic API layers (REST, SOAP, GraphQL, gRPC)
|
|
276
|
+
- Provides complete lifecycle management (Create, Update, Retrieve, Validate, Evolve, Delete)
|
|
277
|
+
- Separates concerns between Controllers (model-specific) and Services (abstract)
|
|
278
|
+
- Supports extension while maintaining core interface compatibility
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Instance Factories
|
|
2
|
+
|
|
3
|
+
Code generation templates for the realize engine. Each factory category produces a specific kind of output from a SpecVerse specification.
|
|
4
|
+
|
|
5
|
+
## Factory Categories
|
|
6
|
+
|
|
7
|
+
| Category | Templates | Generates |
|
|
8
|
+
|----------|-----------|-----------|
|
|
9
|
+
| [applications](applications/) | generic, react | App scaffolding, React frontend (API client, views, routing, sidebar) |
|
|
10
|
+
| [cli](cli/) | commander | CLI entry point, command files from spec commands |
|
|
11
|
+
| [communication](communication/) | eventemitter | Event bus, publishers, subscribers |
|
|
12
|
+
| [controllers](controllers/) | fastify | Fastify route handlers, server with auto-wired routes |
|
|
13
|
+
| [infrastructure](infrastructure/) | docker-k8s | Dockerfiles, docker-compose, Kubernetes manifests |
|
|
14
|
+
| [orms](orms/) | prisma | Prisma schema from models (relations, types, defaults) |
|
|
15
|
+
| [scaffolding](scaffolding/) | generic | package.json, tsconfig, .env, .gitignore, README |
|
|
16
|
+
| [sdks](sdks/) | python, typescript | Client SDKs for generated APIs |
|
|
17
|
+
| [services](services/) | prisma | CURVED controllers, business logic services, behavior generation |
|
|
18
|
+
| [storage](storage/) | mongodb, postgresql, redis | Database configs, Docker setup |
|
|
19
|
+
| [testing](testing/) | vitest | Test file generation |
|
|
20
|
+
| [tools](tools/) | mcp, vscode | MCP server, VSCode extension (14 commands) |
|
|
21
|
+
| [validation](validation/) | zod | Zod validation schemas from model attributes |
|
|
22
|
+
| [views](views/) | react, shared | React components (list, detail, form, dashboard), adapters |
|
|
23
|
+
| [shared](shared/) | - | Path resolver, reserved words |
|
|
24
|
+
| [archived](archived/) | - | Deprecated factory definitions |
|
|
25
|
+
|
|
26
|
+
## How It Works
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Specification + Manifest
|
|
30
|
+
|
|
|
31
|
+
v
|
|
32
|
+
[Manifest Loader] ---> resolve capabilities to factories
|
|
33
|
+
|
|
|
34
|
+
v
|
|
35
|
+
[Instance Factory Library] ---> find matching factory YAML
|
|
36
|
+
|
|
|
37
|
+
v
|
|
38
|
+
[Code Generator] ---> call template generator function
|
|
39
|
+
|
|
|
40
|
+
v
|
|
41
|
+
Generated source file
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Each factory has:
|
|
45
|
+
1. **YAML definition** — declares capabilities, technology, and template mappings
|
|
46
|
+
2. **Template generators** — TypeScript functions that produce source code from spec context
|
|
47
|
+
|
|
48
|
+
## Template Generator Pattern
|
|
49
|
+
|
|
50
|
+
Every generator is a function that receives spec context and returns source code:
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
export function generate(context: {
|
|
54
|
+
spec: any; // Full SpecVerseAST
|
|
55
|
+
model?: any; // Current model (if model-scoped)
|
|
56
|
+
controller?: any; // Current controller
|
|
57
|
+
models?: any[]; // All models in component
|
|
58
|
+
componentName: string;
|
|
59
|
+
}): { filePath: string; code: string } {
|
|
60
|
+
// Generate and return source code
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Adding a New Factory
|
|
65
|
+
|
|
66
|
+
1. Create a YAML definition in the appropriate category
|
|
67
|
+
2. Write template generator(s) in `templates/{technology}/`
|
|
68
|
+
3. The realize engine discovers factories by scanning this directory
|
|
69
|
+
|
|
70
|
+
## See Also
|
|
71
|
+
|
|
72
|
+
- [Realize Engine README](../../README.md)
|
|
73
|
+
- [Architecture Guide](https://github.com/SpecVerse/specverse-self/blob/main/docs/guides/ARCHITECTURE-GUIDE.md)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Applications Factory
|
|
2
|
+
|
|
3
|
+
Full application scaffolding for backend and frontend entry points.
|
|
4
|
+
|
|
5
|
+
## Definitions
|
|
6
|
+
|
|
7
|
+
| File | Description |
|
|
8
|
+
|------|-------------|
|
|
9
|
+
| `generic-app.yaml` | Backend entry point — adapts to framework choice (defaults to Fastify) |
|
|
10
|
+
| `react-app.yaml` | Complete React SPA with Vite, React Router, and TanStack Query |
|
|
11
|
+
|
|
12
|
+
## Generated Output
|
|
13
|
+
|
|
14
|
+
### Generic Backend (`generic/`)
|
|
15
|
+
|
|
16
|
+
| Generator | Output | Purpose |
|
|
17
|
+
|-----------|--------|---------|
|
|
18
|
+
| `main-generator` | `backend/src/main.ts` | Application entry point (detects framework from manifest) |
|
|
19
|
+
| `backend-package-json-generator` | `backend/package.json` | Backend dependencies and scripts |
|
|
20
|
+
| `backend-tsconfig-generator` | `backend/tsconfig.json` | TypeScript configuration |
|
|
21
|
+
| `backend-env-generator` | `backend/.env` | Environment variables |
|
|
22
|
+
|
|
23
|
+
### React Frontend (`react/`)
|
|
24
|
+
|
|
25
|
+
| Generator | Output | Purpose |
|
|
26
|
+
|-----------|--------|---------|
|
|
27
|
+
| `app-tsx-generator` | `frontend/src/App.tsx` | Root component with sidebar navigation grouped by model |
|
|
28
|
+
| `main-tsx-generator` | `frontend/src/main.tsx` | React DOM render entry |
|
|
29
|
+
| `vite-config-generator` | `frontend/vite.config.ts` | Vite bundler config with API proxy |
|
|
30
|
+
| `package-json-generator` | `frontend/package.json` | Frontend dependencies |
|
|
31
|
+
| `tsconfig-generator` | `frontend/tsconfig.json` | TypeScript config |
|
|
32
|
+
| `index-html-generator` | `frontend/index.html` | HTML shell |
|
|
33
|
+
| `index-css-generator` | `frontend/src/index.css` | Base styles |
|
|
34
|
+
| `api-client-generator` | `frontend/src/lib/apiClient.ts` | HTTP client for backend API |
|
|
35
|
+
| `api-types-generator` | `frontend/src/types/api.ts` | TypeScript types from spec models |
|
|
36
|
+
| `use-api-hooks-generator` | `frontend/src/hooks/useApi.ts` | React Query data-fetching hooks |
|
|
37
|
+
| `view-list-generator` | `frontend/src/components/views/ListView.tsx` | List view component |
|
|
38
|
+
| `view-detail-generator` | `frontend/src/components/views/DetailView.tsx` | Detail view component |
|
|
39
|
+
| `view-form-generator` | `frontend/src/components/views/FormView.tsx` | Form view component |
|
|
40
|
+
| `view-dashboard-generator` | `frontend/src/components/views/DashboardView.tsx` | Dashboard view component |
|
|
41
|
+
| `view-router-generator` | `frontend/src/components/views/StandardViewRouter.tsx` | View routing |
|
|
42
|
+
| `pattern-adapter-generator` | `frontend/src/lib/react-pattern-adapter.tsx` | Pattern adapter for dynamic rendering |
|
|
43
|
+
| `tailwind-adapter-wrapper-generator` | `frontend/src/lib/tailwind-adapter-generator.ts` | Tailwind CSS adapter |
|
|
44
|
+
| `field-helpers-generator` | `frontend/src/utils/field-helpers.ts` | Form field utilities |
|
|
45
|
+
| `relationship-field-generator` | `frontend/src/components/fields/RelationshipField.tsx` | Relationship field component |
|
|
46
|
+
|
|
47
|
+
## Technology
|
|
48
|
+
|
|
49
|
+
- **Backend**: Node.js, TypeScript, Fastify (default)
|
|
50
|
+
- **Frontend**: React 18, Vite 5, React Router 6, TanStack Query 5
|
|
51
|
+
- **Structure**: Monorepo (`backend/` + `frontend/`)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: GenericApp
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
category: application
|
|
4
|
+
description: "Generic application entry point that adapts to framework choice"
|
|
5
|
+
|
|
6
|
+
metadata:
|
|
7
|
+
author: "SpecVerse Team"
|
|
8
|
+
license: "MIT"
|
|
9
|
+
tags: [application, entry-point, generic]
|
|
10
|
+
|
|
11
|
+
compatibility:
|
|
12
|
+
specverse: ">=3.3.0"
|
|
13
|
+
node: ">=18.0.0"
|
|
14
|
+
|
|
15
|
+
capabilities:
|
|
16
|
+
provides:
|
|
17
|
+
- "app.entrypoint"
|
|
18
|
+
- "app.main"
|
|
19
|
+
requires:
|
|
20
|
+
- "api.rest" # Needs HTTP framework
|
|
21
|
+
|
|
22
|
+
technology:
|
|
23
|
+
runtime: "node"
|
|
24
|
+
language: "typescript"
|
|
25
|
+
|
|
26
|
+
codeTemplates:
|
|
27
|
+
main:
|
|
28
|
+
engine: typescript
|
|
29
|
+
generator: "libs/instance-factories/applications/templates/generic/main-generator.ts"
|
|
30
|
+
outputPattern: "{backendDir}/src/main.ts"
|
|
31
|
+
|
|
32
|
+
backendPackageJson:
|
|
33
|
+
engine: typescript
|
|
34
|
+
generator: "libs/instance-factories/applications/templates/generic/backend-package-json-generator.ts"
|
|
35
|
+
outputPattern: "{backendDir}/package.json"
|
|
36
|
+
|
|
37
|
+
backendTsconfig:
|
|
38
|
+
engine: typescript
|
|
39
|
+
generator: "libs/instance-factories/applications/templates/generic/backend-tsconfig-generator.ts"
|
|
40
|
+
outputPattern: "{backendDir}/tsconfig.json"
|
|
41
|
+
|
|
42
|
+
backendEnv:
|
|
43
|
+
engine: typescript
|
|
44
|
+
generator: "libs/instance-factories/applications/templates/generic/backend-env-generator.ts"
|
|
45
|
+
outputPattern: "{backendDir}/.env"
|
|
46
|
+
|
|
47
|
+
configuration:
|
|
48
|
+
outputStructure: "monorepo"
|
|
49
|
+
backendDir: "backend"
|
|
50
|
+
|
|
51
|
+
defaultPort: 3000
|
|
52
|
+
defaultHost: "0.0.0.0"
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: ReactAppRuntime
|
|
2
2
|
version: "1.0.0"
|
|
3
3
|
category: view
|
|
4
|
-
description: "
|
|
4
|
+
description: "Slim React frontend using @specverse/runtime — dev views rendered at runtime, not generated"
|
|
5
5
|
|
|
6
6
|
metadata:
|
|
7
7
|
author: "SpecVerse Team"
|
|
8
8
|
license: "MIT"
|
|
9
|
-
tags: [react, vite, spa, frontend,
|
|
9
|
+
tags: [react, vite, spa, frontend, runtime]
|
|
10
|
+
mode: runtime
|
|
10
11
|
|
|
11
12
|
compatibility:
|
|
12
|
-
specverse: ">=
|
|
13
|
+
specverse: ">=4.0.0"
|
|
13
14
|
node: ">=18.0.0"
|
|
14
15
|
|
|
15
16
|
capabilities:
|
|
@@ -17,15 +18,15 @@ capabilities:
|
|
|
17
18
|
- "app.frontend"
|
|
18
19
|
- "ui.scaffolding"
|
|
19
20
|
- "ui.router"
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
- "ui.runtimeviews"
|
|
22
|
+
requires: []
|
|
22
23
|
|
|
23
24
|
technology:
|
|
24
25
|
runtime: "browser"
|
|
25
26
|
language: "typescript"
|
|
26
27
|
framework: "react"
|
|
27
28
|
bundler: "vite"
|
|
28
|
-
router: "
|
|
29
|
+
router: "@specverse/runtime"
|
|
29
30
|
version: "^18.2.0"
|
|
30
31
|
|
|
31
32
|
dependencies:
|
|
@@ -34,10 +35,10 @@ dependencies:
|
|
|
34
35
|
version: "^18.2.0"
|
|
35
36
|
- name: "react-dom"
|
|
36
37
|
version: "^18.2.0"
|
|
37
|
-
- name: "react-router-dom"
|
|
38
|
-
version: "^6.18.0"
|
|
39
38
|
- name: "@tanstack/react-query"
|
|
40
39
|
version: "^5.0.0"
|
|
40
|
+
- name: "@specverse/runtime"
|
|
41
|
+
version: "^4.1.0"
|
|
41
42
|
|
|
42
43
|
dev:
|
|
43
44
|
- name: "@types/react"
|
|
@@ -52,16 +53,12 @@ dependencies:
|
|
|
52
53
|
version: "^4.2.0"
|
|
53
54
|
|
|
54
55
|
codeTemplates:
|
|
56
|
+
# === Infrastructure (same as static) ===
|
|
55
57
|
index-html:
|
|
56
58
|
engine: typescript
|
|
57
59
|
generator: "libs/instance-factories/applications/templates/react/index-html-generator.ts"
|
|
58
60
|
outputPattern: "{frontendDir}/index.html"
|
|
59
61
|
|
|
60
|
-
app-tsx:
|
|
61
|
-
engine: typescript
|
|
62
|
-
generator: "libs/instance-factories/applications/templates/react/app-tsx-generator.ts"
|
|
63
|
-
outputPattern: "{frontendDir}/src/App.tsx"
|
|
64
|
-
|
|
65
62
|
main-tsx:
|
|
66
63
|
engine: typescript
|
|
67
64
|
generator: "libs/instance-factories/applications/templates/react/main-tsx-generator.ts"
|
|
@@ -79,7 +76,7 @@ codeTemplates:
|
|
|
79
76
|
|
|
80
77
|
package-json:
|
|
81
78
|
engine: typescript
|
|
82
|
-
generator: "libs/instance-factories/applications/templates/react/package-json-generator.ts"
|
|
79
|
+
generator: "libs/instance-factories/applications/templates/react/runtime-package-json-generator.ts"
|
|
83
80
|
outputPattern: "{frontendDir}/package.json"
|
|
84
81
|
|
|
85
82
|
index-css:
|
|
@@ -97,56 +94,12 @@ codeTemplates:
|
|
|
97
94
|
generator: "libs/instance-factories/applications/templates/react/env-example-generator.ts"
|
|
98
95
|
outputPattern: "{frontendDir}/.env.example"
|
|
99
96
|
|
|
97
|
+
# === Instance-specific wiring (still generated per project) ===
|
|
100
98
|
api-client:
|
|
101
99
|
engine: typescript
|
|
102
100
|
generator: "libs/instance-factories/applications/templates/react/api-client-generator.ts"
|
|
103
101
|
outputPattern: "{frontendDir}/src/lib/apiClient.ts"
|
|
104
102
|
|
|
105
|
-
pattern-adapter:
|
|
106
|
-
engine: typescript
|
|
107
|
-
generator: "libs/instance-factories/applications/templates/react/pattern-adapter-generator.ts"
|
|
108
|
-
outputPattern: "{frontendDir}/src/lib/react-pattern-adapter.tsx"
|
|
109
|
-
|
|
110
|
-
tailwind-adapter:
|
|
111
|
-
engine: typescript
|
|
112
|
-
generator: "libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.ts"
|
|
113
|
-
outputPattern: "{frontendDir}/src/lib/tailwind-adapter-generator.ts"
|
|
114
|
-
|
|
115
|
-
view-form:
|
|
116
|
-
engine: typescript
|
|
117
|
-
generator: "libs/instance-factories/applications/templates/react/view-form-generator.ts"
|
|
118
|
-
outputPattern: "{frontendDir}/src/components/views/FormView.tsx"
|
|
119
|
-
|
|
120
|
-
view-list:
|
|
121
|
-
engine: typescript
|
|
122
|
-
generator: "libs/instance-factories/applications/templates/react/view-list-generator.ts"
|
|
123
|
-
outputPattern: "{frontendDir}/src/components/views/ListView.tsx"
|
|
124
|
-
|
|
125
|
-
view-detail:
|
|
126
|
-
engine: typescript
|
|
127
|
-
generator: "libs/instance-factories/applications/templates/react/view-detail-generator.ts"
|
|
128
|
-
outputPattern: "{frontendDir}/src/components/views/DetailView.tsx"
|
|
129
|
-
|
|
130
|
-
view-dashboard:
|
|
131
|
-
engine: typescript
|
|
132
|
-
generator: "libs/instance-factories/applications/templates/react/view-dashboard-generator.ts"
|
|
133
|
-
outputPattern: "{frontendDir}/src/components/views/DashboardView.tsx"
|
|
134
|
-
|
|
135
|
-
view-router:
|
|
136
|
-
engine: typescript
|
|
137
|
-
generator: "libs/instance-factories/applications/templates/react/view-router-generator.ts"
|
|
138
|
-
outputPattern: "{frontendDir}/src/components/views/StandardViewRouter.tsx"
|
|
139
|
-
|
|
140
|
-
field-helpers:
|
|
141
|
-
engine: typescript
|
|
142
|
-
generator: "libs/instance-factories/applications/templates/react/field-helpers-generator.ts"
|
|
143
|
-
outputPattern: "{frontendDir}/src/utils/field-helpers.ts"
|
|
144
|
-
|
|
145
|
-
relationship-field:
|
|
146
|
-
engine: typescript
|
|
147
|
-
generator: "libs/instance-factories/applications/templates/react/relationship-field-generator.ts"
|
|
148
|
-
outputPattern: "{frontendDir}/src/components/fields/RelationshipField.tsx"
|
|
149
|
-
|
|
150
103
|
use-api-hooks:
|
|
151
104
|
engine: typescript
|
|
152
105
|
generator: "libs/instance-factories/applications/templates/react/use-api-hooks-generator.ts"
|
|
@@ -157,6 +110,23 @@ codeTemplates:
|
|
|
157
110
|
generator: "libs/instance-factories/applications/templates/react/api-types-generator.ts"
|
|
158
111
|
outputPattern: "{frontendDir}/src/types/api.ts"
|
|
159
112
|
|
|
113
|
+
# === Runtime App (NEW — imports from @specverse/runtime) ===
|
|
114
|
+
app-tsx:
|
|
115
|
+
engine: typescript
|
|
116
|
+
generator: "libs/instance-factories/applications/templates/react/runtime-app-tsx-generator.ts"
|
|
117
|
+
outputPattern: "{frontendDir}/src/App.tsx"
|
|
118
|
+
|
|
119
|
+
# === Removed from runtime mode (now in @specverse/runtime) ===
|
|
120
|
+
# view-form — FormView from @specverse/runtime
|
|
121
|
+
# view-list — RuntimeView from @specverse/runtime
|
|
122
|
+
# view-detail — RuntimeView from @specverse/runtime
|
|
123
|
+
# view-dashboard — RuntimeView from @specverse/runtime
|
|
124
|
+
# view-router — ViewRouter from @specverse/runtime
|
|
125
|
+
# pattern-adapter — ReactPatternAdapter from @specverse/runtime
|
|
126
|
+
# tailwind-adapter — TailwindAdapter from @specverse/runtime
|
|
127
|
+
# field-helpers — fieldClassification from @specverse/runtime
|
|
128
|
+
# relationship-field — RelationshipField from @specverse/runtime
|
|
129
|
+
|
|
160
130
|
configuration:
|
|
161
131
|
projectStructure: "monorepo"
|
|
162
132
|
frontendDir: "frontend"
|
|
@@ -167,20 +137,3 @@ configuration:
|
|
|
167
137
|
host: "localhost"
|
|
168
138
|
proxy:
|
|
169
139
|
"/api": "http://localhost:3000"
|
|
170
|
-
|
|
171
|
-
routing:
|
|
172
|
-
library: "react-router"
|
|
173
|
-
version: "^6.18.0"
|
|
174
|
-
basename: "/"
|
|
175
|
-
|
|
176
|
-
requirements:
|
|
177
|
-
dependencies:
|
|
178
|
-
npm:
|
|
179
|
-
devDependencies:
|
|
180
|
-
"@vitejs/plugin-react": "^4.2.0"
|
|
181
|
-
"vite": "^5.0.0"
|
|
182
|
-
|
|
183
|
-
scripts:
|
|
184
|
-
"dev:frontend": "cd frontend && vite"
|
|
185
|
-
"build:frontend": "cd frontend && vite build"
|
|
186
|
-
"preview:frontend": "cd frontend && vite preview"
|