Yaojia Wang
b11c6447b5
Sync
Code Coverage / Generate Coverage Report (push) Has been cancelled
Tests / Run Tests (9.0.x) (push) Has been cancelled
Tests / Docker Build Test (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
2025-11-08 18:13:48 +01:00
Yaojia Wang
58e08f9fa7
feat(backend): Implement Sprint CQRS Commands and Queries (Task 3)
...
Code Coverage / Generate Coverage Report (push) Has been cancelled
Tests / Run Tests (9.0.x) (push) Has been cancelled
Tests / Docker Build Test (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
Implemented comprehensive CQRS pattern for Sprint module:
Commands:
- UpdateSprintCommand: Update sprint details with validation
- DeleteSprintCommand: Delete sprints (business rule: cannot delete active sprints)
- StartSprintCommand: Transition sprint from Planned to Active
- CompleteSprintCommand: Transition sprint from Active to Completed
- AddTaskToSprintCommand: Add tasks to sprint with validation
- RemoveTaskFromSprintCommand: Remove tasks from sprint
Queries:
- GetSprintByIdQuery: Get sprint by ID with DTO mapping
- GetSprintsByProjectIdQuery: Get all sprints for a project
- GetActiveSprintsQuery: Get all active sprints across projects
Infrastructure:
- Created IApplicationDbContext interface for Application layer DB access
- Registered IApplicationDbContext in DI container
- Added Microsoft.EntityFrameworkCore package to Application layer
- Updated UnitOfWork to expose GetDbContext() method
API:
- Created SprintsController with all CRUD and lifecycle endpoints
- Implemented proper HTTP methods (POST, PUT, DELETE, GET)
- Added sprint status transition endpoints (start, complete)
- Added task management endpoints (add/remove tasks)
All tests passing. Ready for Tasks 4-6.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-05 00:25:23 +01:00
Yaojia Wang
6cbf7dc6dc
feat(backend): Implement Audit Query API (CQRS) - Sprint 2 Story 2 Task 4
...
Implemented complete REST API for querying audit logs using CQRS pattern.
Features:
- GET /api/v1/auditlogs/{id} - Retrieve specific audit log
- GET /api/v1/auditlogs/entity/{entityType}/{entityId} - Get entity history
- GET /api/v1/auditlogs/recent?count=100 - Get recent logs (max 1000)
Implementation:
- AuditLogDto - Transfer object for query results
- GetAuditLogByIdQuery + Handler
- GetAuditLogsByEntity Query + Handler
- GetRecentAuditLogsQuery + Handler
- AuditLogsController with 3 endpoints
Technical:
- Multi-tenant isolation via Global Query Filters (automatic)
- Read-only query endpoints (no mutations)
- Swagger/OpenAPI documentation
- Proper HTTP status codes (200 OK, 404 Not Found)
- Cancellation token support
- Primary constructor pattern (modern C# style)
Tests: Build succeeded, no new test failures introduced
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-04 23:56:37 +01:00
Yaojia Wang
08b317e789
Add trace files.
Code Coverage / Generate Coverage Report (push) Has been cancelled
Tests / Run Tests (9.0.x) (push) Has been cancelled
Tests / Docker Build Test (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
2025-11-04 23:28:56 +01:00
Yaojia Wang
01e1263c12
Updare progress
Code Coverage / Generate Coverage Report (push) Has been cancelled
Tests / Run Tests (9.0.x) (push) Has been cancelled
Tests / Docker Build Test (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
2025-11-04 12:28:53 +01:00
Yaojia Wang
1246445a0b
fix: Add JSON string enum converter for Issue Management API
...
- Configure AddControllers() with JsonStringEnumConverter
- Allows API to accept Issue type/priority/status as strings ("Story", "High", "Backlog")
- Frontend can now send readable enum values instead of integers
- All Issue Management CRUD operations tested and working
Test results:
- Create Issue (Story, Bug, Task) ✓
- List all issues ✓
- Filter by status (Backlog, InProgress) ✓
- Change issue status (Kanban workflow) ✓
- Update issue details ✓
- Multi-tenant isolation verified ✓
2025-11-04 12:04:57 +01:00
Yaojia Wang
6b11af9bea
feat(backend): Implement complete Issue Management Module
...
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 >
2025-11-04 11:38:04 +01:00
Yaojia Wang
6d2396f3c1
In progress
Code Coverage / Generate Coverage Report (push) Has been cancelled
Tests / Run Tests (9.0.x) (push) Has been cancelled
Tests / Docker Build Test (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
2025-11-04 10:31:50 +01:00
Yaojia Wang
172d0de1fe
Add test
Code Coverage / Generate Coverage Report (push) Has been cancelled
Tests / Run Tests (9.0.x) (push) Has been cancelled
Tests / Docker Build Test (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
2025-11-04 00:20:42 +01:00
Yaojia Wang
b3bea05488
Summary
Code Coverage / Generate Coverage Report (push) Has been cancelled
Tests / Run Tests (9.0.x) (push) Has been cancelled
Tests / Docker Build Test (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
2025-11-03 23:37:50 +01:00
Yaojia Wang
312df4b70e
Adjust test
Code Coverage / Generate Coverage Report (push) Has been cancelled
Tests / Run Tests (9.0.x) (push) Has been cancelled
Tests / Docker Build Test (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
2025-11-03 22:29:31 +01:00
Yaojia Wang
a220e5d5d7
Refactor
Code Coverage / Generate Coverage Report (push) Has been cancelled
Tests / Run Tests (9.0.x) (push) Has been cancelled
Tests / Docker Build Test (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
2025-11-03 21:02:14 +01:00
Yaojia Wang
4183b10b39
Commit all scripts
Code Coverage / Generate Coverage Report (push) Has been cancelled
Tests / Run Tests (9.0.x) (push) Has been cancelled
Tests / Docker Build Test (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
2025-11-03 17:19:20 +01:00
Yaojia Wang
9e2edb2965
feat(backend): Implement Refresh Token mechanism (Day 5 Phase 1)
...
Implemented secure refresh token rotation with the following features:
- RefreshToken domain entity with IsExpired(), IsRevoked(), IsActive(), Revoke() methods
- IRefreshTokenService with token generation, rotation, and revocation
- RefreshTokenService with SHA-256 hashing and token family tracking
- RefreshTokenRepository for database operations
- Database migration for refresh_tokens table with proper indexes
- Updated LoginCommandHandler and RegisterTenantCommandHandler to return refresh tokens
- Added POST /api/auth/refresh endpoint (token rotation)
- Added POST /api/auth/logout endpoint (revoke single token)
- Added POST /api/auth/logout-all endpoint (revoke all user tokens)
- Updated JWT access token expiration to 15 minutes (from 60)
- Refresh token expiration set to 7 days
- Security features: token reuse detection, IP address tracking, user-agent logging
Changes:
- Domain: RefreshToken.cs, IRefreshTokenRepository.cs
- Application: IRefreshTokenService.cs, updated LoginResponseDto and RegisterTenantResult
- Infrastructure: RefreshTokenService.cs, RefreshTokenRepository.cs, RefreshTokenConfiguration.cs
- API: AuthController.cs (3 new endpoints), RefreshTokenRequest.cs, LogoutRequest.cs
- Configuration: appsettings.Development.json (updated JWT settings)
- DI: DependencyInjection.cs (registered new services)
- Migration: AddRefreshTokens migration
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-03 14:44:36 +01:00
Yaojia Wang
1f66b25f30
In progress
Code Coverage / Generate Coverage Report (push) Has been cancelled
Tests / Run Tests (9.0.x) (push) Has been cancelled
Tests / Docker Build Test (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
2025-11-03 14:00:24 +01:00
Yaojia Wang
fe8ad1c1f9
In progress
Code Coverage / Generate Coverage Report (push) Has been cancelled
Tests / Run Tests (9.0.x) (push) Has been cancelled
Tests / Docker Build Test (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
2025-11-03 11:51:02 +01:00
Yaojia Wang
8caf8c1bcf
Project Init
Code Coverage / Generate Coverage Report (push) Has been cancelled
Tests / Run Tests (9.0.x) (push) Has been cancelled
Tests / Docker Build Test (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
2025-11-03 00:04:19 +01:00
Yaojia Wang
014d62bcc2
Project Init
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-02 23:55:18 +01:00