fix template, remove okr, use casan.*

This commit is contained in:
thanhnv
2026-07-18 16:45:31 +07:00
parent 0dfd1742d3
commit 13fae3e6c3
249 changed files with 4881 additions and 5702 deletions
@@ -1,10 +1,14 @@
# DD-MOD-01 OKR Management
# Detail Design — OKR Web Application
## Backend Design
Controllers are thin and call AuthService, UsersService, ObjectivesService, KeyResultsService. PrismaService is the only database access layer.
## Component Design
- apps/okr/backend: owns only responsibilities assigned by the approved architecture.
- apps/okr/frontend: owns only responsibilities assigned by the approved architecture.
## Authorization
JwtAuthGuard verifies Bearer/cookie token. Employees are constrained to ownerId == user.sub. Managers/Admins read all objectives.
## Authorization and Validation
Every entry point validates input, authenticates identity where required, authorizes the resource, and emits safe errors before side effects.
## Progress Calculation
KeyResultsService updates progress in a transaction, writes ProgressUpdate, then recalculates objective status.
## Data and Transaction Design
Persistence, transaction boundaries, concurrency, idempotency, and failure recovery must trace to the data model and requirement IDs.
## Observability
Record correlation IDs, safe structured events, latency, failures, and governance evidence without secrets or sensitive payloads.