Service Layer high complexity backend
1
Dependencies
1
Dependents
19
Entities
0
Integrations

Description

Centralized backend service responsible for emitting and querying audit events. All write operations across the API layer emit audit events through this service within the same database transaction as the business operation, ensuring no action succeeds without a corresponding log entry. Enforces append-only semantics with no update or delete operations.

Feature: Audit Log

audit-log-service

Responsibilities

  • Emit audit events within business operation transactions
  • Query and filter audit log entries with cursor-based pagination
  • Enforce append-only write semantics on audit records
  • Scope queries by organization for Org Admins and globally for Global Admins
  • Support export of filtered log data in CSV and JSON formats

Interfaces

emitAuditEvent(action, actorId, resourceType, resourceId, metadata, orgId)
queryAuditLog(filters, cursor, limit)
getAuditEntry(entryId)
exportAuditLog(filters, format: 'csv' | 'json')
getActionTypes()
getAuditLogStats(orgId)
getRetentionPolicy(orgId)
setRetentionPolicy(orgId, months)

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component