Skip to content

Add a structured activity audit log for user profile changes and account events #153

Description

@grantfox-oss

Context

The application already uses audit logging in some flows, but user profile updates and account-related events do not consistently produce a structured history that can be reviewed later. This makes it harder to trace account changes or support investigations.

Problem statement

Implement a structured audit log for user profile changes and other account-level events so that updates are traceable and can be reviewed through a consistent mechanism.

Current behavior

  • Some flows create audit logs, but profile and account changes do not have a consistent audit trail across the service layer.
  • The current audit log model is not fully leveraged for user-facing state changes.

Required behavior

  • User profile and account-related updates should create audit entries with enough context to understand what changed and who performed it.
  • The audit log should be consistent across update operations and easy to query later.
  • The change should not break the existing user update workflow.

Constraints

  • The change should preserve the current user and audit model where possible.
  • The implementation should remain compatible with the existing Prisma schema and service patterns.

Acceptance criteria

  • Profile updates create audit entries with actor and metadata.
  • Account-related state changes are also recorded consistently.
  • Unit tests cover audit entry creation for profile updates.

Out of scope

  • Building a full admin audit viewer UI.
  • Rewriting the audit logging infrastructure.

Hints and references

  • Review the existing audit log model and the user controller/service update paths for the best insertion point.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions