@polymorphism-tech/morph-spec 4.6.0 → 4.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +414 -700
- package/docs/ARCHITECTURE.md +331 -0
- package/docs/CHEATSHEET.md +221 -0
- package/docs/COMMAND-FLOWS.md +368 -0
- package/docs/QUICKSTART.md +212 -0
- package/docs/examples/order-management/contracts.cs +84 -0
- package/docs/examples/order-management/proposal.md +24 -0
- package/docs/examples/order-management/spec.md +162 -0
- package/docs/plans/2026-02-23-ddd-architecture-refactor.md +1153 -0
- package/docs/plans/2026-02-23-ddd-nextsteps.md +682 -0
- package/docs/plans/2026-02-23-infra-architect-refactor.md +437 -0
- package/docs/plans/2026-02-23-nextjs-code-review-design.md +156 -0
- package/docs/plans/2026-02-23-nextjs-code-review-impl.md +1254 -0
- package/docs/plans/2026-02-23-nextjs-standards-design.md +149 -0
- package/docs/plans/2026-02-23-nextjs-standards-impl.md +1846 -0
- package/framework/agents/README.md +14 -14
- package/framework/agents/architecture/standards-architect.md +159 -159
- package/framework/agents/frontend/nextjs-expert.md +87 -127
- package/framework/agents/infrastructure/azure-architect.md +147 -147
- package/framework/agents/infrastructure/infra-architect.md +45 -0
- package/framework/agents.json +1145 -278
- package/framework/rules/frontend-standards.md +0 -3
- package/framework/rules/nextjs-standards.md +17 -0
- package/framework/skills/level-0-meta/code-review-nextjs/SKILL.md +147 -0
- package/framework/skills/level-0-meta/code-review-nextjs/references/review-example-nextjs.md +254 -0
- package/framework/skills/level-0-meta/tool-usage-guide/SKILL.md +3 -3
- package/framework/skills/level-1-workflows/phase-design/SKILL.md +45 -9
- package/framework/skills/level-1-workflows/phase-tasks/SKILL.md +38 -0
- package/framework/standards/STANDARDS.json +121 -0
- package/framework/standards/architecture/ddd/bounded-contexts.md +105 -0
- package/framework/standards/architecture/ddd/complexity-levels.md +108 -0
- package/framework/standards/architecture/ddd/ubiquitous-language.md +58 -0
- package/framework/standards/frontend/nextjs/app-router.md +123 -0
- package/framework/standards/frontend/nextjs/components.md +132 -0
- package/framework/standards/frontend/nextjs/data-fetching.md +126 -0
- package/framework/standards/frontend/nextjs/forms.md +128 -0
- package/framework/standards/frontend/nextjs/naming-conventions.md +67 -0
- package/framework/standards/frontend/nextjs/project-structure.md +102 -0
- package/framework/standards/frontend/nextjs/state-management.md +72 -0
- package/framework/standards/frontend/nextjs/testing.md +111 -0
- package/framework/templates/REGISTRY.json +538 -142
- package/framework/templates/code/dotnet/contracts/contracts-level1.cs +69 -0
- package/framework/templates/code/dotnet/contracts/contracts-level2.cs +86 -0
- package/framework/templates/code/dotnet/contracts/contracts-level3.cs +41 -0
- package/framework/templates/docs/spec.md +49 -0
- package/framework/templates/frontend/nextjs/Dockerfile.nextjs.hbs +43 -0
- package/framework/templates/frontend/nextjs/client-component.tsx.hbs +26 -0
- package/framework/templates/frontend/nextjs/env.mjs.hbs +32 -0
- package/framework/templates/frontend/nextjs/feature-form.tsx.hbs +56 -0
- package/framework/templates/frontend/nextjs/page.tsx.hbs +22 -0
- package/framework/templates/frontend/nextjs/tsconfig.json.hbs +26 -0
- package/framework/templates/frontend/nextjs/use-feature.ts.hbs +54 -0
- package/framework/templates/project-structure/dotnet-ddd.md +70 -0
- package/framework/workflows/docs/enforcement-pipeline.md +2 -1
- package/package.json +1 -1
- package/scripts/scan-nextjs.mjs +169 -0
- package/src/commands/project/doctor.js +52 -1
- package/src/commands/project/init.js +15 -1
- package/src/commands/project/update.js +6 -1
- package/src/lib/standards/standards-context-injector.js +5 -0
- package/src/lib/validators/nextjs/index.js +6 -0
- package/src/lib/validators/nextjs/next-component-validator.js +181 -0
- package/src/lib/validators/validation-runner.js +5 -0
- package/src/utils/agents-installer.js +14 -2
- package/.morph/.morphversion +0 -5
- package/.morph/analytics/threads-log.jsonl +0 -6
- package/.morph/config/config.json +0 -8
- package/.morph/framework/agents.json +0 -948
- package/.morph/framework/standards/STANDARDS.json +0 -812
- package/.morph/framework/standards/ai-agents/blazor-ui.md +0 -364
- package/.morph/framework/standards/ai-agents/production.md +0 -415
- package/.morph/framework/standards/ai-agents/setup.md +0 -418
- package/.morph/framework/standards/ai-agents/team-orchestration.md +0 -479
- package/.morph/framework/standards/ai-agents/workflows.md +0 -354
- package/.morph/framework/standards/architecture/ddd/aggregates.md +0 -120
- package/.morph/framework/standards/architecture/ddd/entities.md +0 -99
- package/.morph/framework/standards/architecture/ddd/value-objects.md +0 -124
- package/.morph/framework/standards/backend/api/minimal-api.md +0 -494
- package/.morph/framework/standards/backend/api/rest.md +0 -492
- package/.morph/framework/standards/backend/api/validation.md +0 -88
- package/.morph/framework/standards/backend/authentication/passkeys.md +0 -428
- package/.morph/framework/standards/backend/database/ef-core.md +0 -199
- package/.morph/framework/standards/backend/database/migrations.md +0 -393
- package/.morph/framework/standards/backend/database/postgresql/database.md +0 -352
- package/.morph/framework/standards/backend/database/repository-patterns.md +0 -528
- package/.morph/framework/standards/backend/database/vector-search-rag.md +0 -541
- package/.morph/framework/standards/backend/dotnet/async.md +0 -366
- package/.morph/framework/standards/backend/dotnet/core.md +0 -117
- package/.morph/framework/standards/backend/dotnet/di.md +0 -439
- package/.morph/framework/standards/backend/dotnet/program-cs-checklist.md +0 -92
- package/.morph/framework/standards/backend/integrations/asaas/asaas-api.md +0 -216
- package/.morph/framework/standards/backend/integrations/clerk/clerk-auth.md +0 -290
- package/.morph/framework/standards/backend/integrations/hangfire/hangfire-jobs.md +0 -350
- package/.morph/framework/standards/backend/integrations/resend/resend-email.md +0 -385
- package/.morph/framework/standards/context/analytics.md +0 -96
- package/.morph/framework/standards/context/bundles.md +0 -110
- package/.morph/framework/standards/context/priming.md +0 -78
- package/.morph/framework/standards/core/architecture.md +0 -185
- package/.morph/framework/standards/core/coding.md +0 -214
- package/.morph/framework/standards/core/git-branching-strategy.md +0 -403
- package/.morph/framework/standards/core/git.md +0 -185
- package/.morph/framework/standards/core/testing.md +0 -295
- package/.morph/framework/standards/data/nosql/blob-storage.md +0 -102
- package/.morph/framework/standards/data/nosql/cache/redis.md +0 -97
- package/.morph/framework/standards/data/nosql/cosmos-db.md +0 -118
- package/.morph/framework/standards/data/vector-search/azure-ai-search.md +0 -121
- package/.morph/framework/standards/data/vector-search/rag-chunking.md +0 -104
- package/.morph/framework/standards/frontend/blazor/design-checklist.md +0 -222
- package/.morph/framework/standards/frontend/blazor/fluent-ui-setup.md +0 -595
- package/.morph/framework/standards/frontend/blazor/fluent-ui.md +0 -137
- package/.morph/framework/standards/frontend/blazor/html-conversion.md +0 -184
- package/.morph/framework/standards/frontend/blazor/lifecycle.md +0 -195
- package/.morph/framework/standards/frontend/blazor/pitfalls.md +0 -198
- package/.morph/framework/standards/frontend/blazor/state.md +0 -191
- package/.morph/framework/standards/frontend/design-system/animations.md +0 -151
- package/.morph/framework/standards/frontend/design-system/naming.md +0 -64
- package/.morph/framework/standards/frontend/nextjs/nextjs-patterns.md +0 -215
- package/.morph/framework/standards/infrastructure/azure/azure.md +0 -624
- package/.morph/framework/standards/infrastructure/azure/bicep/bicep-patterns.md +0 -422
- package/.morph/framework/standards/infrastructure/azure/devops/azure-devops-setup.md +0 -516
- package/.morph/framework/standards/infrastructure/azure/devops/local-development.md +0 -520
- package/.morph/framework/standards/infrastructure/azure/services/functions.md +0 -486
- package/.morph/framework/standards/infrastructure/azure/services/service-bus.md +0 -459
- package/.morph/framework/standards/infrastructure/azure/services/storage.md +0 -407
- package/.morph/framework/standards/infrastructure/docker/easypanel-deploy.md +0 -196
- package/.morph/framework/standards/infrastructure/supabase/mcp-setup.md +0 -252
- package/.morph/framework/standards/infrastructure/supabase/supabase-auth.md +0 -176
- package/.morph/framework/standards/infrastructure/supabase/supabase-pgvector.md +0 -169
- package/.morph/framework/standards/infrastructure/supabase/supabase-rls.md +0 -184
- package/.morph/framework/standards/infrastructure/supabase/supabase-storage.md +0 -153
- package/.morph/framework/standards/integration/api/graphql.md +0 -91
- package/.morph/framework/standards/integration/api/grpc.md +0 -114
- package/.morph/framework/standards/integration/api/rest-design.md +0 -95
- package/.morph/framework/standards/integration/event-driven/cqrs.md +0 -101
- package/.morph/framework/standards/integration/event-driven/event-sourcing.md +0 -124
- package/.morph/framework/standards/integration/event-driven/service-bus.md +0 -95
- package/.morph/framework/standards/integration/mcp/mcp-tools.md +0 -384
- package/.morph/framework/standards/observability/logging.md +0 -131
- package/.morph/framework/standards/observability/metrics.md +0 -121
- package/.morph/framework/standards/observability/monitoring.md +0 -114
- package/.morph/framework/standards/observability/tracing.md +0 -132
- package/.morph/framework/standards/workflows/parallel-execution.md +0 -112
- package/.morph/framework/standards/workflows/thread-management.md +0 -113
- package/.morph/framework/templates/.idea/morph-templates.xml +0 -92
- package/.morph/framework/templates/.vscode/morph-templates.code-snippets +0 -186
- package/.morph/framework/templates/IDE-SNIPPETS.md +0 -266
- package/.morph/framework/templates/README.md +0 -814
- package/.morph/framework/templates/REGISTRY.json +0 -1492
- package/.morph/framework/templates/code/dotnet/backend/repository.cs +0 -141
- package/.morph/framework/templates/code/dotnet/backend/service.cs +0 -139
- package/.morph/framework/templates/code/dotnet/contracts/Commands.cs +0 -74
- package/.morph/framework/templates/code/dotnet/contracts/Entities.cs +0 -25
- package/.morph/framework/templates/code/dotnet/contracts/Queries.cs +0 -74
- package/.morph/framework/templates/code/dotnet/contracts/README.md +0 -74
- package/.morph/framework/templates/code/dotnet/contracts/api-contracts.cs +0 -173
- package/.morph/framework/templates/code/dotnet/contracts/contracts.cs +0 -217
- package/.morph/framework/templates/code/dotnet/contracts/contracts.cs.hbs +0 -172
- package/.morph/framework/templates/code/dotnet/database/migration.cs +0 -83
- package/.morph/framework/templates/code/dotnet/frontend/component.razor +0 -239
- package/.morph/framework/templates/code/dotnet/jobs/agent.cs +0 -163
- package/.morph/framework/templates/code/dotnet/jobs/job.cs +0 -171
- package/.morph/framework/templates/code/dotnet/test.cs +0 -239
- package/.morph/framework/templates/code/sql/rls-policy.sql +0 -57
- package/.morph/framework/templates/code/sql/supabase-migration.sql +0 -100
- package/.morph/framework/templates/code/sql/supabase-migration.template.sql +0 -113
- package/.morph/framework/templates/code/typescript/contracts.ts +0 -168
- package/.morph/framework/templates/context/CONTEXT-FEATURE.md +0 -276
- package/.morph/framework/templates/context/CONTEXT.md +0 -181
- package/.morph/framework/templates/docs/clarifications.md +0 -253
- package/.morph/framework/templates/docs/onboarding.md +0 -123
- package/.morph/framework/templates/docs/proposal.md +0 -182
- package/.morph/framework/templates/docs/schema-analysis.md +0 -119
- package/.morph/framework/templates/docs/spec.md +0 -149
- package/.morph/framework/templates/docs/ui-components.md +0 -124
- package/.morph/framework/templates/docs/ui-design-system.md +0 -76
- package/.morph/framework/templates/docs/ui-flows.md +0 -167
- package/.morph/framework/templates/docs/ui-mockups.md +0 -98
- package/.morph/framework/templates/docs/user-stories.md +0 -34
- package/.morph/framework/templates/examples/design-system-examples.md +0 -357
- package/.morph/framework/templates/examples/spec-examples.md +0 -90
- package/.morph/framework/templates/feature/decisions.md +0 -187
- package/.morph/framework/templates/feature/recap.md +0 -146
- package/.morph/framework/templates/feature/tasks.md +0 -199
- package/.morph/framework/templates/infrastructure/azure/Dockerfile.example +0 -82
- package/.morph/framework/templates/infrastructure/azure/README.md +0 -286
- package/.morph/framework/templates/infrastructure/azure/app-insights.bicep +0 -63
- package/.morph/framework/templates/infrastructure/azure/app-service.bicep +0 -164
- package/.morph/framework/templates/infrastructure/azure/container-app-env.bicep +0 -49
- package/.morph/framework/templates/infrastructure/azure/container-app.bicep +0 -156
- package/.morph/framework/templates/infrastructure/azure/deploy-checklist.md +0 -426
- package/.morph/framework/templates/infrastructure/azure/deploy.ps1 +0 -229
- package/.morph/framework/templates/infrastructure/azure/deploy.sh +0 -208
- package/.morph/framework/templates/infrastructure/azure/key-vault.bicep +0 -91
- package/.morph/framework/templates/infrastructure/azure/main.bicep +0 -189
- package/.morph/framework/templates/infrastructure/azure/parameters.dev.json +0 -29
- package/.morph/framework/templates/infrastructure/azure/parameters.prod.json +0 -29
- package/.morph/framework/templates/infrastructure/azure/parameters.staging.json +0 -29
- package/.morph/framework/templates/infrastructure/azure/sql-database.bicep +0 -103
- package/.morph/framework/templates/infrastructure/azure/storage.bicep +0 -106
- package/.morph/framework/templates/infrastructure/docker/Dockerfile.template +0 -58
- package/.morph/framework/templates/infrastructure/docker/docker-compose.template.yml +0 -67
- package/.morph/framework/templates/infrastructure/docker/dockerfile-api.dockerfile +0 -38
- package/.morph/framework/templates/infrastructure/docker/dockerfile-web.dockerfile +0 -48
- package/.morph/framework/templates/infrastructure/docker/easypanel.template.json +0 -54
- package/.morph/framework/templates/infrastructure/github/README.md +0 -593
- package/.morph/framework/templates/infrastructure/github/actions/azure-auth/action.yml.hbs +0 -22
- package/.morph/framework/templates/infrastructure/github/actions/docker-build-push/action.yml.hbs +0 -45
- package/.morph/framework/templates/infrastructure/github/actions/health-check/action.yml.hbs +0 -27
- package/.morph/framework/templates/infrastructure/github/workflows/deploy-azure-app-service.yml.hbs +0 -61
- package/.morph/framework/templates/infrastructure/github/workflows/deploy-easypanel.yml.hbs +0 -31
- package/.morph/framework/templates/infrastructure/github/workflows/docker-build-push.yml.hbs +0 -59
- package/.morph/framework/templates/infrastructure/github/workflows/dotnet-build.yml.hbs +0 -39
- package/.morph/framework/templates/integrations/asaas-client.cs +0 -387
- package/.morph/framework/templates/integrations/asaas-webhook.cs +0 -351
- package/.morph/framework/templates/integrations/azure-identity-config.cs +0 -288
- package/.morph/framework/templates/integrations/clerk-config.cs +0 -258
- package/.morph/framework/templates/meta-prompts/fusion/fusion-agent.md +0 -76
- package/.morph/framework/templates/meta-prompts/fusion/fusion-aggregator.md +0 -100
- package/.morph/framework/templates/meta-prompts/hops/hop-retry.md +0 -78
- package/.morph/framework/templates/meta-prompts/hops/hop-validation.md +0 -97
- package/.morph/framework/templates/meta-prompts/hops/hop-wrapper.md +0 -36
- package/.morph/framework/templates/meta-prompts/parallel-workers/parallel-coordinator.md +0 -113
- package/.morph/framework/templates/meta-prompts/parallel-workers/parallel-worker.md +0 -80
- package/.morph/framework/templates/meta-prompts/squad-leaders/backend-squad.md +0 -90
- package/.morph/framework/templates/meta-prompts/squad-leaders/frontend-squad.md +0 -126
- package/.morph/framework/templates/meta-prompts/squad-leaders/squad-leader.md +0 -43
- package/.morph/framework/templates/meta-prompts/validators/checkpoint-validator.md +0 -107
- package/.morph/framework/templates/meta-prompts/validators/pre-commit-validator.md +0 -95
- package/.morph/framework/templates/saas/subscription.cs +0 -347
- package/.morph/framework/templates/saas/tenant.cs +0 -338
- package/.morph/framework/templates/state.template.json +0 -17
- package/.morph/framework/templates/ui/FluentDesignTheme.cs +0 -149
- package/.morph/framework/templates/ui/MudTheme.cs +0 -281
- package/.morph/framework/templates/ui/design-system.css +0 -226
- package/.morph/logs/tool-failures.log +0 -7
- package/.morph/memory/pre-compact-2026-02-23T15-43-03-521Z.json +0 -16
- package/.morph/state.json +0 -48
- package/framework/templates/code/dotnet/contracts/contracts.cs +0 -217
- package/framework/templates/code/dotnet/contracts/contracts.cs.hbs +0 -172
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
# Feature Recap: {{titleCase FEATURE_NAME}}
|
|
2
|
-
|
|
3
|
-
## Summary
|
|
4
|
-
|
|
5
|
-
| Field | Value |
|
|
6
|
-
|-------|-------|
|
|
7
|
-
| **Feature ID** | {{FEATURE_NAME}} |
|
|
8
|
-
| **Completed** | {{DATE}} |
|
|
9
|
-
| **Total Tasks** | {X} |
|
|
10
|
-
| **Time Spent** | {X}h |
|
|
11
|
-
| **Agents Used** | {list} |
|
|
12
|
-
{{#if STACK}}| **Stack** | {{STACK}} |{{/if}}
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Tasks Completed
|
|
17
|
-
|
|
18
|
-
| ID | Title | Category | Duration |
|
|
19
|
-
|----|-------|----------|----------|
|
|
20
|
-
| T001 | {title} | {{#if (eq STACK "nextjs-supabase")}}Database{{else}}{category}{{/if}} | {X}min |
|
|
21
|
-
| T002 | {title} | {{#if (eq STACK "nextjs-supabase")}}Backend{{else}}{category}{{/if}} | {X}min |
|
|
22
|
-
| T003 | {title} | {{#if (eq STACK "nextjs-supabase")}}Frontend{{else}}{category}{{/if}} | {X}min |
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
{{#if (eq STACK "nextjs-supabase")}}
|
|
27
|
-
## Validation Results
|
|
28
|
-
|
|
29
|
-
| Validator | Status | Details |
|
|
30
|
-
|-----------|--------|---------|
|
|
31
|
-
| contract-compliance | Pass/Fail | {details} |
|
|
32
|
-
| architecture | Pass/Fail | {details} |
|
|
33
|
-
| design-system | Pass/Fail | {details} |
|
|
34
|
-
| coding-standards | Pass/Fail | {details} |
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
{{/if}}
|
|
39
|
-
## What Was Delivered
|
|
40
|
-
|
|
41
|
-
### Functionality
|
|
42
|
-
- {Functionality 1 delivered}
|
|
43
|
-
- {Functionality 2 delivered}
|
|
44
|
-
- {Functionality 3 delivered}
|
|
45
|
-
|
|
46
|
-
{{#if (eq STACK "nextjs-supabase")}}
|
|
47
|
-
### Database (Supabase)
|
|
48
|
-
- Tables: {list}
|
|
49
|
-
- RLS Policies: {count} policies
|
|
50
|
-
- Migrations: {count} files
|
|
51
|
-
|
|
52
|
-
### Backend API (.NET)
|
|
53
|
-
- Endpoints: {count} endpoints
|
|
54
|
-
- Services: {list}
|
|
55
|
-
|
|
56
|
-
### Frontend (Next.js)
|
|
57
|
-
- Pages: {list}
|
|
58
|
-
- Components: {list}
|
|
59
|
-
{{/if}}
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## Files Created
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
{{#if (eq STACK "nextjs-supabase")}}
|
|
67
|
-
supabase/migrations/{files}
|
|
68
|
-
backend/src/{files}
|
|
69
|
-
frontend/src/{files}
|
|
70
|
-
{{else}}
|
|
71
|
-
{list of created files}
|
|
72
|
-
{{/if}}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Files Modified
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
{list of modified files}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## Architecture Decisions
|
|
84
|
-
|
|
85
|
-
| Decision | Rationale |
|
|
86
|
-
|----------|-----------|
|
|
87
|
-
| {Decision 1} | {Reason} |
|
|
88
|
-
| {Decision 2} | {Reason} |
|
|
89
|
-
|
|
90
|
-
See full ADRs in `decisions.md`
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
## Test Coverage
|
|
95
|
-
|
|
96
|
-
| Type | Files | Coverage |
|
|
97
|
-
|------|-------|----------|
|
|
98
|
-
| {{#if (eq STACK "nextjs-supabase")}}Backend Unit{{else}}Unit Tests{{/if}} | {X} | {X}% |
|
|
99
|
-
| {{#if (eq STACK "nextjs-supabase")}}Frontend Component{{else}}Integration Tests{{/if}} | {X} | {X}% |
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## Lessons Learned
|
|
104
|
-
|
|
105
|
-
### What Went Well
|
|
106
|
-
- {Positive point 1}
|
|
107
|
-
- {Positive point 2}
|
|
108
|
-
|
|
109
|
-
### What Could Be Improved
|
|
110
|
-
- {Improvement point 1}
|
|
111
|
-
- {Improvement point 2}
|
|
112
|
-
|
|
113
|
-
### Recommendations for Future
|
|
114
|
-
- {Recommendation 1}
|
|
115
|
-
- {Recommendation 2}
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## Metrics
|
|
120
|
-
|
|
121
|
-
| Metric | Value |
|
|
122
|
-
|--------|-------|
|
|
123
|
-
| Tasks Completed | {X}/{X} |
|
|
124
|
-
| Checkpoints Passed | {X} |
|
|
125
|
-
{{#if (eq STACK "nextjs-supabase")}}| Validation Passes | {X}/{X} |
|
|
126
|
-
{{else}}| Code Reviews | {X} |
|
|
127
|
-
{{/if}}| Bugs Found | {X} |
|
|
128
|
-
| Bugs Fixed | {X} |
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
## Related Resources
|
|
133
|
-
|
|
134
|
-
- **Proposal:** `proposal.md`
|
|
135
|
-
- **Spec:** `spec.md`
|
|
136
|
-
{{#if (eq STACK "nextjs-supabase")}}- **Contracts (.NET):** `contracts.cs`
|
|
137
|
-
- **Contracts (TS):** `contracts.ts`
|
|
138
|
-
{{else}}- **Contracts:** `contracts.cs`
|
|
139
|
-
{{/if}}- **Tasks:** `tasks.md`
|
|
140
|
-
- **Decisions:** `decisions.md`
|
|
141
|
-
{{#if (eq STACK "blazor-azure")}}- **Azure DevOps Epic:** {link}
|
|
142
|
-
{{/if}}- **PR:** {link}
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
*Generated by MORPH Framework on {{DATE}}*
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
# Tasks - {{titleCase FEATURE_NAME}}
|
|
2
|
-
|
|
3
|
-
> Implementation checklist for the feature.
|
|
4
|
-
> Update status as you progress.
|
|
5
|
-
|
|
6
|
-
| Task ID | Type | Title | Status |
|
|
7
|
-
|---------|------|-------|--------|
|
|
8
|
-
| T001 | {type} | {title} | Pending |
|
|
9
|
-
| T002 | {type} | {title} | Pending |
|
|
10
|
-
| T003 | {type} | {title} | In Progress |
|
|
11
|
-
| T004 | {type} | {title} | Blocked |
|
|
12
|
-
| T005 | {type} | {title} | Done |
|
|
13
|
-
|
|
14
|
-
**Status Values:** `Pending | In Progress | Blocked | Done`
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Task Granularity
|
|
19
|
-
|
|
20
|
-
### Ideal Task
|
|
21
|
-
- 15-60 minutes of implementation
|
|
22
|
-
- 1-5 files modified
|
|
23
|
-
- Testable in isolation
|
|
24
|
-
- Independent commit possible
|
|
25
|
-
|
|
26
|
-
### Signs of Too Broad (Split)
|
|
27
|
-
**Bad example:** "Implement feature"
|
|
28
|
-
**Split into:**
|
|
29
|
-
- T001: Define contracts and interfaces
|
|
30
|
-
- T002: Implement data layer
|
|
31
|
-
- T003: Implement business logic
|
|
32
|
-
- T004: Create UI components
|
|
33
|
-
- T005: Write tests
|
|
34
|
-
|
|
35
|
-
### Signs of Too Granular (Merge)
|
|
36
|
-
**Bad example:** "Create field A", "Create field B", "Create field C"
|
|
37
|
-
**Merge into:** "Create data model with all fields"
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## Gates & Reviews
|
|
42
|
-
|
|
43
|
-
| Task ID | Type | Description | Status |
|
|
44
|
-
|---------|------|-------------|--------|
|
|
45
|
-
| T003 | Review | Review contracts and data model | Pending |
|
|
46
|
-
| T006 | Review | Review implementation | Pending |
|
|
47
|
-
| T009 | Approval | Approve UI before testing | Pending |
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## Phase 1: Contracts & Data Model
|
|
52
|
-
|
|
53
|
-
### T001: Define contracts and interfaces
|
|
54
|
-
- **Type:** Contract
|
|
55
|
-
- **Priority:** 1
|
|
56
|
-
- **Estimate:** 30min
|
|
57
|
-
- **Assigned:** {agent}
|
|
58
|
-
- **Dependencies:** None
|
|
59
|
-
|
|
60
|
-
**Description:**
|
|
61
|
-
|
|
62
|
-
Define service interfaces and contracts.
|
|
63
|
-
|
|
64
|
-
**Deliverables:**
|
|
65
|
-
- [ ] Create: `{path-to-interface-file}`
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
### T002: Create data model
|
|
70
|
-
- **Type:** {{#if (eq STACK "nextjs-supabase")}}Database{{else}}Domain{{/if}}
|
|
71
|
-
- **Priority:** 1
|
|
72
|
-
- **Estimate:** 45min
|
|
73
|
-
- **Assigned:** {agent}
|
|
74
|
-
- **Dependencies:** None
|
|
75
|
-
|
|
76
|
-
**Description:**
|
|
77
|
-
|
|
78
|
-
Create data model {{#if (eq STACK "nextjs-supabase")}}with migrations{{else}}with entities{{/if}}.
|
|
79
|
-
|
|
80
|
-
**Deliverables:**
|
|
81
|
-
- [ ] Create: `{path-to-model-file}`
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
## Phase 2: Implementation
|
|
86
|
-
|
|
87
|
-
### T003: Implement data layer
|
|
88
|
-
- **Type:** {{#if (eq STACK "nextjs-supabase")}}Repository{{else}}Infrastructure{{/if}}
|
|
89
|
-
- **Priority:** 2
|
|
90
|
-
- **Estimate:** 1h
|
|
91
|
-
- **Assigned:** {agent}
|
|
92
|
-
- **Dependencies:** T001, T002
|
|
93
|
-
|
|
94
|
-
**Description:**
|
|
95
|
-
|
|
96
|
-
Implement data access layer.
|
|
97
|
-
|
|
98
|
-
**Deliverables:**
|
|
99
|
-
- [ ] Create: `{path-to-repository-file}`
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
### T004: Implement business logic
|
|
104
|
-
- **Type:** Service
|
|
105
|
-
- **Priority:** 2
|
|
106
|
-
- **Estimate:** 1h
|
|
107
|
-
- **Assigned:** {agent}
|
|
108
|
-
- **Dependencies:** T001, T003
|
|
109
|
-
|
|
110
|
-
**Description:**
|
|
111
|
-
|
|
112
|
-
Implement service layer with business logic.
|
|
113
|
-
|
|
114
|
-
**Deliverables:**
|
|
115
|
-
- [ ] Create: `{path-to-service-file}`
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## Phase 3: UI Components
|
|
120
|
-
|
|
121
|
-
### T005: Create list component
|
|
122
|
-
- **Type:** UI
|
|
123
|
-
- **Priority:** 2
|
|
124
|
-
- **Estimate:** 45min
|
|
125
|
-
- **Assigned:** {agent}
|
|
126
|
-
- **Dependencies:** T004
|
|
127
|
-
|
|
128
|
-
**Description:**
|
|
129
|
-
|
|
130
|
-
Create component to list items.
|
|
131
|
-
|
|
132
|
-
**Deliverables:**
|
|
133
|
-
- [ ] Create: `{path-to-component-file}`
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
### T006: Create form component
|
|
138
|
-
- **Type:** UI
|
|
139
|
-
- **Priority:** 2
|
|
140
|
-
- **Estimate:** 1h
|
|
141
|
-
- **Assigned:** {agent}
|
|
142
|
-
- **Dependencies:** T005
|
|
143
|
-
|
|
144
|
-
**Description:**
|
|
145
|
-
|
|
146
|
-
Create component for create/edit.
|
|
147
|
-
|
|
148
|
-
**Deliverables:**
|
|
149
|
-
- [ ] Create: `{path-to-form-file}`
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
## Phase 4: Testing
|
|
154
|
-
|
|
155
|
-
### T007: Write unit tests
|
|
156
|
-
- **Type:** Test
|
|
157
|
-
- **Priority:** 2
|
|
158
|
-
- **Estimate:** 1h
|
|
159
|
-
- **Assigned:** {agent}
|
|
160
|
-
- **Dependencies:** T004
|
|
161
|
-
|
|
162
|
-
**Description:**
|
|
163
|
-
|
|
164
|
-
Unit tests for service layer.
|
|
165
|
-
|
|
166
|
-
**Deliverables:**
|
|
167
|
-
- [ ] Create: `{path-to-test-file}`
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
### T008: Write integration tests
|
|
172
|
-
- **Type:** Test
|
|
173
|
-
- **Priority:** 3
|
|
174
|
-
- **Estimate:** 1h
|
|
175
|
-
- **Assigned:** {agent}
|
|
176
|
-
- **Dependencies:** T007
|
|
177
|
-
|
|
178
|
-
**Description:**
|
|
179
|
-
|
|
180
|
-
Integration tests for {{#if (eq STACK "nextjs-supabase")}}API and database{{else}}repository and API{{/if}}.
|
|
181
|
-
|
|
182
|
-
**Deliverables:**
|
|
183
|
-
- [ ] Create: `{path-to-integration-test-file}`
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
187
|
-
## Summary
|
|
188
|
-
|
|
189
|
-
| Phase | Tasks | Estimate |
|
|
190
|
-
|-------|-------|----------|
|
|
191
|
-
| Phase 1 | T001-T002 | {X}h |
|
|
192
|
-
| Phase 2 | T003-T004 | {X}h |
|
|
193
|
-
| Phase 3 | T005-T006 | {X}h |
|
|
194
|
-
| Phase 4 | T007-T008 | {X}h |
|
|
195
|
-
| **Total** | **8 tasks** | **{X}h** |
|
|
196
|
-
|
|
197
|
-
---
|
|
198
|
-
|
|
199
|
-
*Generated by MORPH Framework*
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# ==============================================================================
|
|
2
|
-
# MORPH-SPEC - .NET 8 Blazor Server Dockerfile
|
|
3
|
-
# Multi-stage build for production-ready container
|
|
4
|
-
# ==============================================================================
|
|
5
|
-
|
|
6
|
-
# ==============================================================================
|
|
7
|
-
# Stage 1: Base Runtime
|
|
8
|
-
# ==============================================================================
|
|
9
|
-
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
|
10
|
-
|
|
11
|
-
# Set working directory
|
|
12
|
-
WORKDIR /app
|
|
13
|
-
|
|
14
|
-
# Expose ports
|
|
15
|
-
EXPOSE 8080
|
|
16
|
-
EXPOSE 8081
|
|
17
|
-
|
|
18
|
-
# Create non-root user for security
|
|
19
|
-
RUN adduser --disabled-password --gecos '' appuser && chown -R appuser /app
|
|
20
|
-
USER appuser
|
|
21
|
-
|
|
22
|
-
# ==============================================================================
|
|
23
|
-
# Stage 2: Build
|
|
24
|
-
# ==============================================================================
|
|
25
|
-
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
|
26
|
-
|
|
27
|
-
# Set working directory
|
|
28
|
-
WORKDIR /src
|
|
29
|
-
|
|
30
|
-
# Copy project files
|
|
31
|
-
# Adjust paths according to your solution structure
|
|
32
|
-
COPY ["src/YourApp/YourApp.csproj", "src/YourApp/"]
|
|
33
|
-
COPY ["src/YourApp.Core/YourApp.Core.csproj", "src/YourApp.Core/"]
|
|
34
|
-
COPY ["src/YourApp.Infrastructure/YourApp.Infrastructure.csproj", "src/YourApp.Infrastructure/"]
|
|
35
|
-
|
|
36
|
-
# Restore dependencies
|
|
37
|
-
RUN dotnet restore "src/YourApp/YourApp.csproj"
|
|
38
|
-
|
|
39
|
-
# Copy all source code
|
|
40
|
-
COPY . .
|
|
41
|
-
|
|
42
|
-
# Build project
|
|
43
|
-
WORKDIR "/src/src/YourApp"
|
|
44
|
-
RUN dotnet build "YourApp.csproj" -c Release -o /app/build
|
|
45
|
-
|
|
46
|
-
# ==============================================================================
|
|
47
|
-
# Stage 3: Publish
|
|
48
|
-
# ==============================================================================
|
|
49
|
-
FROM build AS publish
|
|
50
|
-
|
|
51
|
-
# Publish application
|
|
52
|
-
RUN dotnet publish "YourApp.csproj" \
|
|
53
|
-
-c Release \
|
|
54
|
-
-o /app/publish \
|
|
55
|
-
/p:UseAppHost=false \
|
|
56
|
-
/p:PublishTrimmed=false \
|
|
57
|
-
/p:PublishSingleFile=false
|
|
58
|
-
|
|
59
|
-
# ==============================================================================
|
|
60
|
-
# Stage 4: Final
|
|
61
|
-
# ==============================================================================
|
|
62
|
-
FROM base AS final
|
|
63
|
-
|
|
64
|
-
# Set working directory
|
|
65
|
-
WORKDIR /app
|
|
66
|
-
|
|
67
|
-
# Copy published files from publish stage
|
|
68
|
-
COPY --from=publish /app/publish .
|
|
69
|
-
|
|
70
|
-
# Set environment variables
|
|
71
|
-
ENV ASPNETCORE_URLS=http://+:8080
|
|
72
|
-
ENV ASPNETCORE_ENVIRONMENT=Production
|
|
73
|
-
ENV DOTNET_RUNNING_IN_CONTAINER=true
|
|
74
|
-
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
|
75
|
-
|
|
76
|
-
# Health check endpoint
|
|
77
|
-
# Adjust path to match your health check endpoint
|
|
78
|
-
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
|
|
79
|
-
CMD curl -f http://localhost:8080/health || exit 1
|
|
80
|
-
|
|
81
|
-
# Set entry point
|
|
82
|
-
ENTRYPOINT ["dotnet", "YourApp.dll"]
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
# MORPH-SPEC - Templates Bicep
|
|
2
|
-
|
|
3
|
-
Templates de infraestrutura para Azure com suporte a App Service e Container Apps.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 🚀 Quick Start
|
|
8
|
-
|
|
9
|
-
### 1. App Service Free (Desenvolvimento - $0/mês)
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
# Deploy infraestrutura com App Service Free
|
|
13
|
-
az deployment group create \
|
|
14
|
-
--resource-group rg-myapp-dev \
|
|
15
|
-
--template-file main.bicep \
|
|
16
|
-
--parameters @parameters.dev.json \
|
|
17
|
-
--parameters appName=myapp
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### 2. Container Apps (Produção - $5-15/mês)
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
# Build e push imagem para ACR
|
|
24
|
-
az acr build \
|
|
25
|
-
--registry acrXXXX \
|
|
26
|
-
--image myapp:v1.0.0 \
|
|
27
|
-
--file Dockerfile \
|
|
28
|
-
.
|
|
29
|
-
|
|
30
|
-
# Deploy infraestrutura com Container Apps
|
|
31
|
-
az deployment group create \
|
|
32
|
-
--resource-group rg-myapp-prod \
|
|
33
|
-
--template-file main.bicep \
|
|
34
|
-
--parameters @parameters.prod.json \
|
|
35
|
-
--parameters appName=myapp
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## 📁 Estrutura de Arquivos
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
infra/
|
|
44
|
-
├── main.bicep # Entry point com lógica condicional
|
|
45
|
-
├── parameters.dev.json # Params dev (App Service Free)
|
|
46
|
-
├── parameters.prod.json # Params prod (Container Apps)
|
|
47
|
-
├── app-service.bicep # Template App Service
|
|
48
|
-
├── container-app.bicep # Template Container App
|
|
49
|
-
├── container-app-env.bicep # Container Apps Environment
|
|
50
|
-
├── sql-database.bicep # Azure SQL Database
|
|
51
|
-
├── storage.bicep # Storage Account
|
|
52
|
-
├── key-vault.bicep # Key Vault
|
|
53
|
-
└── app-insights.bicep # Application Insights
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## ⚙️ Parâmetros Principais
|
|
59
|
-
|
|
60
|
-
### main.bicep
|
|
61
|
-
|
|
62
|
-
| Parâmetro | Tipo | Default | Descrição |
|
|
63
|
-
|-----------|------|---------|-----------|
|
|
64
|
-
| `environment` | string | `dev` | Ambiente (dev, staging, prod) |
|
|
65
|
-
| `appName` | string | **required** | Nome da aplicação (3-15 chars) |
|
|
66
|
-
| `location` | string | `resourceGroup().location` | Região Azure |
|
|
67
|
-
| `hostingType` | string | `appservice` | Tipo de hosting (`appservice` ou `containerapp`) |
|
|
68
|
-
| `appServiceSku` | string | `F1` | SKU do App Service (F1, B1, S1, P1v2) |
|
|
69
|
-
| `containerImage` | string | `mcr.microsoft.com/hello-world:latest` | Imagem Docker (apenas Container Apps) |
|
|
70
|
-
| `sqlAdminPassword` | securestring | **required** | Senha do SQL Server |
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## 🌐 Escolhendo o Hosting Type
|
|
75
|
-
|
|
76
|
-
### App Service (`hostingType: appservice`)
|
|
77
|
-
|
|
78
|
-
**Usar quando:**
|
|
79
|
-
- ✅ Orçamento zero (Free F1)
|
|
80
|
-
- ✅ MVP ou protótipo
|
|
81
|
-
- ✅ Tráfego baixo (<100 req/dia)
|
|
82
|
-
- ✅ App tolerante a cold starts (20 min sleep)
|
|
83
|
-
- ✅ Deploy simplificado (sem Docker)
|
|
84
|
-
|
|
85
|
-
**SKUs disponíveis:**
|
|
86
|
-
- `F1` (Free): $0/mês - 1GB RAM, 60 min CPU/dia, sleep após 20min
|
|
87
|
-
- `B1` (Basic): $13/mês - 1.75GB RAM, always-on
|
|
88
|
-
- `S1` (Standard): $70/mês - 1.75GB RAM, auto-scale, slots
|
|
89
|
-
- `P1v2` (Premium): $85/mês - 3.5GB RAM, melhor performance
|
|
90
|
-
|
|
91
|
-
### Container Apps (`hostingType: containerapp`)
|
|
92
|
-
|
|
93
|
-
**Usar quando:**
|
|
94
|
-
- ✅ Produção com SLA 24/7
|
|
95
|
-
- ✅ Auto-scaling baseado em demanda
|
|
96
|
-
- ✅ SSL customizado necessário
|
|
97
|
-
- ✅ Background jobs (Hangfire)
|
|
98
|
-
- ✅ Arquitetura microserviços
|
|
99
|
-
|
|
100
|
-
**Custo:** $0-15/mês (scale-to-zero + consumo)
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
## 📝 Configuração por Ambiente
|
|
105
|
-
|
|
106
|
-
### Development (parameters.dev.json)
|
|
107
|
-
|
|
108
|
-
```json
|
|
109
|
-
{
|
|
110
|
-
"environment": { "value": "dev" },
|
|
111
|
-
"hostingType": { "value": "appservice" },
|
|
112
|
-
"appServiceSku": { "value": "F1" }
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
**Infraestrutura:**
|
|
117
|
-
- App Service Free F1
|
|
118
|
-
- Azure SQL Free (32GB)
|
|
119
|
-
- App Insights Free (5GB)
|
|
120
|
-
|
|
121
|
-
**Custo total:** $0/mês
|
|
122
|
-
|
|
123
|
-
### Staging (parameters.staging.json)
|
|
124
|
-
|
|
125
|
-
```json
|
|
126
|
-
{
|
|
127
|
-
"environment": { "value": "staging" },
|
|
128
|
-
"hostingType": { "value": "containerapp" },
|
|
129
|
-
"minReplicas": { "value": 0 } // scale-to-zero
|
|
130
|
-
}
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
**Infraestrutura:**
|
|
134
|
-
- Container Apps (scale-to-zero)
|
|
135
|
-
- Azure SQL Free (32GB)
|
|
136
|
-
- ACR Basic
|
|
137
|
-
- App Insights Free
|
|
138
|
-
|
|
139
|
-
**Custo total:** $5-10/mês
|
|
140
|
-
|
|
141
|
-
### Production (parameters.prod.json)
|
|
142
|
-
|
|
143
|
-
```json
|
|
144
|
-
{
|
|
145
|
-
"environment": { "value": "prod" },
|
|
146
|
-
"hostingType": { "value": "containerapp" },
|
|
147
|
-
"minReplicas": { "value": 1 } // always-on
|
|
148
|
-
}
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
**Infraestrutura:**
|
|
152
|
-
- Container Apps (min 1 replica)
|
|
153
|
-
- Azure SQL Free (ou pago se necessário)
|
|
154
|
-
- ACR Basic
|
|
155
|
-
- App Insights (pode ultrapassar free tier)
|
|
156
|
-
|
|
157
|
-
**Custo total:** $10-20/mês
|
|
158
|
-
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
## 🔧 Customização
|
|
162
|
-
|
|
163
|
-
### Adicionar variáveis de ambiente
|
|
164
|
-
|
|
165
|
-
**App Service:**
|
|
166
|
-
```bicep
|
|
167
|
-
module appService 'app-service.bicep' = {
|
|
168
|
-
params: {
|
|
169
|
-
envVars: {
|
|
170
|
-
MY_CUSTOM_VAR: 'value'
|
|
171
|
-
ANOTHER_VAR: 'another-value'
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
**Container Apps:**
|
|
178
|
-
```bicep
|
|
179
|
-
module containerApp 'container-app.bicep' = {
|
|
180
|
-
params: {
|
|
181
|
-
envVars: [
|
|
182
|
-
{
|
|
183
|
-
name: 'MY_CUSTOM_VAR'
|
|
184
|
-
value: 'value'
|
|
185
|
-
}
|
|
186
|
-
]
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### Usar secrets do Key Vault
|
|
192
|
-
|
|
193
|
-
```bicep
|
|
194
|
-
param sqlAdminPassword string {
|
|
195
|
-
reference: {
|
|
196
|
-
keyVault: {
|
|
197
|
-
id: '/subscriptions/.../providers/Microsoft.KeyVault/vaults/kv-myapp'
|
|
198
|
-
}
|
|
199
|
-
secretName: 'sql-admin-password'
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
---
|
|
205
|
-
|
|
206
|
-
## 🔄 Migração App Service → Container Apps
|
|
207
|
-
|
|
208
|
-
Ver guia completo em: `../../standards/migration-guide.md`
|
|
209
|
-
|
|
210
|
-
**Resumo:**
|
|
211
|
-
1. Criar Dockerfile
|
|
212
|
-
2. Implementar health checks
|
|
213
|
-
3. Build e push para ACR
|
|
214
|
-
4. Atualizar `parameters.json` → `hostingType: containerapp`
|
|
215
|
-
5. Redeploy
|
|
216
|
-
6. Testar
|
|
217
|
-
7. Cutover DNS
|
|
218
|
-
|
|
219
|
-
---
|
|
220
|
-
|
|
221
|
-
## 📊 Outputs Gerados
|
|
222
|
-
|
|
223
|
-
Após deploy, os seguintes outputs são gerados:
|
|
224
|
-
|
|
225
|
-
```bash
|
|
226
|
-
# Obter URL da aplicação
|
|
227
|
-
az deployment group show \
|
|
228
|
-
-g rg-myapp-dev \
|
|
229
|
-
-n deployment-name \
|
|
230
|
-
--query properties.outputs.appUrl.value
|
|
231
|
-
|
|
232
|
-
# Obter connection string SQL
|
|
233
|
-
az deployment group show \
|
|
234
|
-
-g rg-myapp-dev \
|
|
235
|
-
-n deployment-name \
|
|
236
|
-
--query properties.outputs.sqlConnectionString.value
|
|
237
|
-
|
|
238
|
-
# Obter App Insights connection string
|
|
239
|
-
az deployment group show \
|
|
240
|
-
-g rg-myapp-dev \
|
|
241
|
-
-n deployment-name \
|
|
242
|
-
--query properties.outputs.appInsightsConnectionString.value
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
---
|
|
246
|
-
|
|
247
|
-
## 🆘 Troubleshooting
|
|
248
|
-
|
|
249
|
-
### Erro: "The template deployment 'X' is not valid"
|
|
250
|
-
|
|
251
|
-
Validar template:
|
|
252
|
-
```bash
|
|
253
|
-
az deployment group validate \
|
|
254
|
-
--resource-group rg-myapp-dev \
|
|
255
|
-
--template-file main.bicep \
|
|
256
|
-
--parameters @parameters.dev.json
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
### Erro: "SKU not available in this location"
|
|
260
|
-
|
|
261
|
-
Verificar SKUs disponíveis:
|
|
262
|
-
```bash
|
|
263
|
-
az appservice list-locations --sku F1
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
### Deploy muito lento
|
|
267
|
-
|
|
268
|
-
Container Apps pode levar 5-10 minutos no primeiro deploy. Use `--no-wait` para não bloquear:
|
|
269
|
-
```bash
|
|
270
|
-
az deployment group create \
|
|
271
|
-
... \
|
|
272
|
-
--no-wait
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
---
|
|
276
|
-
|
|
277
|
-
## 📚 Referências
|
|
278
|
-
|
|
279
|
-
- [Bicep Documentation](https://learn.microsoft.com/azure/azure-resource-manager/bicep/)
|
|
280
|
-
- [App Service Bicep Reference](https://learn.microsoft.com/azure/templates/microsoft.web/sites)
|
|
281
|
-
- [Container Apps Bicep Reference](https://learn.microsoft.com/azure/templates/microsoft.app/containerapps)
|
|
282
|
-
- [Azure CLI Reference](https://learn.microsoft.com/cli/azure/)
|
|
283
|
-
|
|
284
|
-
---
|
|
285
|
-
|
|
286
|
-
*MORPH-SPEC by Polymorphism Tech*
|