@hexagen-monaco/sync 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +33 -0
- package/README.md +181 -0
- package/dist/application/index.d.ts +3 -0
- package/dist/application/index.d.ts.map +1 -0
- package/dist/application/ports/index.d.ts +2 -0
- package/dist/application/ports/index.d.ts.map +1 -0
- package/dist/application/ports/out/architecture-graph-provider.port.d.ts +6 -0
- package/dist/application/ports/out/architecture-graph-provider.port.d.ts.map +1 -0
- package/dist/application/ports/out/file-system.port.d.ts +22 -0
- package/dist/application/ports/out/file-system.port.d.ts.map +1 -0
- package/dist/application/ports/out/generator-config.port.d.ts +51 -0
- package/dist/application/ports/out/generator-config.port.d.ts.map +1 -0
- package/dist/application/ports/out/index.d.ts +9 -0
- package/dist/application/ports/out/index.d.ts.map +1 -0
- package/dist/application/ports/out/linter-report-provider.port.d.ts +6 -0
- package/dist/application/ports/out/linter-report-provider.port.d.ts.map +1 -0
- package/dist/application/ports/out/ownership-registry.port.d.ts +35 -0
- package/dist/application/ports/out/ownership-registry.port.d.ts.map +1 -0
- package/dist/application/ports/out/project-configuration-read.port.d.ts +9 -0
- package/dist/application/ports/out/project-configuration-read.port.d.ts.map +1 -0
- package/dist/application/ports/out/symbol-reference-provider.port.d.ts +10 -0
- package/dist/application/ports/out/symbol-reference-provider.port.d.ts.map +1 -0
- package/dist/application/ports/out/workspace-file-provider.port.d.ts +14 -0
- package/dist/application/ports/out/workspace-file-provider.port.d.ts.map +1 -0
- package/dist/application/use-cases/get-architecture-graph.use-case.d.ts +8 -0
- package/dist/application/use-cases/get-architecture-graph.use-case.d.ts.map +1 -0
- package/dist/application/use-cases/get-linter-report.use-case.d.ts +8 -0
- package/dist/application/use-cases/get-linter-report.use-case.d.ts.map +1 -0
- package/dist/application/use-cases/get-manifest-resource.use-case.d.ts +8 -0
- package/dist/application/use-cases/get-manifest-resource.use-case.d.ts.map +1 -0
- package/dist/application/use-cases/index.d.ts +4 -0
- package/dist/application/use-cases/index.d.ts.map +1 -0
- package/dist/application/use-cases/refactoring-impact.use-case.d.ts +29 -0
- package/dist/application/use-cases/refactoring-impact.use-case.d.ts.map +1 -0
- package/dist/application/use-cases/stub-generation.use-case.d.ts +23 -0
- package/dist/application/use-cases/stub-generation.use-case.d.ts.map +1 -0
- package/dist/arch-linter-bin.d.ts +20 -0
- package/dist/arch-linter-bin.d.ts.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +12149 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/add/index.d.ts +8 -0
- package/dist/commands/add/index.d.ts.map +1 -0
- package/dist/commands/add/validate.d.ts +2 -0
- package/dist/commands/add/validate.d.ts.map +1 -0
- package/dist/commands/arch/add.d.ts +3 -0
- package/dist/commands/arch/add.d.ts.map +1 -0
- package/dist/commands/arch/context/command.d.ts +4 -0
- package/dist/commands/arch/context/command.d.ts.map +1 -0
- package/dist/commands/arch/context/persistence.d.ts +22 -0
- package/dist/commands/arch/context/persistence.d.ts.map +1 -0
- package/dist/commands/arch/context/wizard.d.ts +7 -0
- package/dist/commands/arch/context/wizard.d.ts.map +1 -0
- package/dist/commands/arch/diff.d.ts +3 -0
- package/dist/commands/arch/diff.d.ts.map +1 -0
- package/dist/commands/arch/edit.d.ts +9 -0
- package/dist/commands/arch/edit.d.ts.map +1 -0
- package/dist/commands/arch/index.d.ts +3 -0
- package/dist/commands/arch/index.d.ts.map +1 -0
- package/dist/commands/arch/list.d.ts +2 -0
- package/dist/commands/arch/list.d.ts.map +1 -0
- package/dist/commands/arch/port/persistence.d.ts +28 -0
- package/dist/commands/arch/port/persistence.d.ts.map +1 -0
- package/dist/commands/arch/port.d.ts +4 -0
- package/dist/commands/arch/port.d.ts.map +1 -0
- package/dist/commands/arch/refactor-rename-entity.d.ts +3 -0
- package/dist/commands/arch/refactor-rename-entity.d.ts.map +1 -0
- package/dist/commands/arch/refactor-rename-port.d.ts +3 -0
- package/dist/commands/arch/refactor-rename-port.d.ts.map +1 -0
- package/dist/commands/arch/refactor-rename-use-case.d.ts +3 -0
- package/dist/commands/arch/refactor-rename-use-case.d.ts.map +1 -0
- package/dist/commands/arch/refactor-shared.d.ts +11 -0
- package/dist/commands/arch/refactor-shared.d.ts.map +1 -0
- package/dist/commands/arch/refactor.d.ts +3 -0
- package/dist/commands/arch/refactor.d.ts.map +1 -0
- package/dist/commands/arch/remove/context.d.ts +7 -0
- package/dist/commands/arch/remove/context.d.ts.map +1 -0
- package/dist/commands/arch/remove/port.d.ts +7 -0
- package/dist/commands/arch/remove/port.d.ts.map +1 -0
- package/dist/commands/arch/remove.d.ts +3 -0
- package/dist/commands/arch/remove.d.ts.map +1 -0
- package/dist/commands/arch/validate.d.ts +2 -0
- package/dist/commands/arch/validate.d.ts.map +1 -0
- package/dist/commands/manifest/index.d.ts +3 -0
- package/dist/commands/manifest/index.d.ts.map +1 -0
- package/dist/commands/manifest/split-utils.d.ts +8 -0
- package/dist/commands/manifest/split-utils.d.ts.map +1 -0
- package/dist/commands/manifest/split.d.ts +3 -0
- package/dist/commands/manifest/split.d.ts.map +1 -0
- package/dist/commands/shared/confirm.d.ts +5 -0
- package/dist/commands/shared/confirm.d.ts.map +1 -0
- package/dist/commands/shared/error-formatter.d.ts +7 -0
- package/dist/commands/shared/error-formatter.d.ts.map +1 -0
- package/dist/commands/shared/index.d.ts +15 -0
- package/dist/commands/shared/index.d.ts.map +1 -0
- package/dist/commands/shared/project-root.d.ts +3 -0
- package/dist/commands/shared/project-root.d.ts.map +1 -0
- package/dist/commands/shared/prompt-service.d.ts +15 -0
- package/dist/commands/shared/prompt-service.d.ts.map +1 -0
- package/dist/commands/shared/spinner.d.ts +13 -0
- package/dist/commands/shared/spinner.d.ts.map +1 -0
- package/dist/commands/shared/template-engine-path.d.ts +12 -0
- package/dist/commands/shared/template-engine-path.d.ts.map +1 -0
- package/dist/commands/shared/validation.d.ts +15 -0
- package/dist/commands/shared/validation.d.ts.map +1 -0
- package/dist/commands/shared/yaml-service.d.ts +23 -0
- package/dist/commands/shared/yaml-service.d.ts.map +1 -0
- package/dist/commands/templates/index.d.ts +3 -0
- package/dist/commands/templates/index.d.ts.map +1 -0
- package/dist/commands/templates/info.d.ts +2 -0
- package/dist/commands/templates/info.d.ts.map +1 -0
- package/dist/commands/templates/list.d.ts +2 -0
- package/dist/commands/templates/list.d.ts.map +1 -0
- package/dist/config/barrel-exclusions.d.ts +10 -0
- package/dist/config/barrel-exclusions.d.ts.map +1 -0
- package/dist/config.d.ts +19 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/domain/index.d.ts +5 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/result.d.ts +4 -0
- package/dist/domain/result.d.ts.map +1 -0
- package/dist/domain/services/architectural-boundary-checker.d.ts +18 -0
- package/dist/domain/services/architectural-boundary-checker.d.ts.map +1 -0
- package/dist/domain/services/emission-plan-builder.d.ts +17 -0
- package/dist/domain/services/emission-plan-builder.d.ts.map +1 -0
- package/dist/domain/services/impact-analysis.types.d.ts +24 -0
- package/dist/domain/services/impact-analysis.types.d.ts.map +1 -0
- package/dist/domain/services/impact-request-validator.d.ts +14 -0
- package/dist/domain/services/impact-request-validator.d.ts.map +1 -0
- package/dist/domain/services/index.d.ts +7 -0
- package/dist/domain/services/index.d.ts.map +1 -0
- package/dist/domain/services/layer-classifier.d.ts +4 -0
- package/dist/domain/services/layer-classifier.d.ts.map +1 -0
- package/dist/domain/services/stub-template-resolver.d.ts +16 -0
- package/dist/domain/services/stub-template-resolver.d.ts.map +1 -0
- package/dist/domain/session.d.ts +6 -0
- package/dist/domain/session.d.ts.map +1 -0
- package/dist/domain/stub-templates.d.ts +8 -0
- package/dist/domain/stub-templates.d.ts.map +1 -0
- package/dist/domain/types.d.ts +4 -0
- package/dist/domain/types.d.ts.map +1 -0
- package/dist/fs-utils.d.ts +28 -0
- package/dist/fs-utils.d.ts.map +1 -0
- package/dist/generators/apps-framework-templates.d.ts +4 -0
- package/dist/generators/apps-framework-templates.d.ts.map +1 -0
- package/dist/generators/apps.d.ts +5 -0
- package/dist/generators/apps.d.ts.map +1 -0
- package/dist/generators/architecture-file-templates.d.ts +9 -0
- package/dist/generators/architecture-file-templates.d.ts.map +1 -0
- package/dist/generators/architecture-files.d.ts +5 -0
- package/dist/generators/architecture-files.d.ts.map +1 -0
- package/dist/generators/barrels/index.d.ts +6 -0
- package/dist/generators/barrels/index.d.ts.map +1 -0
- package/dist/generators/barrels/recursive.d.ts +44 -0
- package/dist/generators/barrels/recursive.d.ts.map +1 -0
- package/dist/generators/barrels/utils.d.ts +56 -0
- package/dist/generators/barrels/utils.d.ts.map +1 -0
- package/dist/generators/barrels.d.ts +31 -0
- package/dist/generators/barrels.d.ts.map +1 -0
- package/dist/generators/eslint.d.ts +47 -0
- package/dist/generators/eslint.d.ts.map +1 -0
- package/dist/generators/layer-folders.d.ts +16 -0
- package/dist/generators/layer-folders.d.ts.map +1 -0
- package/dist/generators/migration-assistant.d.ts +7 -0
- package/dist/generators/migration-assistant.d.ts.map +1 -0
- package/dist/generators/migration-audit.d.ts +28 -0
- package/dist/generators/migration-audit.d.ts.map +1 -0
- package/dist/generators/migration-stubs.d.ts +7 -0
- package/dist/generators/migration-stubs.d.ts.map +1 -0
- package/dist/generators/package-json.d.ts +11 -0
- package/dist/generators/package-json.d.ts.map +1 -0
- package/dist/generators/port-analyzer.d.ts +56 -0
- package/dist/generators/port-analyzer.d.ts.map +1 -0
- package/dist/generators/reap.d.ts +11 -0
- package/dist/generators/reap.d.ts.map +1 -0
- package/dist/generators/root-file-templates.d.ts +8 -0
- package/dist/generators/root-file-templates.d.ts.map +1 -0
- package/dist/generators/root-files.d.ts +5 -0
- package/dist/generators/root-files.d.ts.map +1 -0
- package/dist/generators/stubs/index.d.ts +4 -0
- package/dist/generators/stubs/index.d.ts.map +1 -0
- package/dist/generators/stubs/stub-templates.d.ts +3 -0
- package/dist/generators/stubs/stub-templates.d.ts.map +1 -0
- package/dist/generators/stubs.d.ts +5 -0
- package/dist/generators/stubs.d.ts.map +1 -0
- package/dist/generators/test-generator.d.ts +7 -0
- package/dist/generators/test-generator.d.ts.map +1 -0
- package/dist/generators/test-templates/data-builder.d.ts +2 -0
- package/dist/generators/test-templates/data-builder.d.ts.map +1 -0
- package/dist/generators/test-templates/enhanced-test-double.d.ts +2 -0
- package/dist/generators/test-templates/enhanced-test-double.d.ts.map +1 -0
- package/dist/generators/test-templates/index.d.ts +5 -0
- package/dist/generators/test-templates/index.d.ts.map +1 -0
- package/dist/generators/test-templates/integration-test.d.ts +2 -0
- package/dist/generators/test-templates/integration-test.d.ts.map +1 -0
- package/dist/generators/test-templates/unit-test.d.ts +2 -0
- package/dist/generators/test-templates/unit-test.d.ts.map +1 -0
- package/dist/generators/tsconfig.d.ts +16 -0
- package/dist/generators/tsconfig.d.ts.map +1 -0
- package/dist/generators/validators/index.d.ts +11 -0
- package/dist/generators/validators/index.d.ts.map +1 -0
- package/dist/generators/validators/validate-dependencies.d.ts +7 -0
- package/dist/generators/validators/validate-dependencies.d.ts.map +1 -0
- package/dist/generators/validators/validate-manifest-sync.d.ts +5 -0
- package/dist/generators/validators/validate-manifest-sync.d.ts.map +1 -0
- package/dist/generators/validators/validate-port-adapter.d.ts +5 -0
- package/dist/generators/validators/validate-port-adapter.d.ts.map +1 -0
- package/dist/generators/validators/validation-types.d.ts +20 -0
- package/dist/generators/validators/validation-types.d.ts.map +1 -0
- package/dist/generators/validators.d.ts +7 -0
- package/dist/generators/validators.d.ts.map +1 -0
- package/dist/generators/wiring.d.ts +20 -0
- package/dist/generators/wiring.d.ts.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8070 -0
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/adapters/atomic-file-system.adapter.d.ts +13 -0
- package/dist/infrastructure/adapters/atomic-file-system.adapter.d.ts.map +1 -0
- package/dist/infrastructure/adapters/file-system-workspace.adapter.d.ts +12 -0
- package/dist/infrastructure/adapters/file-system-workspace.adapter.d.ts.map +1 -0
- package/dist/infrastructure/adapters/in-memory-config-double.d.ts +30 -0
- package/dist/infrastructure/adapters/in-memory-config-double.d.ts.map +1 -0
- package/dist/infrastructure/adapters/index.d.ts +5 -0
- package/dist/infrastructure/adapters/index.d.ts.map +1 -0
- package/dist/infrastructure/adapters/yaml-config.adapter.d.ts +38 -0
- package/dist/infrastructure/adapters/yaml-config.adapter.d.ts.map +1 -0
- package/dist/infrastructure/index.d.ts +2 -0
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/linter.d.ts +7 -0
- package/dist/linter.d.ts.map +1 -0
- package/dist/loaders/index.d.ts +2 -0
- package/dist/loaders/index.d.ts.map +1 -0
- package/dist/loaders/manifest-merge-loader.d.ts +3 -0
- package/dist/loaders/manifest-merge-loader.d.ts.map +1 -0
- package/dist/lock.d.ts +14 -0
- package/dist/lock.d.ts.map +1 -0
- package/dist/manifest-service.d.ts +10 -0
- package/dist/manifest-service.d.ts.map +1 -0
- package/dist/migration-report.d.ts +12 -0
- package/dist/migration-report.d.ts.map +1 -0
- package/dist/preflight.d.ts +7 -0
- package/dist/preflight.d.ts.map +1 -0
- package/dist/refactoring/git-operations.d.ts +9 -0
- package/dist/refactoring/git-operations.d.ts.map +1 -0
- package/dist/refactoring/impact-analyzer.d.ts +23 -0
- package/dist/refactoring/impact-analyzer.d.ts.map +1 -0
- package/dist/refactoring/index.d.ts +6 -0
- package/dist/refactoring/index.d.ts.map +1 -0
- package/dist/refactoring/refactoring-engine.d.ts +40 -0
- package/dist/refactoring/refactoring-engine.d.ts.map +1 -0
- package/dist/refactoring/refactoring-patterns/base-pattern.d.ts +37 -0
- package/dist/refactoring/refactoring-patterns/base-pattern.d.ts.map +1 -0
- package/dist/refactoring/refactoring-patterns/index.d.ts +5 -0
- package/dist/refactoring/refactoring-patterns/index.d.ts.map +1 -0
- package/dist/refactoring/refactoring-patterns/refactoring-utils.d.ts +8 -0
- package/dist/refactoring/refactoring-patterns/refactoring-utils.d.ts.map +1 -0
- package/dist/refactoring/refactoring-patterns/rename-entity.pattern.d.ts +19 -0
- package/dist/refactoring/refactoring-patterns/rename-entity.pattern.d.ts.map +1 -0
- package/dist/refactoring/refactoring-patterns/rename-port.pattern.d.ts +42 -0
- package/dist/refactoring/refactoring-patterns/rename-port.pattern.d.ts.map +1 -0
- package/dist/refactoring/refactoring-patterns/rename-use-case.pattern.d.ts +40 -0
- package/dist/refactoring/refactoring-patterns/rename-use-case.pattern.d.ts.map +1 -0
- package/dist/refactoring/safe-refactoring-orchestrator.d.ts +24 -0
- package/dist/refactoring/safe-refactoring-orchestrator.d.ts.map +1 -0
- package/dist/refactoring/validation-suite.d.ts +20 -0
- package/dist/refactoring/validation-suite.d.ts.map +1 -0
- package/dist/results.d.ts +16 -0
- package/dist/results.d.ts.map +1 -0
- package/dist/sync-engine-helpers.d.ts +15 -0
- package/dist/sync-engine-helpers.d.ts.map +1 -0
- package/dist/sync-engine-init.d.ts +12 -0
- package/dist/sync-engine-init.d.ts.map +1 -0
- package/dist/sync-engine.d.ts +21 -0
- package/dist/sync-engine.d.ts.map +1 -0
- package/dist/template-engine.d.ts +3 -0
- package/dist/template-engine.d.ts.map +1 -0
- package/dist/templates/__example__/files/example-output.txt +9 -0
- package/dist/templates/__example__/manifest.json +44 -0
- package/dist/templates/adobe-creative-production/README.md +89 -0
- package/dist/templates/adobe-creative-production/files/.env.adobe-creative-production.example +6 -0
- package/dist/templates/adobe-creative-production/files/src/domain/ports/out/creative-production.port.ts +62 -0
- package/dist/templates/adobe-creative-production/files/src/infrastructure/adobe/creative-production/creative-production.adapter.ts +144 -0
- package/dist/templates/adobe-creative-production/manifest.json +25 -0
- package/dist/templates/adobe-express/README.md +85 -0
- package/dist/templates/adobe-express/files/.env.adobe-express.example +7 -0
- package/dist/templates/adobe-express/files/src/domain/ports/out/express.port.ts +47 -0
- package/dist/templates/adobe-express/files/src/infrastructure/adobe/express/express.adapter.ts +155 -0
- package/dist/templates/adobe-express/manifest.json +32 -0
- package/dist/templates/adobe-firefly-composite/README.md +75 -0
- package/dist/templates/adobe-firefly-composite/files/.env.adobe-composite.example +5 -0
- package/dist/templates/adobe-firefly-composite/files/src/domain/ports/out/composite.port.ts +39 -0
- package/dist/templates/adobe-firefly-composite/files/src/infrastructure/adobe/composite/composite.adapter.ts +102 -0
- package/dist/templates/adobe-firefly-composite/manifest.json +32 -0
- package/dist/templates/adobe-firefly-content-tagging/README.md +70 -0
- package/dist/templates/adobe-firefly-content-tagging/files/.env.adobe-content-tagging.example +4 -0
- package/dist/templates/adobe-firefly-content-tagging/files/src/domain/ports/out/content-tagging.port.ts +28 -0
- package/dist/templates/adobe-firefly-content-tagging/files/src/infrastructure/adobe/content-tagging/content-tagging.adapter.ts +120 -0
- package/dist/templates/adobe-firefly-content-tagging/manifest.json +31 -0
- package/dist/templates/adobe-firefly-core/README.md +147 -0
- package/dist/templates/adobe-firefly-core/files/.env.adobe.example +15 -0
- package/dist/templates/adobe-firefly-core/files/src/domain/ports/out/firefly-auth.port.ts +11 -0
- package/dist/templates/adobe-firefly-core/files/src/domain/ports/out/firefly-job.port.ts +50 -0
- package/dist/templates/adobe-firefly-core/files/src/domain/ports/out/firefly-storage.port.ts +20 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/auth/ims-token-provider.adapter.ts +112 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/auth/smoke-token.ts +17 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/errors/firefly-errors.ts +91 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/http/firefly-client.ts +135 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/index.ts +46 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/jobs/job-poller.ts +52 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/jobs/job-port.ts +149 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/jobs/job-result.ts +113 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/jobs/webhook-verifier.ts +67 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/storage/passthrough-storage.adapter.ts +36 -0
- package/dist/templates/adobe-firefly-core/manifest.json +86 -0
- package/dist/templates/adobe-firefly-custom-models/README.md +96 -0
- package/dist/templates/adobe-firefly-custom-models/files/.env.adobe-custom-models.example +6 -0
- package/dist/templates/adobe-firefly-custom-models/files/src/domain/ports/out/custom-model.port.ts +77 -0
- package/dist/templates/adobe-firefly-custom-models/files/src/infrastructure/adobe/custom-models/firefly-custom-model.adapter.ts +199 -0
- package/dist/templates/adobe-firefly-custom-models/manifest.json +33 -0
- package/dist/templates/adobe-firefly-generate/README.md +86 -0
- package/dist/templates/adobe-firefly-generate/files/.env.adobe-generate.example +5 -0
- package/dist/templates/adobe-firefly-generate/files/src/domain/ports/out/image-generation.port.ts +61 -0
- package/dist/templates/adobe-firefly-generate/files/src/infrastructure/adobe/generate/firefly-generate.adapter.ts +167 -0
- package/dist/templates/adobe-firefly-generate/manifest.json +45 -0
- package/dist/templates/adobe-firefly-media/README.md +99 -0
- package/dist/templates/adobe-firefly-media/files/.env.adobe-media.example +8 -0
- package/dist/templates/adobe-firefly-media/files/src/domain/ports/out/media-generation.port.ts +80 -0
- package/dist/templates/adobe-firefly-media/files/src/infrastructure/adobe/media/firefly-media.adapter.ts +161 -0
- package/dist/templates/adobe-firefly-media/manifest.json +32 -0
- package/dist/templates/adobe-firefly-storage-azure/README.md +88 -0
- package/dist/templates/adobe-firefly-storage-azure/files/.env.adobe-storage-azure.example +9 -0
- package/dist/templates/adobe-firefly-storage-azure/files/src/infrastructure/adobe/storage/azure-blob-presign.adapter.ts +171 -0
- package/dist/templates/adobe-firefly-storage-azure/files/src/infrastructure/adobe/storage/azure-register.ts +15 -0
- package/dist/templates/adobe-firefly-storage-azure/manifest.json +37 -0
- package/dist/templates/adobe-firefly-storage-gcs/README.md +85 -0
- package/dist/templates/adobe-firefly-storage-gcs/files/.env.adobe-storage-gcs.example +8 -0
- package/dist/templates/adobe-firefly-storage-gcs/files/src/infrastructure/adobe/storage/gcs-presign.adapter.ts +100 -0
- package/dist/templates/adobe-firefly-storage-gcs/files/src/infrastructure/adobe/storage/gcs-register.ts +15 -0
- package/dist/templates/adobe-firefly-storage-gcs/manifest.json +33 -0
- package/dist/templates/adobe-firefly-storage-s3/README.md +76 -0
- package/dist/templates/adobe-firefly-storage-s3/files/.env.adobe-storage-s3.example +8 -0
- package/dist/templates/adobe-firefly-storage-s3/files/src/infrastructure/adobe/storage/s3-presign.adapter.ts +109 -0
- package/dist/templates/adobe-firefly-storage-s3/files/src/infrastructure/adobe/storage/s3-register.ts +15 -0
- package/dist/templates/adobe-firefly-storage-s3/manifest.json +31 -0
- package/dist/templates/adobe-firefly-upscale/README.md +68 -0
- package/dist/templates/adobe-firefly-upscale/files/.env.adobe-upscale.example +3 -0
- package/dist/templates/adobe-firefly-upscale/files/src/domain/ports/out/upscale.port.ts +25 -0
- package/dist/templates/adobe-firefly-upscale/files/src/infrastructure/adobe/upscale/upscale.adapter.ts +85 -0
- package/dist/templates/adobe-firefly-upscale/manifest.json +30 -0
- package/dist/templates/adobe-illustrator/README.md +80 -0
- package/dist/templates/adobe-illustrator/files/.env.adobe-illustrator.example +7 -0
- package/dist/templates/adobe-illustrator/files/src/domain/ports/out/illustrator.port.ts +51 -0
- package/dist/templates/adobe-illustrator/files/src/infrastructure/adobe/illustrator/illustrator.adapter.ts +167 -0
- package/dist/templates/adobe-illustrator/manifest.json +38 -0
- package/dist/templates/adobe-ims-spa/README.md +99 -0
- package/dist/templates/adobe-ims-spa/files/.env.adobe-ims.example +12 -0
- package/dist/templates/adobe-ims-spa/files/app/api/auth/callback/route.ts +84 -0
- package/dist/templates/adobe-ims-spa/files/app/api/auth/login/route.ts +30 -0
- package/dist/templates/adobe-ims-spa/files/app/api/auth/logout/route.ts +24 -0
- package/dist/templates/adobe-ims-spa/files/app/api/auth/me/route.ts +18 -0
- package/dist/templates/adobe-ims-spa/files/middleware.ts +74 -0
- package/dist/templates/adobe-ims-spa/files/src/domain/ports/out/ims-auth.port.ts +24 -0
- package/dist/templates/adobe-ims-spa/files/src/infrastructure/auth/adobe-ims/adobe-ims-auth.adapter.ts +71 -0
- package/dist/templates/adobe-ims-spa/files/src/infrastructure/auth/adobe-ims/config.ts +34 -0
- package/dist/templates/adobe-ims-spa/files/src/infrastructure/auth/adobe-ims/ims-client.ts +85 -0
- package/dist/templates/adobe-ims-spa/files/src/infrastructure/auth/adobe-ims/pkce.ts +37 -0
- package/dist/templates/adobe-ims-spa/files/src/infrastructure/auth/adobe-ims/token-store.ts +54 -0
- package/dist/templates/adobe-ims-spa/files/src/infrastructure/auth/adobe-ims/user-profile-mapper.ts +12 -0
- package/dist/templates/adobe-ims-spa/files/src/lib/auth/get-current-user.ts +56 -0
- package/dist/templates/adobe-ims-spa/files/src/lib/auth/require-auth.ts +11 -0
- package/dist/templates/adobe-ims-spa/manifest.json +88 -0
- package/dist/templates/adobe-indesign/README.md +76 -0
- package/dist/templates/adobe-indesign/files/.env.adobe-indesign.example +7 -0
- package/dist/templates/adobe-indesign/files/src/domain/ports/out/indesign.port.ts +43 -0
- package/dist/templates/adobe-indesign/files/src/infrastructure/adobe/indesign/indesign.adapter.ts +160 -0
- package/dist/templates/adobe-indesign/manifest.json +38 -0
- package/dist/templates/adobe-lightroom/README.md +81 -0
- package/dist/templates/adobe-lightroom/files/.env.adobe-lightroom.example +7 -0
- package/dist/templates/adobe-lightroom/files/src/domain/ports/out/lightroom.port.ts +36 -0
- package/dist/templates/adobe-lightroom/files/src/infrastructure/adobe/lightroom/lightroom.adapter.ts +145 -0
- package/dist/templates/adobe-lightroom/manifest.json +39 -0
- package/dist/templates/adobe-photoshop/README.md +87 -0
- package/dist/templates/adobe-photoshop/files/.env.adobe-photoshop.example +7 -0
- package/dist/templates/adobe-photoshop/files/src/domain/ports/out/photoshop-automation.port.ts +60 -0
- package/dist/templates/adobe-photoshop/files/src/infrastructure/adobe/photoshop/photoshop-automation.adapter.ts +180 -0
- package/dist/templates/adobe-photoshop/manifest.json +45 -0
- package/dist/templates/adobe-substance-3d/README.md +88 -0
- package/dist/templates/adobe-substance-3d/files/.env.adobe-substance-3d.example +12 -0
- package/dist/templates/adobe-substance-3d/files/src/domain/ports/out/substance-3d.port.ts +45 -0
- package/dist/templates/adobe-substance-3d/files/src/infrastructure/adobe/substance-3d/substance-3d.adapter.ts +177 -0
- package/dist/templates/adobe-substance-3d/manifest.json +39 -0
- package/dist/templates/agents-md/README.md +55 -0
- package/dist/templates/agents-md/files/.agents/architecture.md +42 -0
- package/dist/templates/agents-md/files/.agents/git.md +30 -0
- package/dist/templates/agents-md/files/.agents/session-log.md +37 -0
- package/dist/templates/agents-md/files/.agents/tech-stack.md +34 -0
- package/dist/templates/agents-md/files/.agents/testing.md +30 -0
- package/dist/templates/agents-md/files/AGENTS.md +97 -0
- package/dist/templates/agents-md/manifest.json +49 -0
- package/dist/templates/auth-mock/README.md +57 -0
- package/dist/templates/auth-mock/files/.env.auth.example +9 -0
- package/dist/templates/auth-mock/files/middleware.ts +28 -0
- package/dist/templates/auth-mock/manifest.json +23 -0
- package/dist/templates/bedrock-agentcore-runtime/README.md +68 -0
- package/dist/templates/bedrock-agentcore-runtime/files/.env.agentcore.example +19 -0
- package/dist/templates/bedrock-agentcore-runtime/files/.github/workflows/deploy-agentcore.yml +100 -0
- package/dist/templates/bedrock-agentcore-runtime/files/Dockerfile.agentcore +33 -0
- package/dist/templates/bedrock-agentcore-runtime/files/agentcore/agentcore.json +16 -0
- package/dist/templates/bedrock-agentcore-runtime/files/agentcore/aws-targets.json +7 -0
- package/dist/templates/bedrock-agentcore-runtime/files/iam/agentcore-runtime-role.policy.json +49 -0
- package/dist/templates/bedrock-agentcore-runtime/files/infra/agentcore-stack.ts +90 -0
- package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/http/invocations.handler.ts +152 -0
- package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/http/ping.handler.ts +13 -0
- package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/http/server.ts +134 -0
- package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/runtime/payload.ts +63 -0
- package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/runtime/session.ts +58 -0
- package/dist/templates/bedrock-agentcore-runtime/manifest.json +89 -0
- package/dist/templates/bedrock-agentcore-services/README.md +65 -0
- package/dist/templates/bedrock-agentcore-services/files/.env.agentcore-services.example +20 -0
- package/dist/templates/bedrock-agentcore-services/files/agentcore/agentcore-services.json +14 -0
- package/dist/templates/bedrock-agentcore-services/files/src/domain/ports/out/agent-identity.port.ts +26 -0
- package/dist/templates/bedrock-agentcore-services/files/src/domain/ports/out/agent-memory.port.ts +30 -0
- package/dist/templates/bedrock-agentcore-services/files/src/domain/ports/out/tool-gateway.port.ts +27 -0
- package/dist/templates/bedrock-agentcore-services/files/src/infrastructure/agentcore/gateway/agentcore-gateway.adapter.ts +103 -0
- package/dist/templates/bedrock-agentcore-services/files/src/infrastructure/agentcore/gateway/mcp-tool-mapper.ts +44 -0
- package/dist/templates/bedrock-agentcore-services/files/src/infrastructure/agentcore/identity/agentcore-identity.adapter.ts +82 -0
- package/dist/templates/bedrock-agentcore-services/files/src/infrastructure/agentcore/identity/idp-bridge.ts +74 -0
- package/dist/templates/bedrock-agentcore-services/files/src/infrastructure/agentcore/memory/agentcore-memory.adapter.ts +82 -0
- package/dist/templates/bedrock-agentcore-services/files/src/infrastructure/agentcore/memory/memory-config.ts +45 -0
- package/dist/templates/bedrock-agentcore-services/manifest.json +97 -0
- package/dist/templates/better-auth/README.md +60 -0
- package/dist/templates/better-auth/files/.env.better-auth.example +20 -0
- package/dist/templates/better-auth/files/app/api/auth/[...all]/route.ts +5 -0
- package/dist/templates/better-auth/files/src/db/index.ts +10 -0
- package/dist/templates/better-auth/files/src/db/migrations/0001_better_auth.sql +49 -0
- package/dist/templates/better-auth/files/src/db/schema/better-auth.ts +57 -0
- package/dist/templates/better-auth/files/src/lib/auth-client.ts +13 -0
- package/dist/templates/better-auth/files/src/lib/auth.ts +72 -0
- package/dist/templates/better-auth/manifest.json +71 -0
- package/dist/templates/bullmq/README.md +61 -0
- package/dist/templates/bullmq/files/.env.bullmq.example +34 -0
- package/dist/templates/bullmq/files/app/admin/queues/[[...slug]]/route.ts +103 -0
- package/dist/templates/bullmq/files/scripts/start-worker.ts +55 -0
- package/dist/templates/bullmq/files/server/startup/start-workers.ts +171 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/connection.ts +105 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/fallback/sync-executor.ts +96 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/index.ts +30 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/jobs/ai-generation.job.ts +53 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/jobs/email.job.ts +42 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/jobs/export.job.ts +49 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/jobs/image-processing.job.ts +48 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/jobs/webhook.job.ts +139 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/parse-int-env.ts +28 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/queues.ts +153 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/scheduler/job-scheduler.ts +70 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/workers.ts +101 -0
- package/dist/templates/bullmq/manifest.json +120 -0
- package/dist/templates/ci-github-actions/README.md +62 -0
- package/dist/templates/ci-github-actions/files/.github/dependabot.yml +20 -0
- package/dist/templates/ci-github-actions/files/.github/workflows/ci.yml +103 -0
- package/dist/templates/ci-github-actions/files/.github/workflows/deploy-fly.yml +30 -0
- package/dist/templates/ci-github-actions/files/.github/workflows/deploy-railway.yml +32 -0
- package/dist/templates/ci-github-actions/files/.github/workflows/deploy-vercel.yml +39 -0
- package/dist/templates/ci-github-actions/files/.github/workflows/deploy-vps.yml +34 -0
- package/dist/templates/ci-github-actions/files/.github/workflows/preview.yml +58 -0
- package/dist/templates/ci-github-actions/files/fly.toml +23 -0
- package/dist/templates/ci-github-actions/manifest.json +100 -0
- package/dist/templates/clerk/README.md +59 -0
- package/dist/templates/clerk/files/.env.clerk.example +11 -0
- package/dist/templates/clerk/files/app/(protected)/layout.tsx +18 -0
- package/dist/templates/clerk/files/app/api/protected-example/route.ts +17 -0
- package/dist/templates/clerk/files/middleware.ts +25 -0
- package/dist/templates/clerk/files/src/lib/auth.ts +12 -0
- package/dist/templates/clerk/files/src/lib/role-guard.tsx +32 -0
- package/dist/templates/clerk/manifest.json +67 -0
- package/dist/templates/design-system/README.md +60 -0
- package/dist/templates/design-system/files/.storybook/main.ts +9 -0
- package/dist/templates/design-system/files/.storybook/preview.ts +13 -0
- package/dist/templates/design-system/files/DESIGN.md +76 -0
- package/dist/templates/design-system/files/src/components/ui/button.stories.tsx +17 -0
- package/dist/templates/design-system/files/src/components/ui/button.tsx +61 -0
- package/dist/templates/design-system/files/src/components/ui/card.tsx +40 -0
- package/dist/templates/design-system/files/src/components/ui/index.ts +6 -0
- package/dist/templates/design-system/files/src/components/ui/input.tsx +29 -0
- package/dist/templates/design-system/files/src/lib/cn.ts +13 -0
- package/dist/templates/design-system/files/src/styles/globals.css +37 -0
- package/dist/templates/design-system/files/src/styles/theme.ts +56 -0
- package/dist/templates/design-system/files/src/styles/tokens.css +73 -0
- package/dist/templates/design-system/files/tailwind.config.ts +58 -0
- package/dist/templates/design-system/manifest.json +81 -0
- package/dist/templates/docker/README.md +62 -0
- package/dist/templates/docker/files/.dockerignore +34 -0
- package/dist/templates/docker/files/.github/workflows/docker-build.yml +74 -0
- package/dist/templates/docker/files/Dockerfile +57 -0
- package/dist/templates/docker/files/docker-compose.ci.yml +22 -0
- package/dist/templates/docker/files/docker-compose.override.yml +20 -0
- package/dist/templates/docker/files/docker-compose.yml +109 -0
- package/dist/templates/docker/manifest.json +59 -0
- package/dist/templates/env-setup/README.md +70 -0
- package/dist/templates/env-setup/files/.env.example +28 -0
- package/dist/templates/env-setup/files/.gitignore.hexagen +16 -0
- package/dist/templates/env-setup/files/SETUP.md +70 -0
- package/dist/templates/env-setup/files/scripts/check-env.ts +95 -0
- package/dist/templates/env-setup/files/src/config/env.client.ts +18 -0
- package/dist/templates/env-setup/files/src/config/env.server.ts +49 -0
- package/dist/templates/env-setup/files/src/config/env.ts +14 -0
- package/dist/templates/env-setup/files/src/config/load-env.ts +40 -0
- package/dist/templates/env-setup/manifest.json +55 -0
- package/dist/templates/error-handling/README.md +72 -0
- package/dist/templates/error-handling/files/.env.sentry.example +8 -0
- package/dist/templates/error-handling/files/app/components/ErrorBoundary.tsx +49 -0
- package/dist/templates/error-handling/files/app/components/ErrorFallback.tsx +35 -0
- package/dist/templates/error-handling/files/server/middleware/error-handler.ts +131 -0
- package/dist/templates/error-handling/files/src/application/errors/application.error.ts +33 -0
- package/dist/templates/error-handling/files/src/domain/errors/authorization.error.ts +20 -0
- package/dist/templates/error-handling/files/src/domain/errors/domain.error.ts +23 -0
- package/dist/templates/error-handling/files/src/domain/errors/not-found.error.ts +11 -0
- package/dist/templates/error-handling/files/src/domain/errors/validation.error.ts +17 -0
- package/dist/templates/error-handling/files/src/infrastructure/errors/external-service.error.ts +24 -0
- package/dist/templates/error-handling/files/src/infrastructure/errors/infrastructure.error.ts +22 -0
- package/dist/templates/error-handling/files/src/infrastructure/errors/llm-errors.ts +57 -0
- package/dist/templates/error-handling/files/src/shared/errors/error-codes.ts +29 -0
- package/dist/templates/error-handling/files/src/shared/result.ts +38 -0
- package/dist/templates/error-handling/manifest.json +63 -0
- package/dist/templates/eslint-no-console/README.md +78 -0
- package/dist/templates/eslint-no-console/files/eslint.no-console.mjs +35 -0
- package/dist/templates/eslint-no-console/manifest.json +28 -0
- package/dist/templates/github-oauth/README.md +61 -0
- package/dist/templates/github-oauth/files/.env.github-oauth.example +13 -0
- package/dist/templates/github-oauth/files/app/api/auth/callback/github/route.ts +105 -0
- package/dist/templates/github-oauth/files/app/api/auth/login/github/route.ts +33 -0
- package/dist/templates/github-oauth/files/app/api/auth/logout/github/route.ts +8 -0
- package/dist/templates/github-oauth/files/app/api/auth/me/route.ts +10 -0
- package/dist/templates/github-oauth/files/middleware.ts +59 -0
- package/dist/templates/github-oauth/files/src/infrastructure/auth/github/config.ts +34 -0
- package/dist/templates/github-oauth/files/src/infrastructure/auth/github/github-auth.adapter.ts +12 -0
- package/dist/templates/github-oauth/files/src/infrastructure/auth/github/github-client.ts +95 -0
- package/dist/templates/github-oauth/files/src/infrastructure/auth/github/github-user.ts +8 -0
- package/dist/templates/github-oauth/files/src/infrastructure/auth/github/session-store.ts +56 -0
- package/dist/templates/github-oauth/files/src/infrastructure/auth/github/user-profile-mapper.ts +24 -0
- package/dist/templates/github-oauth/files/src/lib/auth/get-current-user.ts +31 -0
- package/dist/templates/github-oauth/files/src/lib/auth/require-auth.ts +11 -0
- package/dist/templates/github-oauth/manifest.json +83 -0
- package/dist/templates/google-oauth/README.md +70 -0
- package/dist/templates/google-oauth/files/.env.google-oauth.example +14 -0
- package/dist/templates/google-oauth/files/app/api/auth/callback/google/route.ts +78 -0
- package/dist/templates/google-oauth/files/app/api/auth/login/google/route.ts +34 -0
- package/dist/templates/google-oauth/files/app/api/auth/logout/google/route.ts +8 -0
- package/dist/templates/google-oauth/files/app/api/auth/me/route.ts +13 -0
- package/dist/templates/google-oauth/files/middleware.ts +62 -0
- package/dist/templates/google-oauth/files/src/infrastructure/auth/google/config.ts +29 -0
- package/dist/templates/google-oauth/files/src/infrastructure/auth/google/google-auth.adapter.ts +22 -0
- package/dist/templates/google-oauth/files/src/infrastructure/auth/google/google-client.ts +65 -0
- package/dist/templates/google-oauth/files/src/infrastructure/auth/google/google-user.ts +9 -0
- package/dist/templates/google-oauth/files/src/infrastructure/auth/google/session-store.ts +62 -0
- package/dist/templates/google-oauth/files/src/infrastructure/auth/google/user-profile-mapper.ts +24 -0
- package/dist/templates/google-oauth/files/src/lib/auth/get-current-user.ts +36 -0
- package/dist/templates/google-oauth/files/src/lib/auth/require-auth.ts +13 -0
- package/dist/templates/google-oauth/manifest.json +82 -0
- package/dist/templates/langgraph/README.md +60 -0
- package/dist/templates/langgraph/files/.env.langgraph.example +26 -0
- package/dist/templates/langgraph/files/app/api/agent/invoke/route.ts +48 -0
- package/dist/templates/langgraph/files/app/api/agent/resume/route.ts +66 -0
- package/dist/templates/langgraph/files/app/api/agent/stream/route.ts +63 -0
- package/dist/templates/langgraph/files/src/domain/ports/out/agent-graph.port.ts +78 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/adapters/langgraph.adapter.ts +185 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/checkpointers/index.ts +84 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/checkpointers/memory-checkpointer.ts +12 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/checkpointers/postgres-checkpointer.ts +20 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/checkpointers/redis-checkpointer.ts +25 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/checkpointers/supabase-checkpointer.ts +26 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/edges/routing.ts +31 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/graphs/research-agent.graph.ts +81 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/graphs/simple-chain.graph.ts +81 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/index.ts +23 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/nodes/human-review.node.ts +34 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/nodes/input-processor.node.ts +31 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/nodes/llm-call.node.ts +38 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/nodes/output-formatter.node.ts +27 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/nodes/planner.node.ts +51 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/nodes/researcher.node.ts +63 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/nodes/synthesiser.node.ts +62 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/state/graph-state.ts +57 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/streaming/token-stream.ts +84 -0
- package/dist/templates/langgraph/manifest.json +131 -0
- package/dist/templates/llm-adapter/README.md +63 -0
- package/dist/templates/llm-adapter/files/.env.llm.example +49 -0
- package/dist/templates/llm-adapter/files/src/domain/ports/out/llm-client.port.ts +36 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/anthropic-llm-client.adapter.ts +111 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/azure-openai-llm-client.adapter.ts +105 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/ollama-llm-client.adapter.ts +102 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/openai-llm-client.adapter.ts +104 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/xai-llm-client.adapter.ts +104 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/constants/capabilities.ts +38 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/constants/models.ts +39 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/errors/llm-errors.ts +83 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/index.ts +39 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/router/llm-router.ts +117 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/router/provider-registry.ts +45 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/smoke-test.ts +25 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/utils/parse-env.ts +8 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/utils/retry.ts +39 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/utils/structured-output.ts +78 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/utils/timeout.ts +22 -0
- package/dist/templates/llm-adapter/manifest.json +113 -0
- package/dist/templates/llm-adapter-bedrock/README.md +58 -0
- package/dist/templates/llm-adapter-bedrock/files/.env.bedrock.example +23 -0
- package/dist/templates/llm-adapter-bedrock/files/src/infrastructure/llm/adapters/bedrock-llm-client.adapter.ts +126 -0
- package/dist/templates/llm-adapter-bedrock/files/src/infrastructure/llm/adapters/bedrock-register.ts +20 -0
- package/dist/templates/llm-adapter-bedrock/files/src/infrastructure/llm/errors/bedrock-errors.ts +42 -0
- package/dist/templates/llm-adapter-bedrock/manifest.json +51 -0
- package/dist/templates/magic-link/README.md +66 -0
- package/dist/templates/magic-link/files/.env.magic-link.example +24 -0
- package/dist/templates/magic-link/files/app/api/auth/logout/route.ts +12 -0
- package/dist/templates/magic-link/files/app/api/auth/magic-link/request/route.ts +34 -0
- package/dist/templates/magic-link/files/app/api/auth/magic-link/verify/route.ts +41 -0
- package/dist/templates/magic-link/files/app/api/auth/me/route.ts +10 -0
- package/dist/templates/magic-link/files/middleware.ts +60 -0
- package/dist/templates/magic-link/files/src/infrastructure/auth/magic-link/config.ts +17 -0
- package/dist/templates/magic-link/files/src/infrastructure/auth/magic-link/email-templates.ts +46 -0
- package/dist/templates/magic-link/files/src/infrastructure/auth/magic-link/email-transport.ts +71 -0
- package/dist/templates/magic-link/files/src/infrastructure/auth/magic-link/magic-link-auth.adapter.ts +11 -0
- package/dist/templates/magic-link/files/src/infrastructure/auth/magic-link/magic-link-store.ts +31 -0
- package/dist/templates/magic-link/files/src/infrastructure/auth/magic-link/session-store.ts +56 -0
- package/dist/templates/magic-link/files/src/infrastructure/auth/magic-link/token-generator.ts +71 -0
- package/dist/templates/magic-link/files/src/infrastructure/auth/magic-link/user-profile-mapper.ts +10 -0
- package/dist/templates/magic-link/files/src/lib/auth/get-current-user.ts +28 -0
- package/dist/templates/magic-link/files/src/lib/auth/require-auth.ts +11 -0
- package/dist/templates/magic-link/manifest.json +99 -0
- package/dist/templates/microsoft-entra/README.md +63 -0
- package/dist/templates/microsoft-entra/files/.env.microsoft-entra.example +17 -0
- package/dist/templates/microsoft-entra/files/app/api/auth/callback/entra/route.ts +93 -0
- package/dist/templates/microsoft-entra/files/app/api/auth/login/entra/route.ts +29 -0
- package/dist/templates/microsoft-entra/files/app/api/auth/logout/entra/route.ts +26 -0
- package/dist/templates/microsoft-entra/files/app/api/auth/me/route.ts +10 -0
- package/dist/templates/microsoft-entra/files/middleware.ts +59 -0
- package/dist/templates/microsoft-entra/files/src/infrastructure/auth/entra/config.ts +43 -0
- package/dist/templates/microsoft-entra/files/src/infrastructure/auth/entra/entra-auth.adapter.ts +14 -0
- package/dist/templates/microsoft-entra/files/src/infrastructure/auth/entra/entra-client.ts +82 -0
- package/dist/templates/microsoft-entra/files/src/infrastructure/auth/entra/entra-user.ts +9 -0
- package/dist/templates/microsoft-entra/files/src/infrastructure/auth/entra/group-role-mapper.ts +22 -0
- package/dist/templates/microsoft-entra/files/src/infrastructure/auth/entra/pkce.ts +20 -0
- package/dist/templates/microsoft-entra/files/src/infrastructure/auth/entra/session-store.ts +56 -0
- package/dist/templates/microsoft-entra/files/src/infrastructure/auth/entra/user-profile-mapper.ts +33 -0
- package/dist/templates/microsoft-entra/files/src/lib/auth/get-current-user.ts +31 -0
- package/dist/templates/microsoft-entra/files/src/lib/auth/require-auth.ts +11 -0
- package/dist/templates/microsoft-entra/manifest.json +93 -0
- package/dist/templates/nextauth/README.md +61 -0
- package/dist/templates/nextauth/files/.env.nextauth.example +16 -0
- package/dist/templates/nextauth/files/app/api/auth/[...nextauth]/route.ts +4 -0
- package/dist/templates/nextauth/files/middleware.ts +17 -0
- package/dist/templates/nextauth/files/src/auth.config.ts +41 -0
- package/dist/templates/nextauth/files/src/auth.ts +67 -0
- package/dist/templates/nextauth/files/types/next-auth.d.ts +16 -0
- package/dist/templates/nextauth/manifest.json +74 -0
- package/dist/templates/observability/README.md +69 -0
- package/dist/templates/observability/files/.env.observability.example +12 -0
- package/dist/templates/observability/files/.env.otel.example +7 -0
- package/dist/templates/observability/files/app/api/health/route.ts +37 -0
- package/dist/templates/observability/files/instrumentation.ts +52 -0
- package/dist/templates/observability/files/server/middleware/request-logger.ts +53 -0
- package/dist/templates/observability/files/src/infrastructure/logging/context.ts +21 -0
- package/dist/templates/observability/files/src/infrastructure/logging/correlation.ts +39 -0
- package/dist/templates/observability/files/src/infrastructure/logging/index.ts +12 -0
- package/dist/templates/observability/files/src/infrastructure/logging/logger.ts +68 -0
- package/dist/templates/observability/files/src/infrastructure/logging/redact.ts +89 -0
- package/dist/templates/observability/manifest.json +57 -0
- package/dist/templates/rate-limiting/README.md +63 -0
- package/dist/templates/rate-limiting/files/.env.rate-limit.example +21 -0
- package/dist/templates/rate-limiting/files/server/errors/rate-limit-exceeded.error.ts +43 -0
- package/dist/templates/rate-limiting/files/server/middleware/rate-limit.ts +79 -0
- package/dist/templates/rate-limiting/files/server/utils/get-client-ip.ts +27 -0
- package/dist/templates/rate-limiting/files/server/utils/rate-limiter.ts +82 -0
- package/dist/templates/rate-limiting/files/server/utils/session-id.ts +28 -0
- package/dist/templates/rate-limiting/files/types/rate-limit.d.ts +12 -0
- package/dist/templates/rate-limiting/manifest.json +66 -0
- package/dist/templates/shared-types/README.md +59 -0
- package/dist/templates/shared-types/files/.env.shared-types.example +14 -0
- package/dist/templates/shared-types/files/src/domain/value-objects/user-context.ts +11 -0
- package/dist/templates/shared-types/files/src/infrastructure/auth/mock-user.ts +16 -0
- package/dist/templates/shared-types/files/src/infrastructure/auth/session/session-manager.ts +59 -0
- package/dist/templates/shared-types/manifest.json +37 -0
- package/dist/templates/supabase/README.md +59 -0
- package/dist/templates/supabase/files/.env.supabase.example +15 -0
- package/dist/templates/supabase/files/drizzle.config.ts +15 -0
- package/dist/templates/supabase/files/scripts/gen-types.sh +9 -0
- package/dist/templates/supabase/files/scripts/migrate.ts +23 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/admin.ts +23 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/client.ts +16 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/drizzle/client.ts +17 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/drizzle/schema.ts +10 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/realtime/subscribe.ts +41 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/result.ts +30 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/server.ts +28 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/storage/delete.ts +17 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/storage/download.ts +17 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/storage/index.ts +4 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/storage/signed-url.ts +26 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/storage/upload.ts +24 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/types/database.types.ts +10 -0
- package/dist/templates/supabase/files/supabase/migrations/0001_example_rls.sql +23 -0
- package/dist/templates/supabase/files/supabase/seed.sql +7 -0
- package/dist/templates/supabase/manifest.json +133 -0
- package/dist/templates/supabase-auth/README.md +55 -0
- package/dist/templates/supabase-auth/files/app/api/auth/me/route.ts +10 -0
- package/dist/templates/supabase-auth/files/middleware.ts +108 -0
- package/dist/templates/supabase-auth/files/src/lib/auth/get-current-user.ts +46 -0
- package/dist/templates/supabase-auth/files/src/lib/auth/require-auth.ts +11 -0
- package/dist/templates/supabase-auth/manifest.json +40 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/manifest/apps.d.ts +24 -0
- package/dist/types/manifest/apps.d.ts.map +1 -0
- package/dist/types/manifest/bounded-context.d.ts +43 -0
- package/dist/types/manifest/bounded-context.d.ts.map +1 -0
- package/dist/types/manifest/generator.d.ts +51 -0
- package/dist/types/manifest/generator.d.ts.map +1 -0
- package/dist/types/manifest/helpers.d.ts +30 -0
- package/dist/types/manifest/helpers.d.ts.map +1 -0
- package/dist/types/manifest/index.d.ts +8 -0
- package/dist/types/manifest/index.d.ts.map +1 -0
- package/dist/types/manifest/layers.d.ts +32 -0
- package/dist/types/manifest/layers.d.ts.map +1 -0
- package/dist/types/manifest/manifest.d.ts +64 -0
- package/dist/types/manifest/manifest.d.ts.map +1 -0
- package/dist/types/manifest/monorepo.d.ts +94 -0
- package/dist/types/manifest/monorepo.d.ts.map +1 -0
- package/dist/types/manifest.d.ts +2 -0
- package/dist/types/manifest.d.ts.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Fly.io app configuration.
|
|
2
|
+
#
|
|
3
|
+
# TODO before first deploy:
|
|
4
|
+
# 1. fly apps create <your-app-name> (then set `app` below)
|
|
5
|
+
# 2. pick a region near your users: fly platform regions
|
|
6
|
+
# 3. set runtime secrets: fly secrets set KEY=value
|
|
7
|
+
app = "your-app-name"
|
|
8
|
+
primary_region = "iad"
|
|
9
|
+
|
|
10
|
+
[build]
|
|
11
|
+
|
|
12
|
+
[http_service]
|
|
13
|
+
internal_port = 3000
|
|
14
|
+
force_https = true
|
|
15
|
+
auto_stop_machines = true
|
|
16
|
+
auto_start_machines = true
|
|
17
|
+
min_machines_running = 0
|
|
18
|
+
processes = ["app"]
|
|
19
|
+
|
|
20
|
+
[[vm]]
|
|
21
|
+
cpu_kind = "shared"
|
|
22
|
+
cpus = 1
|
|
23
|
+
memory_mb = 512
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "ci-github-actions",
|
|
3
|
+
"name": "CI / GitHub Actions",
|
|
4
|
+
"description": "GitHub Actions CI (build/typecheck/lint/test) with Turbo cache, a per-target deploy workflow (Vercel/Railway/Fly.io/VPS), optional PR preview deploys, and Dependabot",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"requires": [],
|
|
7
|
+
"conflicts": [],
|
|
8
|
+
"questions": [
|
|
9
|
+
{
|
|
10
|
+
"id": "ci_triggers",
|
|
11
|
+
"type": "multiselect",
|
|
12
|
+
"prompt": "When should CI run?",
|
|
13
|
+
"options": [
|
|
14
|
+
"push-all-branches",
|
|
15
|
+
"push-main-only",
|
|
16
|
+
"pull-request",
|
|
17
|
+
"manual"
|
|
18
|
+
],
|
|
19
|
+
"default": ["push-all-branches", "pull-request"]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "deploy_target",
|
|
23
|
+
"type": "select",
|
|
24
|
+
"prompt": "Deploy target?",
|
|
25
|
+
"options": ["vercel", "railway", "fly-io", "vps-ssh", "none"],
|
|
26
|
+
"default": "vercel"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "preview_deploys",
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"prompt": "PR preview deploys? (Vercel-based; pair with deploy_target vercel/railway)",
|
|
32
|
+
"default": true
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "node_version",
|
|
36
|
+
"type": "select",
|
|
37
|
+
"prompt": "Node.js version?",
|
|
38
|
+
"options": ["20", "22", "23"],
|
|
39
|
+
"default": "22"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "docker_build",
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"prompt": "Build and push a Docker image in CI? (the docker template owns docker-build.yml; this records the intent)",
|
|
45
|
+
"default": false
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "run_tests",
|
|
49
|
+
"type": "boolean",
|
|
50
|
+
"prompt": "Run tests in CI?",
|
|
51
|
+
"default": true
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "cache_strategy",
|
|
55
|
+
"type": "select",
|
|
56
|
+
"prompt": "Dependency cache strategy?",
|
|
57
|
+
"options": ["node-modules", "yarn-cache", "turbo-cache"],
|
|
58
|
+
"default": "turbo-cache"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"envVars": [],
|
|
62
|
+
"outputs": [
|
|
63
|
+
".github/workflows/ci.yml",
|
|
64
|
+
".github/dependabot.yml",
|
|
65
|
+
{
|
|
66
|
+
"path": ".github/workflows/deploy-vercel.yml",
|
|
67
|
+
"when": { "answer": "deploy_target", "equals": "vercel" }
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"path": ".github/workflows/deploy-railway.yml",
|
|
71
|
+
"when": { "answer": "deploy_target", "equals": "railway" }
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"path": ".github/workflows/deploy-fly.yml",
|
|
75
|
+
"when": { "answer": "deploy_target", "equals": "fly-io" }
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"path": "fly.toml",
|
|
79
|
+
"when": { "answer": "deploy_target", "equals": "fly-io" }
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"path": ".github/workflows/deploy-vps.yml",
|
|
83
|
+
"when": { "answer": "deploy_target", "equals": "vps-ssh" }
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"path": ".github/workflows/preview.yml",
|
|
87
|
+
"when": { "answer": "preview_deploys", "equals": true }
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"checklist": [
|
|
91
|
+
"Push to a feature branch and verify the CI workflow runs green (Actions tab)",
|
|
92
|
+
"Add required secrets: GitHub repo → Settings → Secrets and variables → Actions (look for the # TODO comments in the generated workflow files)",
|
|
93
|
+
"Set TURBO_TOKEN (secret) and TURBO_TEAM (variable) for the remote Turbo cache — CI is much faster after the first run",
|
|
94
|
+
"The 'Validate env vars' step runs `check:env`, provided by the env-setup template; delete that step if you did not install env-setup",
|
|
95
|
+
"Merge to main and verify the deploy workflow triggers (only the workflow for your chosen deploy_target was generated)",
|
|
96
|
+
"If preview deploys are enabled, open a PR and verify the preview URL comment appears",
|
|
97
|
+
"Dependabot opens weekly PRs to keep Actions and dev dependencies current — review and merge them"
|
|
98
|
+
],
|
|
99
|
+
"branch": "feature/generator-template-ci-github-actions"
|
|
100
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Clerk (`clerk`)
|
|
2
|
+
|
|
3
|
+
> Standalone Clerk integration: `clerkMiddleware` route protection, server-side auth helpers, an
|
|
4
|
+
> org/app-level `RoleGuard` component, a protected route group, and a JWT-template API example.
|
|
5
|
+
|
|
6
|
+
| | |
|
|
7
|
+
| ------------- | ---------------------------------------------------------- |
|
|
8
|
+
| **ID** | `clerk` |
|
|
9
|
+
| **Category** | Auth framework (group B) |
|
|
10
|
+
| **Requires** | `env-setup` |
|
|
11
|
+
| **Conflicts** | every other auth provider/framework (one strategy per app) |
|
|
12
|
+
| **Branch** | `feature/generator-template-clerk` |
|
|
13
|
+
|
|
14
|
+
Author/agent-facing reference, beside `manifest.json` — not emitted into projects.
|
|
15
|
+
|
|
16
|
+
## What it does
|
|
17
|
+
|
|
18
|
+
Wires Clerk's hosted auth into the app: middleware route protection, server helpers, a
|
|
19
|
+
`RoleGuard` (org-role or app-role), a `(protected)` route group, and an example API route that
|
|
20
|
+
verifies a Clerk JWT template. Clerk hosts the sign-in/up UI.
|
|
21
|
+
|
|
22
|
+
## Service & API
|
|
23
|
+
|
|
24
|
+
- **Provider:** Clerk (hosted). `clerkMiddleware` protects `protected_paths`.
|
|
25
|
+
- **Roles:** org features gate on `orgRole`; app roles via `sessionClaims.metadata.role`.
|
|
26
|
+
- **API auth:** a named JWT template for downstream tokens.
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
`hexagen add clerk`. Questions: `protected_paths`, `org_features` (bool), `jwt_template` (name).
|
|
31
|
+
|
|
32
|
+
Env: `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY`, `CLERK_SECRET_KEY`, and the `NEXT_PUBLIC_CLERK_*`
|
|
33
|
+
sign-in/up/after URLs. Emits `middleware.ts`, `src/lib/auth.ts`, `src/lib/role-guard.tsx`,
|
|
34
|
+
`app/(protected)/layout.tsx`, `app/api/protected-example/route.ts`, `.env.clerk.example`.
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
import { RoleGuard } from "@/lib/role-guard";
|
|
40
|
+
|
|
41
|
+
<RoleGuard role="admin">{/* admin-only UI */}</RoleGuard>;
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Notes for agents
|
|
45
|
+
|
|
46
|
+
- `npm install @clerk/nextjs`; wrap the root layout in `<ClerkProvider>`.
|
|
47
|
+
- Set publishable + secret keys; add `<SignIn />`/`<SignUp />` pages at the configured URLs.
|
|
48
|
+
- Org features require enabling Organizations in the dashboard; create the JWT template if the API
|
|
49
|
+
example mints tokens.
|
|
50
|
+
- Standalone — conflicts with every other auth template.
|
|
51
|
+
|
|
52
|
+
## Checklist (post-install)
|
|
53
|
+
|
|
54
|
+
Install `@clerk/nextjs`; add `<ClerkProvider>`; set keys; add sign-in/up pages; enable org/role
|
|
55
|
+
features if used; create the JWT template; test a protected path while signed out.
|
|
56
|
+
|
|
57
|
+
## Related
|
|
58
|
+
|
|
59
|
+
Requires [`env-setup`](../env-setup). Alternatives: [`nextauth`](../nextauth), [`better-auth`](../better-auth).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Clerk — copy these into .env.local
|
|
2
|
+
# Get keys from https://dashboard.clerk.com → API Keys
|
|
3
|
+
|
|
4
|
+
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
|
|
5
|
+
CLERK_SECRET_KEY=
|
|
6
|
+
|
|
7
|
+
# Hosted UI routes
|
|
8
|
+
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
|
|
9
|
+
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
|
|
10
|
+
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/dashboard
|
|
11
|
+
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/dashboard
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { auth } from "@clerk/nextjs/server";
|
|
3
|
+
import { redirect } from "next/navigation";
|
|
4
|
+
|
|
5
|
+
// Server component layout for the (protected) route group: redirects to the
|
|
6
|
+
// Clerk sign-in page when there is no active session. Clerk's hosted UI renders
|
|
7
|
+
// the sign-in screen, so no login page is generated here.
|
|
8
|
+
export default async function ProtectedLayout({
|
|
9
|
+
children,
|
|
10
|
+
}: {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}): Promise<ReactNode> {
|
|
13
|
+
const { userId } = await auth();
|
|
14
|
+
if (!userId) {
|
|
15
|
+
redirect("/sign-in");
|
|
16
|
+
}
|
|
17
|
+
return children;
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NextRequest, NextResponse } from "next/server";
|
|
2
|
+
import { getAuth } from "@clerk/nextjs/server";
|
|
3
|
+
|
|
4
|
+
// Example protected API route. clerkMiddleware already gates matched routes;
|
|
5
|
+
// this also shows minting a JWT-template token to authenticate a downstream
|
|
6
|
+
// service that Clerk does not own (e.g. an external API).
|
|
7
|
+
export async function GET(request: NextRequest): Promise<NextResponse> {
|
|
8
|
+
const { userId, getToken } = getAuth(request);
|
|
9
|
+
if (!userId) {
|
|
10
|
+
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Token shaped by the "{jwt_template}" JWT template configured in the Clerk dashboard.
|
|
14
|
+
const token = await getToken({ template: "{jwt_template}" });
|
|
15
|
+
|
|
16
|
+
return NextResponse.json({ userId, token });
|
|
17
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { clerkMiddleware, createRouteMatcher } from "@clerk/nextjs/server";
|
|
2
|
+
|
|
3
|
+
// Route prefixes that require an authenticated session (from the `protected_paths` answer).
|
|
4
|
+
const isProtectedRoute = createRouteMatcher(
|
|
5
|
+
"{protected_paths}"
|
|
6
|
+
.split(",")
|
|
7
|
+
.map((p) => p.trim())
|
|
8
|
+
.filter(Boolean)
|
|
9
|
+
.map((p) => p + "(.*)"),
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
export default clerkMiddleware(async (auth, req) => {
|
|
13
|
+
if (isProtectedRoute(req)) {
|
|
14
|
+
await auth.protect();
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const config = {
|
|
19
|
+
matcher: [
|
|
20
|
+
// Skip Next internals and static files unless found in search params.
|
|
21
|
+
"/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)",
|
|
22
|
+
// Always run for API routes.
|
|
23
|
+
"/(api|trpc)(.*)",
|
|
24
|
+
],
|
|
25
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { auth, currentUser } from "@clerk/nextjs/server";
|
|
2
|
+
|
|
3
|
+
// Single import surface for Clerk's server-side auth helpers.
|
|
4
|
+
export { auth, currentUser };
|
|
5
|
+
|
|
6
|
+
// Resolve the custom app-level role from session claims metadata
|
|
7
|
+
// (set via Clerk dashboard → Sessions → custom claims, or publicMetadata).
|
|
8
|
+
export async function getCurrentRole(): Promise<string | null> {
|
|
9
|
+
const { sessionClaims } = await auth();
|
|
10
|
+
const metadata = sessionClaims?.metadata as { role?: string } | undefined;
|
|
11
|
+
return metadata?.role ?? null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
import { useAuth } from "@clerk/nextjs";
|
|
5
|
+
|
|
6
|
+
interface RoleGuardProps {
|
|
7
|
+
role: string;
|
|
8
|
+
/** Check the Clerk organisation role (useAuth().orgRole) instead of the app-level role. */
|
|
9
|
+
org?: boolean;
|
|
10
|
+
fallback?: ReactNode;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Renders children only when the signed-in user holds the required role.
|
|
15
|
+
// org=true gates on the Clerk organisation role; otherwise on the custom
|
|
16
|
+
// app-level role in sessionClaims.metadata.role.
|
|
17
|
+
export function RoleGuard({
|
|
18
|
+
role,
|
|
19
|
+
org = false,
|
|
20
|
+
fallback = null,
|
|
21
|
+
children,
|
|
22
|
+
}: RoleGuardProps): ReactNode {
|
|
23
|
+
const { isLoaded, orgRole, sessionClaims } = useAuth();
|
|
24
|
+
|
|
25
|
+
if (!isLoaded) return null;
|
|
26
|
+
|
|
27
|
+
const appRole = (sessionClaims?.metadata as { role?: string } | undefined)
|
|
28
|
+
?.role;
|
|
29
|
+
const hasRole = org ? orgRole === role : appRole === role;
|
|
30
|
+
|
|
31
|
+
return hasRole ? children : fallback;
|
|
32
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "clerk",
|
|
3
|
+
"name": "Clerk",
|
|
4
|
+
"description": "Standalone Clerk integration: clerkMiddleware route protection, server-side auth helpers, org/app-level RoleGuard component, protected route group, and a JWT-template API example",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"requires": ["env-setup"],
|
|
7
|
+
"conflicts": [
|
|
8
|
+
"auth-mock",
|
|
9
|
+
"google-oauth",
|
|
10
|
+
"github-oauth",
|
|
11
|
+
"microsoft-entra",
|
|
12
|
+
"magic-link",
|
|
13
|
+
"adobe-ims-spa",
|
|
14
|
+
"nextauth",
|
|
15
|
+
"better-auth",
|
|
16
|
+
"supabase-auth"
|
|
17
|
+
],
|
|
18
|
+
"questions": [
|
|
19
|
+
{
|
|
20
|
+
"id": "protected_paths",
|
|
21
|
+
"type": "text",
|
|
22
|
+
"prompt": "Path prefixes to protect?",
|
|
23
|
+
"default": "/dashboard,/api/protected"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "org_features",
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"prompt": "Enable organisation/role features?",
|
|
29
|
+
"default": false
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "jwt_template",
|
|
33
|
+
"type": "text",
|
|
34
|
+
"prompt": "JWT template name for API auth?",
|
|
35
|
+
"default": "default"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"envVars": [
|
|
39
|
+
"NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY",
|
|
40
|
+
"CLERK_SECRET_KEY",
|
|
41
|
+
"NEXT_PUBLIC_CLERK_SIGN_IN_URL",
|
|
42
|
+
"NEXT_PUBLIC_CLERK_SIGN_UP_URL",
|
|
43
|
+
"NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL",
|
|
44
|
+
"NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL"
|
|
45
|
+
],
|
|
46
|
+
"outputs": [
|
|
47
|
+
"middleware.ts",
|
|
48
|
+
"src/lib/auth.ts",
|
|
49
|
+
"src/lib/role-guard.tsx",
|
|
50
|
+
"app/(protected)/layout.tsx",
|
|
51
|
+
"app/api/protected-example/route.ts",
|
|
52
|
+
".env.clerk.example"
|
|
53
|
+
],
|
|
54
|
+
"checklist": [
|
|
55
|
+
"Install dependencies: npm install @clerk/nextjs",
|
|
56
|
+
"Wrap your root layout with <ClerkProvider> (see https://clerk.com/docs/quickstarts/nextjs)",
|
|
57
|
+
"Merge .env.clerk.example into .env.local",
|
|
58
|
+
"Set NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY from the Clerk dashboard",
|
|
59
|
+
"Add <SignIn /> and <SignUp /> pages at the configured sign-in/sign-up URLs (Clerk hosts the UI)",
|
|
60
|
+
"If using org/role features: enable Organizations in the Clerk dashboard; RoleGuard org=true gates on orgRole",
|
|
61
|
+
"For app-level roles: set sessionClaims.metadata.role via a custom session token claim",
|
|
62
|
+
"Create the JWT template in the Clerk dashboard (name must match your 'JWT template name for API auth?' answer) if the API example mints downstream tokens",
|
|
63
|
+
"Standalone framework \u2014 conflicts with all Group A adapters and the other Group B frameworks; use only one auth strategy",
|
|
64
|
+
"Test flow: visit a protected path while signed out \u2192 redirected to /sign-in; GET /api/protected-example returns 401 without a session"
|
|
65
|
+
],
|
|
66
|
+
"branch": "feature/generator-template-clerk"
|
|
67
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Design System (`design-system`)
|
|
2
|
+
|
|
3
|
+
> A populated `DESIGN.md` contract, CSS custom-property tokens, a Tailwind config extension, and
|
|
4
|
+
> base component stubs.
|
|
5
|
+
|
|
6
|
+
| | |
|
|
7
|
+
| ------------- | ------------------------------------------ |
|
|
8
|
+
| **ID** | `design-system` |
|
|
9
|
+
| **Category** | UI / frontend |
|
|
10
|
+
| **Requires** | — |
|
|
11
|
+
| **Conflicts** | none |
|
|
12
|
+
| **Branch** | `feature/generator-template-design-system` |
|
|
13
|
+
|
|
14
|
+
Author/agent-facing reference, beside `manifest.json` — not emitted into projects.
|
|
15
|
+
|
|
16
|
+
## What it does
|
|
17
|
+
|
|
18
|
+
Establishes the visual contract: `DESIGN.md` (treated as the source of truth by agents and
|
|
19
|
+
reviewers), CSS-variable tokens derived from your brand colour, a Tailwind extension wired to
|
|
20
|
+
those tokens, and framework-agnostic component stubs to grow toward your chosen UI base.
|
|
21
|
+
|
|
22
|
+
## What it scaffolds
|
|
23
|
+
|
|
24
|
+
- `DESIGN.md`, `src/styles/{tokens.css,globals.css,theme.ts}`, `tailwind.config.ts`, `src/lib/cn.ts`.
|
|
25
|
+
- `src/components/ui/{button,card,input}.tsx` stubs + the `src/components/ui/index.ts` barrel.
|
|
26
|
+
- Optional Storybook (`.storybook/*`, `button.stories.tsx`).
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
`hexagen add design-system`. Questions: `primary_color` (hex, validated), `typography`
|
|
31
|
+
(`system-ui`/`inter`/`geist`/`custom`), `dark_mode` (`none`/`css-class`/`media-query`/`both`),
|
|
32
|
+
`component_base` (`shadcn-ui`/`radix-primitives`/`headlessui`/`none`), `storybook` (bool).
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import { cn } from "@/lib/cn";
|
|
38
|
+
import { Button } from "@/components/ui";
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
// token classes resolve from tokens.css:
|
|
43
|
+
<div className="bg-surface text-brand-primary">…</div>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Notes for agents
|
|
47
|
+
|
|
48
|
+
- **`DESIGN.md` is the design contract** — agents/reviewers treat it as source of truth.
|
|
49
|
+
- `npm install clsx tailwind-merge` (+ Tailwind and your `component_base` library).
|
|
50
|
+
- Import `src/styles/globals.css` once at the app root; set `--color-brand-primary` in `tokens.css`
|
|
51
|
+
(the hover shade derives automatically).
|
|
52
|
+
|
|
53
|
+
## Checklist (post-install)
|
|
54
|
+
|
|
55
|
+
Install peer deps; review `DESIGN.md`; import `globals.css`; set the brand token; verify token
|
|
56
|
+
classes resolve; set up Storybook if enabled.
|
|
57
|
+
|
|
58
|
+
## Related
|
|
59
|
+
|
|
60
|
+
Standalone (no dependencies).
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Preview } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
// Load the design tokens + globals so stories render with the real theme.
|
|
4
|
+
import "../src/styles/tokens.css";
|
|
5
|
+
import "../src/styles/globals.css";
|
|
6
|
+
|
|
7
|
+
const preview: Preview = {
|
|
8
|
+
parameters: {
|
|
9
|
+
controls: { matchers: { color: /(background|color)$/i } },
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default preview;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Design System
|
|
2
|
+
|
|
3
|
+
> **This file is the design contract.** It describes *intent*, not just values.
|
|
4
|
+
> Before changing any component or style, read this first; when you change a
|
|
5
|
+
> token, update the relevant row here in the same commit. AI agents treat this
|
|
6
|
+
> as an immutable anchor — deviations require an explicit, justified edit.
|
|
7
|
+
|
|
8
|
+
The CSS custom properties in `src/styles/tokens.css` implement this contract and
|
|
9
|
+
are the single source of truth. `src/styles/theme.ts` mirrors them as
|
|
10
|
+
`var(--token)` references for TypeScript. Tailwind (`tailwind.config.ts`)
|
|
11
|
+
*extends* the default palette with these tokens — it never replaces it.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Colour Tokens
|
|
16
|
+
|
|
17
|
+
| Token | CSS Variable | Value | Usage |
|
|
18
|
+
| ---------------- | ----------------------------- | --------- | ------------------------------ |
|
|
19
|
+
| Brand Primary | `--color-brand-primary` | {primary_color} | CTAs, active states, links |
|
|
20
|
+
| Brand Hover | `--color-brand-primary-hover` | derived | Hover/pressed on brand surfaces |
|
|
21
|
+
| Brand Secondary | `--color-brand-secondary` | #8b5cf6 | Accents, secondary emphasis |
|
|
22
|
+
| Background | `--color-background` | #ffffff | Page background |
|
|
23
|
+
| Surface | `--color-surface` | #f8fafc | Cards, raised panels |
|
|
24
|
+
| Border | `--color-border` | #e2e8f0 | Dividers, input borders |
|
|
25
|
+
| Text Primary | `--color-text-primary` | #0f172a | Body copy, headings |
|
|
26
|
+
| Text Secondary | `--color-text-secondary` | #64748b | Supporting copy |
|
|
27
|
+
| Success / Warning / Error / Info | `--color-success` … | semantic | Status only — never decorative |
|
|
28
|
+
|
|
29
|
+
Brand Hover is derived from Brand Primary via `color-mix`, so it tracks the
|
|
30
|
+
primary automatically. Adjust Brand Secondary and the neutrals to taste.
|
|
31
|
+
|
|
32
|
+
## Typography
|
|
33
|
+
|
|
34
|
+
Base font family: **{typography}**. Load the actual font (e.g. `next/font`) and
|
|
35
|
+
keep the `--font-sans` stack in `tokens.css` as the fallback chain. Use Tailwind
|
|
36
|
+
`font-sans` / `font-mono`; do not hardcode `font-family` in components.
|
|
37
|
+
|
|
38
|
+
## Spacing & Radius
|
|
39
|
+
|
|
40
|
+
Spacing follows a 4px base unit — use Tailwind spacing classes (`p-4` = 16px).
|
|
41
|
+
Radius tokens: `--radius-sm` (4px), `--radius-md` (8px, the default for
|
|
42
|
+
buttons/inputs), `--radius-lg` (12px, cards), `--radius-full` (pills/avatars).
|
|
43
|
+
|
|
44
|
+
## Dark Mode
|
|
45
|
+
|
|
46
|
+
Strategy selected: **{dark_mode}**. Shipped implementation is the **class**
|
|
47
|
+
strategy — toggling a `dark` class on `<html>` activates the `.dark` overrides in
|
|
48
|
+
`tokens.css`, and `tailwind.config.ts` sets `darkMode: "class"`. If you selected
|
|
49
|
+
`media-query` (or `both`), change `darkMode` to `"media"` and move the `.dark`
|
|
50
|
+
overrides under `@media (prefers-color-scheme: dark)`. If you selected `none`,
|
|
51
|
+
delete the `.dark` block.
|
|
52
|
+
|
|
53
|
+
## Component Base
|
|
54
|
+
|
|
55
|
+
Components are built on: **{component_base}**. The generated stubs in
|
|
56
|
+
`src/components/ui/` are framework-agnostic React (props + `cn()` + a11y) so they
|
|
57
|
+
work regardless; install the matching library if you chose one (e.g. shadcn-ui /
|
|
58
|
+
Radix primitives / Headless UI) and grow the stubs toward its patterns.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Component Constraints
|
|
63
|
+
|
|
64
|
+
- **Buttons:** `border-radius = --radius-md`. Never square. Disabled and loading
|
|
65
|
+
states reduce opacity and block pointer events; loading sets `aria-busy`.
|
|
66
|
+
- **Cards:** `shadow = --shadow-sm`. Elevation conveys hierarchy, not decoration.
|
|
67
|
+
- **Inputs:** `1px solid --color-border`; focus ring is `--color-brand-primary`.
|
|
68
|
+
Error state sets `aria-invalid` *and* the red border together — never one alone.
|
|
69
|
+
|
|
70
|
+
## Prohibited Patterns
|
|
71
|
+
|
|
72
|
+
- Do not use arbitrary Tailwind values (e.g. `w-[237px]`) without a design reason.
|
|
73
|
+
- Do not hardcode hex values in components — reference tokens via Tailwind or
|
|
74
|
+
`var(--token)`.
|
|
75
|
+
- Do not branch light/dark logic inside component files — rely on tokens that
|
|
76
|
+
adapt.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Button } from "./button";
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof Button> = {
|
|
5
|
+
title: "UI/Button",
|
|
6
|
+
component: Button,
|
|
7
|
+
args: { children: "Click me" },
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof Button>;
|
|
12
|
+
|
|
13
|
+
export const Primary: Story = { args: { variant: "primary" } };
|
|
14
|
+
export const Secondary: Story = { args: { variant: "secondary" } };
|
|
15
|
+
export const Ghost: Story = { args: { variant: "ghost" } };
|
|
16
|
+
export const Destructive: Story = { args: { variant: "destructive" } };
|
|
17
|
+
export const Loading: Story = { args: { isLoading: true } };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import { cn } from "../../lib/cn";
|
|
3
|
+
|
|
4
|
+
type ButtonVariant = "primary" | "secondary" | "ghost" | "destructive";
|
|
5
|
+
type ButtonSize = "sm" | "md" | "lg";
|
|
6
|
+
|
|
7
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
8
|
+
variant?: ButtonVariant;
|
|
9
|
+
size?: ButtonSize;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const VARIANT_CLASSES: Record<ButtonVariant, string> = {
|
|
14
|
+
primary:
|
|
15
|
+
"bg-brand-primary text-white hover:bg-brand-primary-hover focus-visible:ring-brand-primary",
|
|
16
|
+
secondary:
|
|
17
|
+
"bg-surface text-text-primary border border-border hover:bg-border/40",
|
|
18
|
+
ghost: "bg-transparent text-text-primary hover:bg-surface",
|
|
19
|
+
destructive: "bg-error text-white hover:opacity-90",
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const SIZE_CLASSES: Record<ButtonSize, string> = {
|
|
23
|
+
sm: "h-8 px-3 text-sm",
|
|
24
|
+
md: "h-10 px-4 text-sm",
|
|
25
|
+
lg: "h-12 px-6 text-base",
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Base button. A skeletal pattern (variants + cn() + a11y) to extend, not a
|
|
30
|
+
* polished component. Disabled while loading; exposes a spinner slot.
|
|
31
|
+
*/
|
|
32
|
+
export function Button(props: ButtonProps): ReactNode {
|
|
33
|
+
const {
|
|
34
|
+
variant = "primary",
|
|
35
|
+
size = "md",
|
|
36
|
+
isLoading = false,
|
|
37
|
+
className,
|
|
38
|
+
children,
|
|
39
|
+
disabled,
|
|
40
|
+
...rest
|
|
41
|
+
} = props;
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<button
|
|
45
|
+
className={cn(
|
|
46
|
+
"inline-flex items-center justify-center gap-2 rounded-md font-medium transition-colors",
|
|
47
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
48
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
49
|
+
VARIANT_CLASSES[variant],
|
|
50
|
+
SIZE_CLASSES[size],
|
|
51
|
+
className,
|
|
52
|
+
)}
|
|
53
|
+
disabled={disabled || isLoading}
|
|
54
|
+
aria-busy={isLoading || undefined}
|
|
55
|
+
{...rest}
|
|
56
|
+
>
|
|
57
|
+
{isLoading ? <span className="size-4 animate-spin rounded-full border-2 border-current border-t-transparent" /> : null}
|
|
58
|
+
{isLoading ? null : children}
|
|
59
|
+
</button>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import { cn } from "../../lib/cn";
|
|
3
|
+
|
|
4
|
+
export type CardProps = HTMLAttributes<HTMLDivElement>;
|
|
5
|
+
|
|
6
|
+
/** Surface container — token-driven background, border, radius, and shadow. */
|
|
7
|
+
export function Card(props: CardProps): ReactNode {
|
|
8
|
+
const { className, children, ...rest } = props;
|
|
9
|
+
return (
|
|
10
|
+
<div
|
|
11
|
+
className={cn(
|
|
12
|
+
"rounded-lg border border-border bg-surface text-text-primary shadow-sm",
|
|
13
|
+
className,
|
|
14
|
+
)}
|
|
15
|
+
{...rest}
|
|
16
|
+
>
|
|
17
|
+
{children ?? null}
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Padded header region for a Card. */
|
|
23
|
+
export function CardHeader(props: CardProps): ReactNode {
|
|
24
|
+
const { className, children, ...rest } = props;
|
|
25
|
+
return (
|
|
26
|
+
<div className={cn("flex flex-col gap-1 p-6", className)} {...rest}>
|
|
27
|
+
{children ?? null}
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Padded body region for a Card. */
|
|
33
|
+
export function CardContent(props: CardProps): ReactNode {
|
|
34
|
+
const { className, children, ...rest } = props;
|
|
35
|
+
return (
|
|
36
|
+
<div className={cn("p-6 pt-0", className)} {...rest}>
|
|
37
|
+
{children ?? null}
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Barrel for the base UI kit. Import from this directory (e.g.
|
|
2
|
+
// "../components/ui") rather than the individual files so the public surface
|
|
3
|
+
// stays stable as components grow.
|
|
4
|
+
export { Button, type ButtonProps } from "./button";
|
|
5
|
+
export { Card, CardHeader, CardContent, type CardProps } from "./card";
|
|
6
|
+
export { Input, type InputProps } from "./input";
|