Thriving Thriving Go GO
โ†‘ 61 ?
pb-audit skeeeon/pb-audit

An audit logging library for PocketBase that tracks all record operations across collections, including database events, API requests, and authentication events.

HEALTH ? 91 / Healthy
// solo builder// hidden gem pocketbasepocketbase-plugins ?

// readme

PocketBase Audit Logging (pb-audit)

A comprehensive, production-ready audit logging library for PocketBase applications. Track all database operations, API requests, and authentication events โ€” every one recording who acted, when, and which fields changed. Full before/after values are opt-in per collection, so the trail does not quietly become a copy of everything you store.

Features

  • ๐Ÿ“ Dual-tracking system: Captures both user intent (requests) and actual results (commits)
  • ๐Ÿ”„ Complete change history: Every event names the fields that changed; full before/after values are opt-in per collection
  • ๐Ÿ”’ Safe by default: Values are not copied into the audit log unless you ask for them, so a field left readable for its owner does not become a permanent second copy
  • ๐Ÿ‘ค User attribution: Tracks who performed each action
  • ๐ŸŒ Request metadata: IP addresses, HTTP methods, URLs, and more
  • ๐Ÿ” Authentication events: Login tracking with auth method details
  • ๐Ÿ›ก๏ธ Recursion prevention: Automatically skips logging on audit collection itself
  • ๐Ÿš€ Auto-setup: Creates collection and indexes automatically
  • โš™๏ธ Non-destructive:โ€ฆ