Repository navigation
Objective
Deliver CR #5 for BugFlow with project-scoped metrics and role-based access control so teams can operate with clearer permissions and better visibility.
Included
- Project-scoped Metrics Dashboard with summary cards, status breakdown, 7-day trend, and average resolution time based on first
DONEactivity - ProjectMember-based RBAC with fixed roles:
ADMIN,DEVELOPER,QA,VIEWER - Project member management APIs and UI with last-admin protection and duplicate-member validation
- Permission enforcement across issues, comments, activity logs, metrics, and project lifecycle flows
- Notification menu overlay fix to keep dropdown stable above dashboard content
API
GET /api/v1/metrics/overview?projectId=GET /api/v1/projects/:id/membersPOST /api/v1/projects/:id/membersPATCH /api/v1/projects/:id/members/:memberIdDELETE /api/v1/projects/:id/members/:memberId
Notes
- All new behavior remains scoped by
projectId - Existing issue, project, notification, and activity features remain backward-compatible
- Empty metrics states return valid responses instead of errors
Verification
npm run lintnpm run build- Local smoke test covering RBAC rules, metrics aggregation/trend/resolution time, issue flows, activity log, and notifications
- Production verification for
/api/v1/metrics/overviewand/api/v1/projects/:id/members