Implemented full-featured Issue Management module following Clean Architecture,
DDD, CQRS and Event Sourcing patterns to support Kanban board functionality.
## Domain Layer
- Issue aggregate root with business logic
- IssueType, IssueStatus, IssuePriority enums
- Domain events: IssueCreated, IssueUpdated, IssueStatusChanged, IssueAssigned, IssueDeleted
- IIssueRepository and IUnitOfWork interfaces
- Domain exceptions (DomainException, NotFoundException)
## Application Layer
- **Commands**: CreateIssue, UpdateIssue, ChangeIssueStatus, AssignIssue, DeleteIssue
- **Queries**: GetIssueById, ListIssues, ListIssuesByStatus
- Command/Query handlers with validation
- FluentValidation validators for all commands
- Event handlers for domain events
- IssueDto for data transfer
- ValidationBehavior pipeline
## Infrastructure Layer
- IssueManagementDbContext with EF Core 9.0
- IssueConfiguration for entity mapping
- IssueRepository implementation
- UnitOfWork implementation
- Multi-tenant support with TenantId filtering
- Optimized indexes for query performance
## API Layer
- IssuesController with full REST API
- GET /api/v1/projects/{projectId}/issues (list with optional status filter)
- GET /api/v1/projects/{projectId}/issues/{id} (get by id)
- POST /api/v1/projects/{projectId}/issues (create)
- PUT /api/v1/projects/{projectId}/issues/{id} (update)
- PUT /api/v1/projects/{projectId}/issues/{id}/status (change status for Kanban)
- PUT /api/v1/projects/{projectId}/issues/{id}/assign (assign to user)
- DELETE /api/v1/projects/{projectId}/issues/{id} (delete)
- Request models: CreateIssueRequest, UpdateIssueRequest, ChangeStatusRequest, AssignIssueRequest
- JWT authentication required
- Real-time SignalR notifications integrated
## Module Registration
- Added AddIssueManagementModule extension method
- Registered in Program.cs
- Added IMDatabase connection string
- Added project references to ColaFlow.API.csproj
## Architecture Patterns
- ✅ Clean Architecture (Domain, Application, Infrastructure, API layers)
- ✅ DDD (Aggregate roots, value objects, domain events)
- ✅ CQRS (Command/Query separation)
- ✅ Event Sourcing (Domain events with MediatR)
- ✅ Repository Pattern (IIssueRepository)
- ✅ Unit of Work (Transactional consistency)
- ✅ Dependency Injection
- ✅ FluentValidation
- ✅ Multi-tenancy support
## Real-time Features
- SignalR integration via IRealtimeNotificationService
- NotifyIssueCreated, NotifyIssueUpdated, NotifyIssueStatusChanged, NotifyIssueAssigned, NotifyIssueDeleted
- Project-level broadcasting for collaborative editing
## Next Steps
1. Stop running API process if exists
2. Run: dotnet ef migrations add InitialIssueModule --context IssueManagementDbContext --startup-project ../../../ColaFlow.API
3. Run: dotnet ef database update --context IssueManagementDbContext --startup-project ../../../ColaFlow.API
4. Create test scripts
5. Verify all CRUD operations and real-time notifications
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
30 lines
1.9 KiB
JSON
30 lines
1.9 KiB
JSON
{
|
|
"permissions": {
|
|
"allow": [
|
|
"Bash(npm install:*)",
|
|
"Bash(dotnet remove:*)",
|
|
"Bash(npm run lint)",
|
|
"Bash(npm run build:*)",
|
|
"Bash(timeout 10 npm run dev:*)",
|
|
"Bash(npx tsc:*)",
|
|
"Bash(timeout /t 10)",
|
|
"Bash(kill:*)",
|
|
"Bash(Select-String \"error\" -Context 0,2)",
|
|
"Bash(powershell.exe -ExecutionPolicy Bypass -File test-project-api.ps1)",
|
|
"Bash(powershell.exe -ExecutionPolicy Bypass -File test-project-simple.ps1)",
|
|
"Bash(powershell.exe -ExecutionPolicy Bypass -File test-project-debug.ps1)",
|
|
"Bash(Select-String -Pattern \"error\" -Context 0,2)",
|
|
"Bash(git add:*)",
|
|
"Bash(git restore:*)",
|
|
"Bash(git commit -m \"$(cat <<''EOF''\nfeat(agents): Enforce mandatory testing in backend agent\n\nUpdate backend agent to enforce testing requirements:\n- Extended workflow from 8 to 9 steps with explicit test phases\n- Added CRITICAL Testing Rule: Must run dotnet test after every change\n- Never commit with failing tests or compilation errors\n- Updated Best Practices to emphasize testing (item 8)\n- Removed outdated TypeScript/NestJS examples\n- Updated Tech Stack to reflect actual .NET 9 stack\n- Simplified configuration for better clarity\n\nChanges:\n- Workflow step 6: \"Run Tests: MUST run dotnet test - fix any failures\"\n- Workflow step 7: \"Git Commit: Auto-commit ONLY when all tests pass\"\n- Added \"CRITICAL Testing Rule\" section after workflow\n- Removed Project Structure, Naming Conventions, Code Standards sections\n- Updated tech stack: C# + .NET 9 + ASP.NET Core + EF Core + PostgreSQL + MediatR + FluentValidation\n- Removed Example Flow section for brevity\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude <noreply@anthropic.com>\nEOF\n)\")",
|
|
"Bash(npm run dev:*)",
|
|
"Bash(git status:*)",
|
|
"Bash(git ls-files:*)",
|
|
"Bash(cat >*)",
|
|
"Bash(cat :*)"
|
|
],
|
|
"deny": [],
|
|
"ask": []
|
|
}
|
|
}
|