Skip to content

[FE-36] Build /admin/audit-logs page — HTTP access log viewer with user and date filters #848

Description

@mftee

Overview

Administrators need to review HTTP access logs for security investigations and compliance audits. Once the backend records access logs (BE-06) and exposes them via GET /api/audit (BE-68), this page provides the interface.

Background

File to create: frontend/app/(protected)/admin/audit-logs/page.tsx

Access: Admin role only

Features:

  • Paginated table of audit log entries from GET /api/audit
  • Columns: Actor name/email, Action, Target type + ID, IP address, Timestamp
  • Filters:
    • User filter (search by email)
    • Action type dropdown
    • Date range picker
  • Click a row to expand: show full JSON metadata in a code block
  • "Export CSV" button (calls GET /api/audit?format=csv)

Acceptance Criteria

  • Table loads audit logs in reverse chronological order
  • Date range filter uses a date picker with start and end inputs
  • Row expansion shows the full metadata payload
  • CSV export triggers a file download
  • Table handles empty state when no logs match the filters

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions