@polymorphism-tech/morph-spec 3.2.0 → 4.3.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/README.md +1 -14
- package/bin/detect-agents.js +1 -1
- package/bin/morph-spec.js +403 -40
- package/bin/validate.js +5 -5
- package/docs/getting-started.md +0 -5
- package/docs/next-generation/AGENTS.md +521 -0
- package/docs/next-generation/ANALYSIS.md +555 -0
- package/docs/next-generation/ARCHITECTURE.md +436 -0
- package/docs/next-generation/CONTEXT-OPTIMIZATION.md +267 -0
- package/docs/next-generation/EXECUTION-FLOW.md +274 -0
- package/docs/next-generation/FEATURES.md +688 -0
- package/docs/next-generation/META-PROMPTS.md +235 -0
- package/docs/next-generation/MIGRATION-GUIDE.md +253 -0
- package/docs/next-generation/README.md +231 -0
- package/docs/next-generation/ROADMAP.md +801 -0
- package/docs/next-generation/THREAD-MANAGEMENT.md +240 -0
- package/docs/validation-checklist.md +0 -1
- package/package.json +5 -5
- package/src/commands/agents/agents-fuse.js +96 -0
- package/src/commands/agents/index.js +4 -0
- package/src/commands/agents/micro-agent.js +112 -0
- package/src/commands/{spawn-team.js → agents/spawn-team.js} +237 -172
- package/src/commands/agents/squad-template.js +146 -0
- package/src/commands/analytics/analytics.js +176 -0
- package/src/commands/context/context-prime.js +63 -0
- package/src/commands/context/core-four.js +54 -0
- package/src/commands/{create-story.js → feature/create-story.js} +357 -354
- package/src/commands/feature/index.js +6 -0
- package/src/commands/{shard-spec.js → feature/shard-spec.js} +2 -2
- package/src/commands/{sprint-status.js → feature/sprint-status.js} +1 -1
- package/src/commands/{generate-context.js → generation/generate-context.js} +40 -40
- package/src/commands/{generate.js → generation/generate.js} +4 -4
- package/src/commands/generation/index.js +5 -0
- package/src/commands/index.js +16 -0
- package/src/commands/{capture-pattern.js → learning/capture-pattern.js} +121 -121
- package/src/commands/learning/index.js +5 -0
- package/src/commands/mcp/mcp.js +102 -0
- package/src/commands/{detect-agents.js → project/detect-agents.js} +178 -178
- package/src/commands/project/detect-workflow.js +174 -0
- package/src/commands/{detect.js → project/detect.js} +104 -104
- package/src/commands/{doctor.js → project/doctor.js} +221 -4
- package/src/commands/project/index.js +10 -0
- package/src/commands/{init.js → project/init.js} +305 -295
- package/src/commands/{sync.js → project/sync.js} +167 -167
- package/src/commands/{update.js → project/update.js} +240 -240
- package/src/commands/{advance-phase.js → state/advance-phase.js} +101 -25
- package/src/commands/{approve.js → state/approve.js} +221 -221
- package/src/commands/state/index.js +8 -0
- package/src/commands/{rollback-phase.js → state/rollback-phase.js} +185 -185
- package/src/commands/{state.js → state/state.js} +334 -334
- package/src/commands/{validate-phase.js → state/validate-phase.js} +221 -221
- package/src/commands/tasks/index.js +4 -0
- package/src/commands/{task.js → tasks/task.js} +78 -78
- package/src/commands/templates/index.js +8 -0
- package/src/commands/templates/template-customize.js +101 -0
- package/src/commands/templates/template-list.js +128 -0
- package/src/commands/templates/template-render.js +174 -0
- package/src/commands/templates/template-show.js +131 -0
- package/src/commands/templates/template-validate.js +91 -0
- package/src/commands/threads/thread-template.js +103 -0
- package/src/commands/threads/threads.js +261 -0
- package/src/commands/trust/trust.js +205 -0
- package/src/commands/utils/index.js +7 -0
- package/src/commands/{session-summary.js → utils/session-summary.js} +291 -291
- package/src/commands/{troubleshoot.js → utils/troubleshoot.js} +222 -222
- package/src/commands/{analyze-blazor-concurrency.js → validation/analyze-blazor-concurrency.js} +193 -193
- package/src/commands/validation/index.js +8 -0
- package/src/commands/{lint-fluent.js → validation/lint-fluent.js} +352 -352
- package/src/commands/{validate-blazor-state.js → validation/validate-blazor-state.js} +210 -210
- package/src/commands/{validate-blazor.js → validation/validate-blazor.js} +156 -156
- package/src/commands/{validate-css.js → validation/validate-css.js} +84 -84
- package/src/core/index.js +10 -0
- package/src/{orchestrator.js → core/orchestrator.js} +8 -8
- package/src/core/registry/command-registry.js +302 -0
- package/src/core/registry/index.js +8 -0
- package/src/core/registry/validator-registry.js +204 -0
- package/src/core/state/index.js +8 -0
- package/src/{lib → core/state}/phase-state-machine.js +214 -214
- package/src/{lib → core/state}/state-manager.js +588 -534
- package/src/core/templates/index.js +9 -0
- package/src/core/templates/template-registry.js +335 -0
- package/src/core/templates/template-renderer.js +477 -0
- package/src/core/templates/template-validator.js +296 -0
- package/src/core/workflows/index.js +7 -0
- package/src/core/workflows/workflow-detector.js +452 -0
- package/src/lib/agents/micro-agent-factory.js +161 -0
- package/src/lib/{complexity-analyzer.js → analysis/complexity-analyzer.js} +441 -441
- package/src/lib/analysis/index.js +7 -0
- package/src/lib/analytics/analytics-engine.js +345 -0
- package/src/lib/{checkpoint-hooks.js → checkpoints/checkpoint-hooks.js} +35 -0
- package/src/lib/checkpoints/index.js +7 -0
- package/src/lib/context/context-bundler.js +240 -0
- package/src/lib/context/context-optimizer.js +212 -0
- package/src/lib/context/context-tracker.js +273 -0
- package/src/lib/context/core-four-tracker.js +201 -0
- package/src/lib/context/mcp-optimizer.js +200 -0
- package/src/lib/detectors/config-detector.js +223 -223
- package/src/lib/detectors/conversation-analyzer.js +163 -163
- package/src/lib/{design-system-detector.js → detectors/design-system-detector.js} +187 -187
- package/src/lib/detectors/index.js +87 -84
- package/src/lib/detectors/standards-generator.js +275 -275
- package/src/lib/detectors/structure-detector.js +245 -245
- package/src/lib/execution/fusion-executor.js +304 -0
- package/src/lib/execution/parallel-executor.js +270 -0
- package/src/lib/{context-generator.js → generators/context-generator.js} +526 -516
- package/src/lib/generators/index.js +10 -0
- package/src/lib/{metadata-extractor.js → generators/metadata-extractor.js} +387 -380
- package/src/lib/{recap-generator.js → generators/recap-generator.js} +205 -205
- package/src/lib/hooks/hook-executor.js +169 -0
- package/src/lib/hooks/stop-hook-executor.js +286 -0
- package/src/lib/hops/hop-composer.js +221 -0
- package/src/lib/learning/index.js +7 -0
- package/src/lib/orchestration/index.js +7 -0
- package/src/lib/{team-orchestrator.js → orchestration/team-orchestrator.js} +323 -323
- package/src/lib/stacks/index.js +7 -0
- package/src/lib/{stack-resolver.js → stacks/stack-resolver.js} +180 -148
- package/src/lib/standards/index.js +7 -0
- package/src/lib/{standards-context-injector.js → standards/standards-context-injector.js} +298 -288
- package/src/lib/threads/thread-coordinator.js +238 -0
- package/src/lib/threads/thread-manager.js +317 -0
- package/src/lib/tracking/artifact-trail.js +202 -0
- package/src/lib/troubleshooting/index.js +8 -0
- package/src/lib/{troubleshoot-grep.js → troubleshooting/troubleshoot-grep.js} +204 -204
- package/src/lib/{troubleshoot-index.js → troubleshooting/troubleshoot-index.js} +144 -144
- package/src/lib/trust/trust-manager.js +269 -0
- package/src/lib/validators/{architecture-validator.js → architecture/architecture-validator.js} +8 -8
- package/src/lib/validators/architecture/index.js +7 -0
- package/src/lib/{blazor-concurrency-analyzer.js → validators/blazor/blazor-concurrency-analyzer.js} +277 -288
- package/src/lib/{blazor-state-validator.js → validators/blazor/blazor-state-validator.js} +279 -291
- package/src/lib/{blazor-validator.js → validators/blazor/blazor-validator.js} +369 -374
- package/src/lib/validators/blazor/index.js +9 -0
- package/src/lib/validators/{content-validator.js → content/content-validator.js} +351 -351
- package/src/lib/validators/content/index.js +7 -0
- package/src/lib/validators/{contract-compliance-validator.js → contracts/contract-compliance-validator.js} +273 -273
- package/src/lib/validators/contracts/index.js +7 -0
- package/src/lib/{css-validator.js → validators/css/css-validator.js} +352 -352
- package/src/lib/validators/css/index.js +7 -0
- package/src/lib/validators/{design-system-validator.js → design-system/design-system-validator.js} +231 -231
- package/src/lib/validators/design-system/index.js +7 -0
- package/src/lib/validators/packages/index.js +7 -0
- package/src/lib/validators/shared/index.js +12 -0
- package/src/lib/validators/shared/issue-counter.js +18 -0
- package/src/lib/validators/shared/result-formatter.js +124 -0
- package/src/lib/{spec-validator.js → validators/spec-validator.js} +258 -258
- package/src/lib/validators/ui/index.js +7 -0
- package/src/lib/{validation-runner.js → validators/validation-runner.js} +286 -284
- package/src/ui/wizard-questions.js +0 -2
- package/src/utils/color-utils.js +70 -0
- package/src/utils/file-copier.js +188 -189
- package/src/utils/process-handler.js +97 -0
- package/stacks/blazor-azure/.morph/config/agents.json +948 -764
- package/stacks/blazor-azure/.morph/hooks/{pre-commit-tests.sh → pre-commit/tests-csharp.sh} +3 -2
- package/stacks/blazor-azure/.morph/templates/infrastructure/github/workflows/cd-prod.yml.hbs +41 -0
- package/stacks/blazor-azure/.morph/templates/infrastructure/github/workflows/cd-staging.yml.hbs +24 -0
- package/stacks/blazor-azure/.morph/templates/infrastructure/github/workflows/ci-build.yml.hbs +23 -0
- package/stacks/nextjs-supabase/.morph/config/agents.json +345 -345
- package/stacks/nextjs-supabase/.morph/hooks/pre-commit/tests-typescript.sh +61 -0
- package/stacks/nextjs-supabase/.morph/templates/infrastructure/github/workflows/cd-prod.yml.hbs +22 -0
- package/stacks/nextjs-supabase/.morph/templates/infrastructure/github/workflows/cd-staging.yml.hbs +22 -0
- package/stacks/nextjs-supabase/.morph/templates/infrastructure/github/workflows/ci-build.yml.hbs +35 -0
- package/stacks/nextjs-supabase/README.md +6 -15
- package/CLAUDE.md +0 -648
- package/bin/render-template.js +0 -349
- package/bin/semantic-detect-agents.js +0 -247
- package/bin/validate-agents-skills.js +0 -257
- package/bin/validate-agents.js +0 -70
- package/bin/validate-phase.js +0 -263
- package/docs/examples.md +0 -328
- package/docs/llm-interaction-config.md +0 -735
- package/scripts/reorganize-skills.cjs +0 -175
- package/scripts/validate-agents-structure.cjs +0 -52
- package/scripts/validate-skills.cjs +0 -180
- package/src/commands/deploy.js +0 -780
- package/src/commands/migrate-state.js +0 -158
- package/src/commands/upgrade.js +0 -346
- package/src/lib/continuous-validator.js +0 -421
- package/src/lib/decision-constraint-loader.js +0 -109
- package/src/lib/design-system-scaffolder.js +0 -299
- package/src/lib/hook-executor.js +0 -257
- package/src/lib/mockup-generator.js +0 -366
- package/src/lib/ui-detector.js +0 -350
- package/src/llm/schema-validator.js +0 -121
- package/src/sanitizer/.gitkeep +0 -0
- package/src/scanner/.gitkeep +0 -0
- package/src/types/index.js +0 -477
- package/src/ui/.gitkeep +0 -0
- package/src/writer/.gitkeep +0 -0
- package/stacks/blazor-azure/.azure/README.md +0 -293
- package/stacks/blazor-azure/.azure/docs/azure-devops-setup.md +0 -454
- package/stacks/blazor-azure/.azure/docs/branch-strategy.md +0 -398
- package/stacks/blazor-azure/.azure/docs/local-development.md +0 -515
- package/stacks/blazor-azure/.azure/pipelines/pipeline-variables.yml +0 -34
- package/stacks/blazor-azure/.azure/pipelines/prod-pipeline.yml +0 -319
- package/stacks/blazor-azure/.azure/pipelines/staging-pipeline.yml +0 -234
- package/stacks/blazor-azure/.azure/pipelines/templates/build-dotnet.yml +0 -75
- package/stacks/blazor-azure/.azure/pipelines/templates/deploy-app-service.yml +0 -94
- package/stacks/blazor-azure/.azure/pipelines/templates/deploy-container-app.yml +0 -120
- package/stacks/blazor-azure/.azure/pipelines/templates/infra-deploy.yml +0 -90
- package/stacks/blazor-azure/.claude/commands/morph-apply.md +0 -221
- package/stacks/blazor-azure/.claude/commands/morph-archive.md +0 -79
- package/stacks/blazor-azure/.claude/commands/morph-deploy.md +0 -529
- package/stacks/blazor-azure/.claude/commands/morph-infra.md +0 -209
- package/stacks/blazor-azure/.claude/commands/morph-preflight.md +0 -227
- package/stacks/blazor-azure/.claude/commands/morph-proposal.md +0 -122
- package/stacks/blazor-azure/.claude/commands/morph-status.md +0 -86
- package/stacks/blazor-azure/.claude/commands/morph-troubleshoot.md +0 -122
- package/stacks/blazor-azure/.claude/settings.local.json +0 -15
- package/stacks/blazor-azure/.claude/skills/level-0-meta/README.md +0 -7
- package/stacks/blazor-azure/.claude/skills/level-0-meta/code-review.md +0 -226
- package/stacks/blazor-azure/.claude/skills/level-0-meta/morph-checklist.md +0 -117
- package/stacks/blazor-azure/.claude/skills/level-0-meta/simulation-checklist.md +0 -77
- package/stacks/blazor-azure/.claude/skills/level-1-workflows/README.md +0 -7
- package/stacks/blazor-azure/.claude/skills/level-1-workflows/morph-replicate.md +0 -213
- package/stacks/blazor-azure/.claude/skills/level-1-workflows/phase-clarify.md +0 -131
- package/stacks/blazor-azure/.claude/skills/level-1-workflows/phase-design.md +0 -213
- package/stacks/blazor-azure/.claude/skills/level-1-workflows/phase-setup.md +0 -106
- package/stacks/blazor-azure/.claude/skills/level-1-workflows/phase-tasks.md +0 -164
- package/stacks/blazor-azure/.claude/skills/level-1-workflows/phase-uiux.md +0 -169
- package/stacks/blazor-azure/.claude/skills/level-2-domains/README.md +0 -14
- package/stacks/blazor-azure/.claude/skills/level-2-domains/ai-agents/ai-system-architect.md +0 -192
- package/stacks/blazor-azure/.claude/skills/level-2-domains/architecture/po-pm-advisor.md +0 -197
- package/stacks/blazor-azure/.claude/skills/level-2-domains/architecture/prompt-engineer.md +0 -189
- package/stacks/blazor-azure/.claude/skills/level-2-domains/architecture/seo-growth-hacker.md +0 -320
- package/stacks/blazor-azure/.claude/skills/level-2-domains/architecture/standards-architect.md +0 -156
- package/stacks/blazor-azure/.claude/skills/level-2-domains/backend/dotnet-senior.md +0 -287
- package/stacks/blazor-azure/.claude/skills/level-2-domains/backend/ef-modeler.md +0 -113
- package/stacks/blazor-azure/.claude/skills/level-2-domains/backend/hangfire-orchestrator.md +0 -126
- package/stacks/blazor-azure/.claude/skills/level-2-domains/backend/ms-agent-expert.md +0 -109
- package/stacks/blazor-azure/.claude/skills/level-2-domains/frontend/blazor-builder.md +0 -210
- package/stacks/blazor-azure/.claude/skills/level-2-domains/frontend/nextjs-expert.md +0 -154
- package/stacks/blazor-azure/.claude/skills/level-2-domains/frontend/ui-ux-designer.md +0 -191
- package/stacks/blazor-azure/.claude/skills/level-2-domains/infrastructure/azure-architect.md +0 -142
- package/stacks/blazor-azure/.claude/skills/level-2-domains/infrastructure/azure-deploy-specialist.md +0 -699
- package/stacks/blazor-azure/.claude/skills/level-2-domains/infrastructure/bicep-architect.md +0 -126
- package/stacks/blazor-azure/.claude/skills/level-2-domains/infrastructure/container-specialist.md +0 -131
- package/stacks/blazor-azure/.claude/skills/level-2-domains/infrastructure/devops-engineer.md +0 -119
- package/stacks/blazor-azure/.claude/skills/level-2-domains/integrations/asaas-financial.md +0 -130
- package/stacks/blazor-azure/.claude/skills/level-2-domains/integrations/azure-identity.md +0 -142
- package/stacks/blazor-azure/.claude/skills/level-2-domains/integrations/clerk-auth.md +0 -108
- package/stacks/blazor-azure/.claude/skills/level-2-domains/integrations/resend-email.md +0 -119
- package/stacks/blazor-azure/.claude/skills/level-2-domains/quality/code-analyzer.md +0 -235
- package/stacks/blazor-azure/.claude/skills/level-2-domains/quality/testing-specialist.md +0 -126
- package/stacks/blazor-azure/.claude/skills/level-3-technologies/README.md +0 -7
- package/stacks/blazor-azure/.claude/skills/level-4-patterns/README.md +0 -7
- package/stacks/blazor-azure/.morph/archive/.gitkeep +0 -25
- package/stacks/blazor-azure/.morph/docs/STORY-DRIVEN-DEVELOPMENT.md +0 -392
- package/stacks/blazor-azure/.morph/docs/workflows/design-impl.md +0 -37
- package/stacks/blazor-azure/.morph/docs/workflows/enforcement-pipeline.md +0 -668
- package/stacks/blazor-azure/.morph/docs/workflows/fast-track.md +0 -29
- package/stacks/blazor-azure/.morph/docs/workflows/full-morph.md +0 -76
- package/stacks/blazor-azure/.morph/docs/workflows/standard.md +0 -44
- package/stacks/blazor-azure/.morph/docs/workflows/ui-refresh.md +0 -39
- package/stacks/blazor-azure/.morph/examples/api-nextjs/README.md +0 -241
- package/stacks/blazor-azure/.morph/examples/api-nextjs/contracts.ts +0 -307
- package/stacks/blazor-azure/.morph/examples/api-nextjs/spec.md +0 -399
- package/stacks/blazor-azure/.morph/examples/api-nextjs/tasks.md +0 -168
- package/stacks/blazor-azure/.morph/examples/micro-saas/README.md +0 -125
- package/stacks/blazor-azure/.morph/examples/micro-saas/contracts.cs +0 -358
- package/stacks/blazor-azure/.morph/examples/micro-saas/decisions.md +0 -246
- package/stacks/blazor-azure/.morph/examples/micro-saas/spec.md +0 -236
- package/stacks/blazor-azure/.morph/examples/micro-saas/tasks.md +0 -150
- package/stacks/blazor-azure/.morph/examples/multi-agent/README.md +0 -309
- package/stacks/blazor-azure/.morph/examples/multi-agent/contracts.cs +0 -433
- package/stacks/blazor-azure/.morph/examples/multi-agent/spec.md +0 -479
- package/stacks/blazor-azure/.morph/examples/multi-agent/tasks.md +0 -185
- package/stacks/blazor-azure/.morph/examples/scheduled-reports/decisions.md +0 -158
- package/stacks/blazor-azure/.morph/examples/scheduled-reports/proposal.md +0 -95
- package/stacks/blazor-azure/.morph/examples/scheduled-reports/spec.md +0 -267
- package/stacks/blazor-azure/.morph/examples/state-v3.json +0 -188
- package/stacks/blazor-azure/.morph/features/.gitkeep +0 -25
- package/stacks/blazor-azure/.morph/hooks/README.md +0 -348
- package/stacks/blazor-azure/.morph/hooks/pre-commit-agents.sh +0 -24
- package/stacks/blazor-azure/.morph/hooks/pre-commit-all.sh +0 -48
- package/stacks/blazor-azure/.morph/hooks/pre-commit-specs.sh +0 -49
- package/stacks/blazor-azure/.morph/hooks/task-completed.js +0 -73
- package/stacks/blazor-azure/.morph/hooks/teammate-idle.js +0 -68
- package/stacks/blazor-azure/.morph/schemas/agent.schema.json +0 -296
- package/stacks/blazor-azure/.morph/schemas/tasks.schema.json +0 -220
- package/stacks/blazor-azure/.morph/specs/.gitkeep +0 -20
- package/stacks/blazor-azure/.morph/standards/agent-framework-blazor-ui.md +0 -359
- package/stacks/blazor-azure/.morph/standards/agent-framework-production.md +0 -410
- package/stacks/blazor-azure/.morph/standards/agent-framework-setup.md +0 -413
- package/stacks/blazor-azure/.morph/standards/agent-framework-workflows.md +0 -349
- package/stacks/blazor-azure/.morph/standards/agent-teams-workflow.md +0 -474
- package/stacks/blazor-azure/.morph/standards/architecture.md +0 -325
- package/stacks/blazor-azure/.morph/standards/azure.md +0 -605
- package/stacks/blazor-azure/.morph/standards/coding.md +0 -377
- package/stacks/blazor-azure/.morph/standards/dotnet10-migration.md +0 -520
- package/stacks/blazor-azure/.morph/standards/fluent-ui-setup.md +0 -590
- package/stacks/blazor-azure/.morph/standards/migration-guide.md +0 -514
- package/stacks/blazor-azure/.morph/standards/passkeys-auth.md +0 -423
- package/stacks/blazor-azure/.morph/standards/vector-search-rag.md +0 -536
- package/stacks/blazor-azure/.morph/templates/CONTEXT-FEATURE.md +0 -276
- package/stacks/blazor-azure/.morph/templates/CONTEXT.md +0 -170
- package/stacks/blazor-azure/.morph/templates/FluentDesignTheme.cs +0 -149
- package/stacks/blazor-azure/.morph/templates/MudTheme.cs +0 -281
- package/stacks/blazor-azure/.morph/templates/agent.cs +0 -163
- package/stacks/blazor-azure/.morph/templates/clarify-questions.md +0 -159
- package/stacks/blazor-azure/.morph/templates/component.razor +0 -239
- package/stacks/blazor-azure/.morph/templates/contracts/Commands.cs +0 -74
- package/stacks/blazor-azure/.morph/templates/contracts/Entities.cs +0 -25
- package/stacks/blazor-azure/.morph/templates/contracts/Queries.cs +0 -74
- package/stacks/blazor-azure/.morph/templates/contracts/README.md +0 -74
- package/stacks/blazor-azure/.morph/templates/contracts.cs +0 -217
- package/stacks/blazor-azure/.morph/templates/decisions.md +0 -123
- package/stacks/blazor-azure/.morph/templates/design-system.css +0 -226
- package/stacks/blazor-azure/.morph/templates/infra/.dockerignore.example +0 -89
- package/stacks/blazor-azure/.morph/templates/infra/Dockerfile.example +0 -82
- package/stacks/blazor-azure/.morph/templates/infra/README.md +0 -286
- package/stacks/blazor-azure/.morph/templates/infra/app-insights.bicep +0 -63
- package/stacks/blazor-azure/.morph/templates/infra/app-service.bicep +0 -164
- package/stacks/blazor-azure/.morph/templates/infra/azure-pipelines-deploy.yml +0 -480
- package/stacks/blazor-azure/.morph/templates/infra/container-app-env.bicep +0 -49
- package/stacks/blazor-azure/.morph/templates/infra/container-app.bicep +0 -156
- package/stacks/blazor-azure/.morph/templates/infra/deploy-checklist.md +0 -426
- package/stacks/blazor-azure/.morph/templates/infra/deploy.ps1 +0 -229
- package/stacks/blazor-azure/.morph/templates/infra/deploy.sh +0 -208
- package/stacks/blazor-azure/.morph/templates/infra/key-vault.bicep +0 -91
- package/stacks/blazor-azure/.morph/templates/infra/main.bicep +0 -189
- package/stacks/blazor-azure/.morph/templates/infra/parameters.dev.json +0 -29
- package/stacks/blazor-azure/.morph/templates/infra/parameters.prod.json +0 -29
- package/stacks/blazor-azure/.morph/templates/infra/parameters.staging.json +0 -29
- package/stacks/blazor-azure/.morph/templates/infra/sql-database.bicep +0 -103
- package/stacks/blazor-azure/.morph/templates/infra/storage.bicep +0 -106
- package/stacks/blazor-azure/.morph/templates/integrations/asaas-client.cs +0 -387
- package/stacks/blazor-azure/.morph/templates/integrations/asaas-webhook.cs +0 -351
- package/stacks/blazor-azure/.morph/templates/integrations/azure-identity-config.cs +0 -288
- package/stacks/blazor-azure/.morph/templates/integrations/clerk-config.cs +0 -258
- package/stacks/blazor-azure/.morph/templates/job.cs +0 -171
- package/stacks/blazor-azure/.morph/templates/migration.cs +0 -83
- package/stacks/blazor-azure/.morph/templates/proposal.md +0 -141
- package/stacks/blazor-azure/.morph/templates/recap.md +0 -94
- package/stacks/blazor-azure/.morph/templates/repository.cs +0 -141
- package/stacks/blazor-azure/.morph/templates/saas/subscription.cs +0 -347
- package/stacks/blazor-azure/.morph/templates/saas/tenant.cs +0 -338
- package/stacks/blazor-azure/.morph/templates/service.cs +0 -139
- package/stacks/blazor-azure/.morph/templates/simulation.md +0 -353
- package/stacks/blazor-azure/.morph/templates/spec.md +0 -149
- package/stacks/blazor-azure/.morph/templates/sprint-status.yaml +0 -68
- package/stacks/blazor-azure/.morph/templates/state.template.json +0 -222
- package/stacks/blazor-azure/.morph/templates/story.md +0 -143
- package/stacks/blazor-azure/.morph/templates/tasks.md +0 -257
- package/stacks/blazor-azure/.morph/templates/test.cs +0 -239
- package/stacks/blazor-azure/.morph/templates/ui-components.md +0 -362
- package/stacks/blazor-azure/.morph/templates/ui-design-system.md +0 -286
- package/stacks/blazor-azure/.morph/templates/ui-flows.md +0 -336
- package/stacks/blazor-azure/.morph/templates/ui-mockups.md +0 -133
- package/stacks/blazor-azure/.morph/test-infra/example.bicep +0 -59
- package/stacks/nextjs-supabase/.claude/skills/level-2-domains/backend/dotnet-supabase.md +0 -244
- package/stacks/nextjs-supabase/.claude/skills/level-2-domains/frontend/nextjs-supabase.md +0 -335
- package/stacks/nextjs-supabase/.claude/skills/level-2-domains/infrastructure/easypanel-deployer.md +0 -189
- package/stacks/nextjs-supabase/.claude/skills/level-2-domains/integrations/supabase-expert.md +0 -170
- package/stacks/nextjs-supabase/.morph/docs/easypanel-setup.md +0 -169
- package/stacks/nextjs-supabase/.morph/docs/supabase-mcp-setup.md +0 -247
- package/stacks/nextjs-supabase/.morph/examples/crud-nextjs-supabase/README.md +0 -697
- package/stacks/nextjs-supabase/.morph/examples/crud-nextjs-supabase/spec.md +0 -85
- package/stacks/nextjs-supabase/.morph/examples/crud-nextjs-supabase/tasks.md +0 -86
- package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/README.md +0 -498
- package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/decisions.md +0 -121
- package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/spec.md +0 -138
- package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/tasks.md +0 -162
- package/stacks/nextjs-supabase/.morph/standards/easypanel-deploy.md +0 -191
- package/stacks/nextjs-supabase/.morph/standards/nextjs-patterns.md +0 -193
- package/stacks/nextjs-supabase/.morph/standards/supabase-auth.md +0 -171
- package/stacks/nextjs-supabase/.morph/standards/supabase-pgvector.md +0 -164
- package/stacks/nextjs-supabase/.morph/standards/supabase-rls.md +0 -179
- package/stacks/nextjs-supabase/.morph/standards/supabase-storage.md +0 -148
- package/stacks/nextjs-supabase/.morph/templates/contracts.cs +0 -173
- package/stacks/nextjs-supabase/.morph/templates/contracts.ts +0 -168
- package/stacks/nextjs-supabase/.morph/templates/decisions.md +0 -115
- package/stacks/nextjs-supabase/.morph/templates/dockerfile-api.dockerfile +0 -38
- package/stacks/nextjs-supabase/.morph/templates/dockerfile-web.dockerfile +0 -48
- package/stacks/nextjs-supabase/.morph/templates/proposal.md +0 -145
- package/stacks/nextjs-supabase/.morph/templates/recap.md +0 -134
- package/stacks/nextjs-supabase/.morph/templates/rls-policy.sql +0 -57
- package/stacks/nextjs-supabase/.morph/templates/spec.md +0 -231
- package/stacks/nextjs-supabase/.morph/templates/supabase-migration.sql +0 -100
- package/stacks/nextjs-supabase/.morph/templates/tasks.md +0 -257
- /package/src/commands/{search-patterns.js → learning/search-patterns.js} +0 -0
- /package/src/{lib → core/templates}/template-data-sources.js +0 -0
- /package/src/lib/{design-system-generator.js → generators/design-system-generator.js} +0 -0
- /package/src/lib/{learning-system.js → learning/learning-system.js} +0 -0
- /package/src/lib/validators/{package-validator.js → packages/package-validator.js} +0 -0
- /package/src/lib/validators/{ui-contrast-validator.js → ui/ui-contrast-validator.js} +0 -0
- /package/{src/generator → stacks/blazor-azure/.morph/templates}/.gitkeep +0 -0
- /package/{src/llm → stacks/nextjs-supabase/.morph/templates}/.gitkeep +0 -0
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
# .NET + Blazor Stack
|
|
2
|
-
|
|
3
|
-
Stack principal para aplicações web com .NET e Blazor Server.
|
|
4
|
-
|
|
5
|
-
| Aspecto | Tecnologia |
|
|
6
|
-
|---------|------------|
|
|
7
|
-
| **Backend** | .NET 10 / C# 14 |
|
|
8
|
-
| **Frontend** | Blazor Server |
|
|
9
|
-
| **Database** | EF Core 10 + Azure SQL |
|
|
10
|
-
| **Hosting** | Azure Container Apps |
|
|
11
|
-
| **Background** | Hangfire |
|
|
12
|
-
| **AI** | Microsoft Agent Framework |
|
|
13
|
-
|
|
14
|
-
**Triggers:** `blazor`, `razor`, `server-side`, `.net`, `csharp`, `dotnet`
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Critical Standards (Read FIRST)
|
|
19
|
-
|
|
20
|
-
| Standard | What |
|
|
21
|
-
|----------|------|
|
|
22
|
-
| `framework/standards/coding.md` | **C# naming conventions, code style, .editorconfig template** |
|
|
23
|
-
| `framework/standards/architecture.md` | **Clean Architecture layers, SOLID, service patterns** |
|
|
24
|
-
| `framework/standards/blazor-efcore.md` | DbContext concurrency, Repository Factory, background ops, migrations |
|
|
25
|
-
| `framework/standards/blazor-pitfalls.md` | Common Blazor issues & solutions |
|
|
26
|
-
| `framework/standards/fluent-ui-blazor.md` | Fluent UI APIs, icon sizes, dialog patterns |
|
|
27
|
-
| `framework/standards/blazor-lifecycle.md` | Component lifecycle patterns |
|
|
28
|
-
| `framework/standards/program-cs-checklist.md` | Required Program.cs setup |
|
|
29
|
-
|
|
30
|
-
### Quick Checklist
|
|
31
|
-
- [ ] Background ops: Use `IDbContextFactory` / Repository Factory (ref: blazor-efcore.md)
|
|
32
|
-
- [ ] JSRuntime: ONLY in `OnAfterRenderAsync(firstRender)`
|
|
33
|
-
- [ ] Program.cs: `UseStaticFiles()` BEFORE `UseAntiforgery()`
|
|
34
|
-
- [ ] File Upload: Specify `maxAllowedSize` in `OpenReadStream()`
|
|
35
|
-
- [ ] RenderMode: NO `@rendermode` on MainLayout
|
|
36
|
-
- [ ] Package Versions: MudBlazor >= 8.15.0 for .NET 10
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## Mandatory Code Patterns
|
|
41
|
-
|
|
42
|
-
### Status Validation
|
|
43
|
-
|
|
44
|
-
```csharp
|
|
45
|
-
// ✅ Validate INVALID states (allows future extensions)
|
|
46
|
-
if (order.Status >= OrderStatus.Completed || order.Status == OrderStatus.Failed)
|
|
47
|
-
throw new InvalidOperationException("Cannot process completed or failed order");
|
|
48
|
-
|
|
49
|
-
// ❌ Never assume single valid flow
|
|
50
|
-
if (order.Status != OrderStatus.PendingPayment)
|
|
51
|
-
throw new InvalidOperationException("Invalid status");
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Enums with Logical Order
|
|
55
|
-
|
|
56
|
-
```csharp
|
|
57
|
-
public enum OrderStatus
|
|
58
|
-
{
|
|
59
|
-
Created = 0, PendingPayment = 1, Processing = 2, Completed = 3, // Normal flow
|
|
60
|
-
Failed = 100, Cancelled = 101, Refunded = 102 // Error states (high values)
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### Service Pattern
|
|
65
|
-
|
|
66
|
-
```csharp
|
|
67
|
-
public async Task<Result<Order>> ProcessAsync(Guid orderId, CancellationToken ct)
|
|
68
|
-
{
|
|
69
|
-
_logger.LogInformation("Processing order {OrderId}", orderId);
|
|
70
|
-
var order = await _repository.GetByIdAsync(orderId, ct);
|
|
71
|
-
if (order == null) return Result.Failure<Order>("Order not found");
|
|
72
|
-
if (order.Status >= OrderStatus.Completed)
|
|
73
|
-
return Result.Failure<Order>("Order already completed");
|
|
74
|
-
// ... process ...
|
|
75
|
-
return Result.Success(order);
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
**Rules:** Logging at critical points, CancellationToken propagated, Result pattern for business errors, exceptions for infrastructure.
|
|
80
|
-
|
|
81
|
-
**More patterns:** See `code-review.md` for DTOs/contracts naming and service checklists.
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
## Project Structure
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
src/
|
|
89
|
-
├── {App}.Domain/ # Entities, Value Objects, Enums, Exceptions
|
|
90
|
-
├── {App}.Application/ # Services, DTOs, Interfaces, Validators
|
|
91
|
-
├── {App}.Infrastructure/ # EF Core (DbContext, Configs, Migrations), External Services
|
|
92
|
-
├── {App}.Web/ # Blazor Server (Program.cs, Components, Pages, wwwroot)
|
|
93
|
-
└── tests/ # UnitTests, IntegrationTests
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Program.cs Essentials
|
|
97
|
-
|
|
98
|
-
```csharp
|
|
99
|
-
var builder = WebApplication.CreateBuilder(args);
|
|
100
|
-
builder.Services.AddRazorComponents().AddInteractiveServerComponents();
|
|
101
|
-
builder.Services.AddDbContext<AppDbContext>(o => o.UseSqlServer(connString));
|
|
102
|
-
builder.Services.AddDbContextFactory<AppDbContext>(o => o.UseSqlServer(connString));
|
|
103
|
-
// Register services, factories, Hangfire...
|
|
104
|
-
|
|
105
|
-
var app = builder.Build();
|
|
106
|
-
app.UseHttpsRedirection();
|
|
107
|
-
app.UseStaticFiles(); // BEFORE UseAntiforgery!
|
|
108
|
-
app.UseAntiforgery();
|
|
109
|
-
app.MapRazorComponents<App>().AddInteractiveServerRenderMode();
|
|
110
|
-
app.Run();
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## Blazor Component Patterns
|
|
116
|
-
|
|
117
|
-
### Page with List
|
|
118
|
-
|
|
119
|
-
```razor
|
|
120
|
-
@page "/orders"
|
|
121
|
-
@inject IOrderService OrderService
|
|
122
|
-
|
|
123
|
-
@if (_orders is null) { <Loading /> }
|
|
124
|
-
else if (!_orders.Any()) { <EmptyState Message="No orders found" /> }
|
|
125
|
-
else
|
|
126
|
-
{
|
|
127
|
-
@foreach (var order in _orders)
|
|
128
|
-
{
|
|
129
|
-
<FluentCard>@order.OrderNumber - @order.Total.ToString("C")</FluentCard>
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
@code {
|
|
134
|
-
private List<OrderDto>? _orders;
|
|
135
|
-
protected override async Task OnInitializedAsync()
|
|
136
|
-
=> _orders = await OrderService.GetAllAsync();
|
|
137
|
-
}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Form with Validation
|
|
141
|
-
|
|
142
|
-
```razor
|
|
143
|
-
@page "/orders/new"
|
|
144
|
-
<EditForm Model="_model" OnValidSubmit="HandleSubmit">
|
|
145
|
-
<DataAnnotationsValidator />
|
|
146
|
-
<InputSelect @bind-Value="_model.CustomerId">...</InputSelect>
|
|
147
|
-
<ValidationMessage For="() => _model.CustomerId" />
|
|
148
|
-
<button type="submit" disabled="@_isSubmitting">Save</button>
|
|
149
|
-
</EditForm>
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## UI Libraries
|
|
155
|
-
|
|
156
|
-
> **Decision matrix:** See `ui-ux-designer.md` skill for full comparison.
|
|
157
|
-
|
|
158
|
-
| Library | When | Key Advantage |
|
|
159
|
-
|---------|------|---------------|
|
|
160
|
-
| **Fluent UI** | AI-first, Microsoft stack | Performance (~200KB), AI components |
|
|
161
|
-
| **MudBlazor** | Complex dashboards | 140+ components, charts |
|
|
162
|
-
| **Hybrid** | SaaS with AI + analytics | Best of both |
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
## .NET 10 Features
|
|
167
|
-
|
|
168
|
-
### PersistentState (new)
|
|
169
|
-
```razor
|
|
170
|
-
@code {
|
|
171
|
-
[PersistentState]
|
|
172
|
-
private int Count { get; set; } = 0; // Survives pre-rendering & circuit disconnections
|
|
173
|
-
}
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### Circuit Pause/Resume (new)
|
|
177
|
-
```javascript
|
|
178
|
-
document.addEventListener('visibilitychange', () => {
|
|
179
|
-
document.hidden ? Blazor.pauseCircuit() : Blazor.resumeCircuit();
|
|
180
|
-
});
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
### Nested Model Validation (new)
|
|
184
|
-
```csharp
|
|
185
|
-
builder.Services.AddValidation(); // Enables automatic nested model validation
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
### Blazor Metrics
|
|
189
|
-
```csharp
|
|
190
|
-
builder.Services.AddOpenTelemetry()
|
|
191
|
-
.WithTracing(t => t.AddSource("Microsoft.AspNetCore.Components.Server"))
|
|
192
|
-
.WithMetrics(m => m.AddMeter("Microsoft.AspNetCore.Components.Server"));
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
## Project Checklist
|
|
198
|
-
|
|
199
|
-
- [ ] Clean Architecture layers (Domain, Application, Infrastructure, Web)
|
|
200
|
-
- [ ] EF Core with migrations + IDbContextFactory
|
|
201
|
-
- [ ] Repository Factory for background ops (ref: blazor-efcore.md)
|
|
202
|
-
- [ ] Blazor Server with reusable components
|
|
203
|
-
- [ ] Services with DI + structured logging
|
|
204
|
-
- [ ] Validation (FluentValidation or DataAnnotations)
|
|
205
|
-
- [ ] Hangfire for background jobs
|
|
206
|
-
- [ ] Dockerfile for containerization
|
|
207
|
-
|
|
208
|
-
---
|
|
209
|
-
|
|
210
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
# .NET + Next.js Stack
|
|
2
|
-
|
|
3
|
-
> **Layer:** 2 | **Load:** on-keyword | **Keywords:** nextjs, next.js, react, api, frontend, spa, typescript
|
|
4
|
-
|
|
5
|
-
| Aspect | Technology |
|
|
6
|
-
|--------|------------|
|
|
7
|
-
| **Backend** | .NET 10 Web API / C# 14 |
|
|
8
|
-
| **Frontend** | Next.js 15+ / React 19 |
|
|
9
|
-
| **Database** | EF Core 10 + Azure SQL |
|
|
10
|
-
| **API** | REST + OpenAPI |
|
|
11
|
-
| **Hosting** | Azure Container Apps |
|
|
12
|
-
|
|
13
|
-
## Project Structure
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
/
|
|
17
|
-
├── backend/
|
|
18
|
-
│ ├── src/{Api,Application,Domain,Infrastructure}/
|
|
19
|
-
│ ├── tests/
|
|
20
|
-
│ └── Backend.sln
|
|
21
|
-
├── frontend/
|
|
22
|
-
│ ├── src/{app,components,lib,hooks}/
|
|
23
|
-
│ ├── package.json
|
|
24
|
-
│ └── next.config.js
|
|
25
|
-
├── docker-compose.yml
|
|
26
|
-
└── infra/main.bicep
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## Backend (.NET Minimal API)
|
|
32
|
-
|
|
33
|
-
```csharp
|
|
34
|
-
// Program.cs
|
|
35
|
-
var builder = WebApplication.CreateBuilder(args);
|
|
36
|
-
builder.Services.AddEndpointsApiExplorer();
|
|
37
|
-
builder.Services.AddSwaggerGen();
|
|
38
|
-
builder.Services.AddCors(o => o.AddPolicy("Frontend", p =>
|
|
39
|
-
p.WithOrigins(builder.Configuration["Frontend:Url"]!)
|
|
40
|
-
.AllowAnyHeader().AllowAnyMethod().AllowCredentials()));
|
|
41
|
-
builder.Services.AddDbContext<AppDbContext>(o => o.UseSqlServer(connString));
|
|
42
|
-
|
|
43
|
-
var app = builder.Build();
|
|
44
|
-
if (app.Environment.IsDevelopment()) { app.UseSwagger(); app.UseSwaggerUI(); }
|
|
45
|
-
app.UseCors("Frontend");
|
|
46
|
-
app.UseAuthentication();
|
|
47
|
-
app.UseAuthorization();
|
|
48
|
-
app.MapOrderEndpoints();
|
|
49
|
-
app.Run();
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Minimal API Endpoints
|
|
53
|
-
|
|
54
|
-
```csharp
|
|
55
|
-
public static class OrderEndpoints
|
|
56
|
-
{
|
|
57
|
-
public static void MapOrderEndpoints(this WebApplication app)
|
|
58
|
-
{
|
|
59
|
-
var group = app.MapGroup("/api/orders").WithTags("Orders").RequireAuthorization();
|
|
60
|
-
group.MapGet("/", GetAll);
|
|
61
|
-
group.MapGet("/{id:int}", GetById);
|
|
62
|
-
group.MapPost("/", Create);
|
|
63
|
-
group.MapPut("/{id:int}", Update);
|
|
64
|
-
group.MapDelete("/{id:int}", Delete);
|
|
65
|
-
}
|
|
66
|
-
// Each handler: inject IService + params → return Results.Ok/NotFound/Created/NoContent
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## Frontend (Next.js)
|
|
73
|
-
|
|
74
|
-
### API Client
|
|
75
|
-
|
|
76
|
-
```typescript
|
|
77
|
-
const API_URL = process.env.NEXT_PUBLIC_API_URL!;
|
|
78
|
-
|
|
79
|
-
async function fetchApi<T>(endpoint: string, options?: RequestInit): Promise<T> {
|
|
80
|
-
const res = await fetch(`${API_URL}${endpoint}`, {
|
|
81
|
-
...options,
|
|
82
|
-
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
83
|
-
credentials: 'include',
|
|
84
|
-
});
|
|
85
|
-
if (!res.ok) throw new Error(`API error: ${res.status}`);
|
|
86
|
-
return res.json();
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export const api = {
|
|
90
|
-
orders: {
|
|
91
|
-
getAll: (params?) => fetchApi<PaginatedResult<Order>>(`/api/orders?${new URLSearchParams(params)}`),
|
|
92
|
-
getById: (id: number) => fetchApi<Order>(`/api/orders/${id}`),
|
|
93
|
-
create: (data) => fetchApi<Order>('/api/orders', { method: 'POST', body: JSON.stringify(data) }),
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### Types (generated from OpenAPI)
|
|
99
|
-
|
|
100
|
-
```typescript
|
|
101
|
-
export interface Order { id: number; orderNumber: string; total: number; status: OrderStatus; }
|
|
102
|
-
export type OrderStatus = 'Pending' | 'Processing' | 'Completed' | 'Cancelled';
|
|
103
|
-
export interface PaginatedResult<T> { items: T[]; totalCount: number; page: number; totalPages: number; }
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### Server Component (App Router)
|
|
107
|
-
```tsx
|
|
108
|
-
export default async function OrdersPage() {
|
|
109
|
-
const orders = await api.orders.getAll();
|
|
110
|
-
return <OrderList initialOrders={orders} />;
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### Client Component
|
|
115
|
-
```tsx
|
|
116
|
-
'use client';
|
|
117
|
-
// Use useState + api calls for client-side pagination/interaction
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
## Docker Compose
|
|
123
|
-
|
|
124
|
-
```yaml
|
|
125
|
-
services:
|
|
126
|
-
backend:
|
|
127
|
-
build: { context: ./backend }
|
|
128
|
-
ports: ["5000:8080"]
|
|
129
|
-
environment:
|
|
130
|
-
- ConnectionStrings__Default=Server=db;Database=App;User=sa;Password=Pass!;TrustServerCertificate=true
|
|
131
|
-
- Frontend__Url=http://localhost:3000
|
|
132
|
-
frontend:
|
|
133
|
-
build: { context: ./frontend }
|
|
134
|
-
ports: ["3000:3000"]
|
|
135
|
-
environment: [NEXT_PUBLIC_API_URL=http://localhost:5000]
|
|
136
|
-
db:
|
|
137
|
-
image: mcr.microsoft.com/mssql/server:2022-latest
|
|
138
|
-
environment: [ACCEPT_EULA=Y, SA_PASSWORD=YourStrong!Passw0rd]
|
|
139
|
-
ports: ["1433:1433"]
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
## Checklist
|
|
143
|
-
- [ ] Backend with Minimal APIs
|
|
144
|
-
- [ ] OpenAPI/Swagger configured
|
|
145
|
-
- [ ] CORS configured for frontend
|
|
146
|
-
- [ ] Frontend with App Router (Next.js 15+)
|
|
147
|
-
- [ ] API client typed
|
|
148
|
-
- [ ] Types generated from OpenAPI
|
|
149
|
-
- [ ] Docker Compose for dev
|
|
150
|
-
- [ ] Environment variables configured
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
# UI/UX Designer
|
|
2
|
-
|
|
3
|
-
Especialista em design de interfaces, UX e componentes Blazor. Domina **Fluent UI Blazor** e **MudBlazor**.
|
|
4
|
-
|
|
5
|
-
> **FASE 1.5: UI/UX DESIGN** - Obrigatória para features com front-end.
|
|
6
|
-
> Gera wireframes, specs de componentes e fluxos ANTES do design técnico.
|
|
7
|
-
> **Ref:** `framework/standards/fluent-ui-blazor.md` para API details e armadilhas.
|
|
8
|
-
|
|
9
|
-
## Triggers
|
|
10
|
-
|
|
11
|
-
Keywords: `blazor`, `component`, `page`, `ui`, `ux`, `design`, `layout`, `wizard`, `dashboard`, `form`, `chart`, `table`, `dialog`, `modal`, `tela`, `interface`, `formulário`
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Design Moderno (2025+)
|
|
16
|
-
|
|
17
|
-
### Visual Trends
|
|
18
|
-
- **Glassmorphism**: `backdrop-filter: blur(10px)`, semi-transparent backgrounds
|
|
19
|
-
- **Gradients**: Purple (#667eea → #764ba2), Blue-Purple (#4facfe → #00f2fe)
|
|
20
|
-
- **Soft Shadows**: `box-shadow: 0 4px 6px rgba(0,0,0,0.1)`
|
|
21
|
-
- **Rounded Corners**: `border-radius: 12px-16px`
|
|
22
|
-
- **Micro-interactions**: Hover effects, transitions (transform, scale, opacity)
|
|
23
|
-
|
|
24
|
-
### Component Patterns
|
|
25
|
-
- Cards with elevation + hover lift
|
|
26
|
-
- Skeleton loaders (not just spinners)
|
|
27
|
-
- Toast notifications (bottom-right, auto-dismiss)
|
|
28
|
-
- Empty states with illustration + CTA
|
|
29
|
-
- Dark mode support (always design for both)
|
|
30
|
-
|
|
31
|
-
### Layout Principles
|
|
32
|
-
- Whitespace: 32px-48px container padding
|
|
33
|
-
- Grid: 12-column, gap 24px-32px
|
|
34
|
-
- Typography: xs:12, sm:14, base:16, lg:18, xl:20, 2xl:24
|
|
35
|
-
- Contrast: WCAG AA (4.5:1 text, 3:1 UI)
|
|
36
|
-
|
|
37
|
-
### Design References
|
|
38
|
-
Linear (linear.app), Vercel (vercel.com), Stripe (stripe.com), Dribbble dashboards
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## FASE 1.5 Workflow
|
|
43
|
-
|
|
44
|
-
### Step 1: Collect User Input (ALWAYS ask first)
|
|
45
|
-
|
|
46
|
-
1. Layout ideas or reference sites?
|
|
47
|
-
2. Visual references (screenshots, mockups)?
|
|
48
|
-
3. User flow expectations?
|
|
49
|
-
4. Design system defined (colors, fonts, spacing)?
|
|
50
|
-
5. Image examples to analyze?
|
|
51
|
-
|
|
52
|
-
If user provides screenshots → Read tool → extract patterns (layout, components, colors).
|
|
53
|
-
If HTML prototype exists → extract patterns automatically, skip wireframes, map HTML → Blazor.
|
|
54
|
-
|
|
55
|
-
### Step 2: Generate Deliverables
|
|
56
|
-
|
|
57
|
-
| File | Content |
|
|
58
|
-
|------|---------|
|
|
59
|
-
| `ui-design-system.md` | Colors, typography, spacing |
|
|
60
|
-
| `ui-mockups.md` | ASCII wireframes + descriptions per screen |
|
|
61
|
-
| `ui-components.md` | Component specs (library-agnostic first, library choice in FASE 2) |
|
|
62
|
-
| `ui-flows.md` | User flow diagrams + edge cases |
|
|
63
|
-
|
|
64
|
-
**Important:** Generate specs AGNOSTIC of UI library. Use generic names ("primary button", "card", "table"). Library choice happens in FASE 2: DESIGN.
|
|
65
|
-
|
|
66
|
-
### Step 3: Present for Approval
|
|
67
|
-
|
|
68
|
-
Show deliverable summary → **⛔ PAUSE** with 3 options (approve / adjust wireframes / add flows).
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## Fluent UI vs MudBlazor Decision Matrix
|
|
73
|
-
|
|
74
|
-
| Criterion | Fluent UI Blazor | MudBlazor |
|
|
75
|
-
|-----------|------------------|-----------|
|
|
76
|
-
| AI-first projects | Ideal (native components) | Requires customization |
|
|
77
|
-
| Performance | ~200KB | ~500KB |
|
|
78
|
-
| Microsoft Stack | Perfect integration | Works well |
|
|
79
|
-
| Complex components | Limited | Very complete |
|
|
80
|
-
| Community | Smaller (newer) | Larger |
|
|
81
|
-
| Maturity | v4.0 (recent) | v6.x (stable) |
|
|
82
|
-
|
|
83
|
-
**Use Fluent UI if:** AI-first, Microsoft stack, modern M365 design, performance critical.
|
|
84
|
-
**Use MudBlazor if:** Complex dashboards, Material Design, need TreeView/advanced DataGrid, larger community.
|
|
85
|
-
**Hybrid:** Fluent UI (base) + MudBlazor (specific complex components).
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## Fluent UI Quick Reference
|
|
90
|
-
|
|
91
|
-
> **Full details:** `framework/standards/fluent-ui-blazor.md`
|
|
92
|
-
|
|
93
|
-
### Common Pitfalls
|
|
94
|
-
|
|
95
|
-
| Issue | Wrong | Correct |
|
|
96
|
-
|-------|-------|---------|
|
|
97
|
-
| Icon sizes | `Size16`, `Size14` | `Size20`, `Size24`, `Size28`, `Size32`, `Size48` |
|
|
98
|
-
| Icon namespace | `@using ...Icons` | `@using Icons = Microsoft.FluentUI.AspNetCore.Components.Icons` |
|
|
99
|
-
| Toast methods | `await ShowSuccessAsync()` | `ToastService.ShowSuccess()` (sync!) |
|
|
100
|
-
| Dialog show | `await _dialog.ShowAsync()` | `_dialog.Show()` (sync!) |
|
|
101
|
-
| Dialog close | `_dialog.Hide()` | `await _dialog.CloseAsync()` (async!) |
|
|
102
|
-
| Dialog init | `<FluentDialog>` | `<FluentDialog Hidden="true">` (must hide initially!) |
|
|
103
|
-
|
|
104
|
-
### Key Components
|
|
105
|
-
|
|
106
|
-
| Component | Use Case |
|
|
107
|
-
|-----------|----------|
|
|
108
|
-
| `FluentCard` + `FluentStack` | Containers, dashboards |
|
|
109
|
-
| `FluentDataGrid` | Data tables with sorting |
|
|
110
|
-
| `FluentWizard` | Multi-step flows |
|
|
111
|
-
| `FluentDialog` | Modals, confirmations |
|
|
112
|
-
| `FluentMessageBar` | Chat, notifications |
|
|
113
|
-
| `FluentProgress` | Loading, streaming |
|
|
114
|
-
| `FluentTextField` | Text inputs |
|
|
115
|
-
| `FluentToast` | System feedback |
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## MudBlazor Key Components
|
|
120
|
-
|
|
121
|
-
| Component | Advantage over Fluent |
|
|
122
|
-
|-----------|----------------------|
|
|
123
|
-
| `MudDataGrid` | Grouping, advanced filtering |
|
|
124
|
-
| `MudTreeView` | More complete hierarchies |
|
|
125
|
-
| `MudChart` | Native charts (Fluent has none) |
|
|
126
|
-
| `MudFileUpload` | More upload features |
|
|
127
|
-
| `MudAutocomplete` | Better performance |
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## Design System Defaults
|
|
132
|
-
|
|
133
|
-
```css
|
|
134
|
-
/* Colors */
|
|
135
|
-
--primary: #3b82f6; --secondary: #6b7280;
|
|
136
|
-
--success: #10b981; --warning: #f59e0b;
|
|
137
|
-
--danger: #ef4444; --info: #06b6d4;
|
|
138
|
-
|
|
139
|
-
/* Spacing (4px system) */
|
|
140
|
-
--space-1: 0.25rem; --space-2: 0.5rem; --space-4: 1rem;
|
|
141
|
-
--space-6: 1.5rem; --space-8: 2rem;
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## Generating Deliverables
|
|
147
|
-
|
|
148
|
-
### ui-mockups.md Structure
|
|
149
|
-
|
|
150
|
-
Per screen: ASCII wireframe + description (purpose, components, interactions, states) + responsiveness (desktop/mobile).
|
|
151
|
-
|
|
152
|
-
### ui-components.md Structure
|
|
153
|
-
|
|
154
|
-
Per component: Library, component name, main props, events, states (default/loading/error/empty), accessibility (ARIA, keyboard).
|
|
155
|
-
|
|
156
|
-
### ui-flows.md Structure
|
|
157
|
-
|
|
158
|
-
Per flow: Trigger, steps, happy path, edge cases, ASCII flowchart diagram.
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
## Accessibility (A11y)
|
|
163
|
-
|
|
164
|
-
- Contrast: 4.5:1 text minimum (WCAG AA)
|
|
165
|
-
- Focus visible: Outline on focusable elements
|
|
166
|
-
- Labels: Every input with associated label
|
|
167
|
-
- ARIA: Roles and labels where needed
|
|
168
|
-
- Keyboard nav: Logical tab order
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
## Checklist
|
|
173
|
-
|
|
174
|
-
### FASE 1.5 Deliverables
|
|
175
|
-
- [ ] `ui-mockups.md`: Wireframes for ALL screens + states (loading, error, empty) + responsiveness
|
|
176
|
-
- [ ] `ui-components.md`: Library justified + all components mapped with props/events/states
|
|
177
|
-
- [ ] `ui-flows.md`: Happy paths + edge cases + ASCII diagrams
|
|
178
|
-
- [ ] `decisions.md`: Updated with UI library ADR
|
|
179
|
-
|
|
180
|
-
### UI Quality
|
|
181
|
-
- [ ] Visual hierarchy clear
|
|
182
|
-
- [ ] Consistent spacing (4px multiples)
|
|
183
|
-
- [ ] Responsive (mobile-first)
|
|
184
|
-
- [ ] States: hover, focus, disabled, error
|
|
185
|
-
- [ ] Loading states (skeleton/spinner)
|
|
186
|
-
- [ ] Empty states with CTA
|
|
187
|
-
- [ ] WCAG AA accessibility
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
*MORPH-SPEC by Polymorphism Tech*
|
package/stacks/blazor-azure/.claude/skills/level-2-domains/infrastructure/azure-architect.md
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
# Azure Architect
|
|
2
|
-
|
|
3
|
-
Especialista em infraestrutura Azure com foco em Infrastructure as Code (Bicep).
|
|
4
|
-
|
|
5
|
-
## Responsabilidades
|
|
6
|
-
|
|
7
|
-
1. **Desenhar infraestrutura Azure** para projetos
|
|
8
|
-
2. **Criar templates Bicep** para provisionar recursos
|
|
9
|
-
3. **Estimar custos** antes de aprovar recursos
|
|
10
|
-
4. **Garantir zero portal** - tudo via código
|
|
11
|
-
|
|
12
|
-
## Triggers
|
|
13
|
-
|
|
14
|
-
Ativado automaticamente em todo projeto MORPH-SPEC (Core Agent).
|
|
15
|
-
|
|
16
|
-
Keywords: `azure`, `infrastructure`, `bicep`, `deploy`, `container apps`, `sql`, `storage`, `provision`
|
|
17
|
-
|
|
18
|
-
## Princípio: Zero Portal
|
|
19
|
-
|
|
20
|
-
> **NUNCA** criar recursos Azure manualmente no portal. Tudo via Bicep.
|
|
21
|
-
|
|
22
|
-
## Estrutura IaC
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
infra/
|
|
26
|
-
├── main.bicep # Entry point
|
|
27
|
-
├── parameters.dev.json # Ambiente dev
|
|
28
|
-
├── parameters.prod.json # Ambiente prod
|
|
29
|
-
└── modules/
|
|
30
|
-
├── container-app.bicep # Container Apps
|
|
31
|
-
├── sql-database.bicep # Azure SQL
|
|
32
|
-
├── storage.bicep # Storage Account
|
|
33
|
-
├── key-vault.bicep # Key Vault
|
|
34
|
-
├── app-insights.bicep # Monitoring
|
|
35
|
-
└── service-bus.bicep # Mensageria
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Template Bicep Base
|
|
39
|
-
|
|
40
|
-
```bicep
|
|
41
|
-
// infra/main.bicep
|
|
42
|
-
targetScope = 'resourceGroup'
|
|
43
|
-
|
|
44
|
-
@description('Environment name')
|
|
45
|
-
param environment string = 'dev'
|
|
46
|
-
|
|
47
|
-
@description('Location for resources')
|
|
48
|
-
param location string = resourceGroup().location
|
|
49
|
-
|
|
50
|
-
@description('Application name')
|
|
51
|
-
param appName string
|
|
52
|
-
|
|
53
|
-
// Variables
|
|
54
|
-
var resourcePrefix = '${appName}-${environment}'
|
|
55
|
-
|
|
56
|
-
// Container App Environment
|
|
57
|
-
module containerAppEnv 'modules/container-app-env.bicep' = {
|
|
58
|
-
name: 'containerAppEnv'
|
|
59
|
-
params: {
|
|
60
|
-
name: '${resourcePrefix}-env'
|
|
61
|
-
location: location
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Container App
|
|
66
|
-
module containerApp 'modules/container-app.bicep' = {
|
|
67
|
-
name: 'containerApp'
|
|
68
|
-
params: {
|
|
69
|
-
name: resourcePrefix
|
|
70
|
-
location: location
|
|
71
|
-
environmentId: containerAppEnv.outputs.id
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Recursos Recomendados por Tier
|
|
77
|
-
|
|
78
|
-
### Free Tier (Sem aprovação)
|
|
79
|
-
|
|
80
|
-
| Recurso | Config | Custo |
|
|
81
|
-
|---------|--------|-------|
|
|
82
|
-
| Azure SQL | Free 32GB | $0 |
|
|
83
|
-
| Container Apps | Scale to zero | ~$0 |
|
|
84
|
-
| Storage | LRS 5GB | ~$0 |
|
|
85
|
-
| App Insights | Free tier | $0 |
|
|
86
|
-
|
|
87
|
-
### Basic Tier (Até $10/mês)
|
|
88
|
-
|
|
89
|
-
| Recurso | Config | Custo |
|
|
90
|
-
|---------|--------|-------|
|
|
91
|
-
| Azure SQL | Basic DTU | ~$5 |
|
|
92
|
-
| Service Bus | Basic | ~$0.05 |
|
|
93
|
-
| Key Vault | Standard | ~$0.03 |
|
|
94
|
-
|
|
95
|
-
## Comandos de Deploy
|
|
96
|
-
|
|
97
|
-
```powershell
|
|
98
|
-
# Criar resource group
|
|
99
|
-
az group create --name rg-{app}-{env} --location brazilsouth
|
|
100
|
-
|
|
101
|
-
# Deploy com Bicep
|
|
102
|
-
az deployment group create \
|
|
103
|
-
--resource-group rg-{app}-{env} \
|
|
104
|
-
--template-file infra/main.bicep \
|
|
105
|
-
--parameters @infra/parameters.{env}.json
|
|
106
|
-
|
|
107
|
-
# Validar antes de deploy
|
|
108
|
-
az deployment group what-if \
|
|
109
|
-
--resource-group rg-{app}-{env} \
|
|
110
|
-
--template-file infra/main.bicep \
|
|
111
|
-
--parameters @infra/parameters.{env}.json
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## Quando usar SDK .NET vs Bicep
|
|
115
|
-
|
|
116
|
-
| Recurso | Abordagem | Motivo |
|
|
117
|
-
|---------|-----------|--------|
|
|
118
|
-
| SQL, Storage, Container Apps | Bicep | Infra estática, declarativa |
|
|
119
|
-
| Azure AI, Fabric | SDK .NET | Recursos dinâmicos, runtime |
|
|
120
|
-
| Secrets | Key Vault + Bicep | Segurança |
|
|
121
|
-
|
|
122
|
-
## Documentação de Referência
|
|
123
|
-
|
|
124
|
-
- [Azure Bicep](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/)
|
|
125
|
-
- [Container Apps](https://learn.microsoft.com/en-us/azure/container-apps/)
|
|
126
|
-
- [Azure SQL](https://learn.microsoft.com/en-us/azure/azure-sql/)
|
|
127
|
-
- [Azure SDK for .NET](https://learn.microsoft.com/en-us/dotnet/azure/)
|
|
128
|
-
- [Pricing Calculator](https://azure.microsoft.com/en-us/pricing/calculator/)
|
|
129
|
-
|
|
130
|
-
## Checklist de Infraestrutura
|
|
131
|
-
|
|
132
|
-
- [ ] Bicep válido (`az bicep build`)
|
|
133
|
-
- [ ] Parâmetros para dev e prod
|
|
134
|
-
- [ ] Custos estimados e documentados
|
|
135
|
-
- [ ] Secrets no Key Vault (não hardcoded)
|
|
136
|
-
- [ ] Logs configurados (App Insights)
|
|
137
|
-
- [ ] Scale-to-zero onde possível
|
|
138
|
-
- [ ] Naming convention consistente
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
*MORPH-SPEC by Polymorphism Tech*
|