MineSync Docs
MineSync Docs
MineSync Documentation
Audit LogBackup & RestoreBenchmark ManagementMaster DataNotificationsAdmin OverviewSettingsTemplatesThemeUpdatesUser Management
Admin

Audit Log

Track all user actions with a tamper-evident audit trail.

Overview

The Audit Log provides a complete, tamper-evident record of all actions performed within your organization. Every create, update, delete, export, and import operation is logged with full context, including who performed the action, what changed, and when it happened.

Key Concepts

Tamper Evidence

Each audit log entry contains a cryptographic hash and a reference to the previous entry's hash, creating a chain. This makes it possible to detect if any entries have been modified or deleted after the fact.

What Is Logged

The audit system captures:

FieldDescription
ActionThe type of operation (CREATE, UPDATE, DELETE, EXPORT, IMPORT, THEME_CHANGE, etc.)
Entity TypeWhat was affected (e.g., FleetVehicle, Profile, TenantMembership, TenantSettings)
Entity IDThe specific record that was affected
ActorThe user who performed the action (user ID and email)
BeforeSnapshot of the record before the change (for updates and deletes)
AfterSnapshot of the record after the change (for creates and updates)
DiffComputed difference between before and after states
RouteThe API route that triggered the action
MethodHTTP method (GET, POST, PATCH, DELETE)
StatusHTTP status code of the response
IP AddressThe actor's IP address
User AgentThe actor's browser/client information
TimestampWhen the action occurred

Automatic Logging

Audit entries are created automatically by the application. There is no way to perform a data mutation without generating an audit log entry. This is enforced through explicit audit helper functions (logAudit, auditInsert, auditUpdate, auditDelete) called in every mutation.

How to Use

Viewing the Audit Log

  1. Navigate to Admin > Audit Log.
  2. Browse entries in reverse chronological order (newest first).

Filtering

Use the filter controls to narrow down the log:

FilterDescription
Text searchSearch across action, entity type, actor email, and route
ActionFilter by action type (CREATE, UPDATE, DELETE, etc.)
Entity TypeFilter by the type of record affected
UserFilter by the user who performed the action
Date rangeFilter by start and end dates

Viewing Details

Click any audit log entry to see its full details, including:

  • The complete before and after snapshots
  • The computed diff showing exactly what changed
  • Actor information and request metadata

Entity History

You can also view the audit history for a specific record by filtering on entity type and entity ID. This shows all changes made to a particular vehicle, profile, work order, or other record over time.

Statistics Dashboard

The audit stats view provides aggregate insights:

  • Action breakdown -- How many creates, updates, and deletes occurred
  • Entity type breakdown -- Which types of records are most frequently modified
  • Top users -- The most active users by action count
  • Activity by day -- A 7-day activity chart showing audit volume over time

Common Questions

Can audit log entries be deleted?

No. Audit log entries are immutable by design. They cannot be deleted or modified through the application.

How long are audit logs retained?

Audit logs are retained indefinitely. They are included in database backups when the "Include Audit Logs" option is selected.

Who can view the audit log?

Only Admin users can access the audit log list, stats, and detail views. Planners can view entity-specific history for records they have access to.

Does the audit log slow down the application?

Audit logging is designed to be lightweight. Log entries are written asynchronously after the main mutation completes, so they do not add significant latency to user-facing operations.

MineSync Documentation

Welcome to the MineSync documentation — your guide to fleet maintenance management.

Backup & Restore

Export and import your organization's data for backup and migration.

On this page

OverviewKey ConceptsTamper EvidenceWhat Is LoggedAutomatic LoggingHow to UseViewing the Audit LogFilteringViewing DetailsEntity HistoryStatistics DashboardCommon QuestionsCan audit log entries be deleted?How long are audit logs retained?Who can view the audit log?Does the audit log slow down the application?