Skip to content

feat: audit log viewer in admin dashboard #538

@lakhansamani

Description

@lakhansamani

Problem

Audit logs are now captured via the _audit_logs GraphQL API but there is no UI to view them. Admins need a dashboard page to browse, filter, and search audit events.

Proposed Solution

Add an Audit Logs page to the admin dashboard (web/dashboard/) that:

  • Lists audit log entries in a paginated table with columns: timestamp, action, actor (type + email), resource (type + ID), IP address
  • Supports filtering by:
    • Action (dropdown with known event types from constants)
    • Actor type (user / admin)
    • Resource type (user / session / webhook / email_template / token)
    • Date range (from/to timestamp picker)
  • Supports search by actor email or resource ID
  • Shows detail view on row click (full metadata, user agent, etc.)
  • Auto-refreshes or has a refresh button

Implementation Notes

  • Affected packages: web/dashboard/ (React + Chakra UI + Vite)
  • GraphQL query: _audit_logs with ListAuditLogRequest params (already available)
  • No backend changes needed — the API is complete
  • Security: Only accessible to admin (already enforced by _audit_logs resolver)

Design Considerations

  • Consider using a virtualized table for large audit log sets
  • Timestamp display should respect the admin's timezone
  • Action names could be human-readable labels (e.g., user.login_success → "User Login Success")
  • Export to CSV could be a nice-to-have

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions