npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@devxcommerce/strapi-plugin-audit-log

v1.2.0

Published

End-to-end admin-panel activity audit log (content, media, settings, auth) with an admin UI

Readme

@devxcommerce/strapi-plugin-audit-log

Records end-to-end admin-panel activity for Strapi 5 and exposes an Audit Logs UI (main nav) showing who did what — content changes, settings changes, media, and logins.

Install

bun add @devxcommerce/strapi-plugin-audit-log
# or: npm install @devxcommerce/strapi-plugin-audit-log

Enable it in config/plugins.ts:

export default ({ env }) => ({
  'audit-log': { enabled: true },
  // …other plugins
});

Mount the settings/auth/media capture middleware in config/middlewares.tsbefore strapi::errors so failed logins are still recorded:

export default [
  'strapi::logger',
  'plugin::audit-log.audit-http',
  'strapi::errors',
  // …rest of the default stack
];

That's it — the content-change capture, RBAC permission, DB indexes, and retention cron register automatically on boot.

What it captures

| Category | Source | Events | |---|---|---| | content | Document-service middleware (all content types) | entry.create / update / delete / publish / unpublish | | settings | Global admin-route middleware | roles, permissions, admin users, API/transfer tokens, webhooks, SSO | | media | Global admin-route middleware | uploads, edits, deletes | | auth | Global admin-route middleware | login (success and failure), logout, password reset |

Each entry stores the acting admin (snapshot), action, a human-readable target label, the sanitized payload, IP, and request id. Deletes also store a snapshot of what was removed.

Architecture

  • server/capture/document-capture.ts — semantic content capture via strapi.documents.use.
  • server/middlewares/audit-http.ts — settings/auth/media via admin-route interception (mounted before strapi::errors in config/middlewares.ts, so failed logins are recorded). Deliberately skips /content-manager/* (handled by the document middleware) to avoid double-logging.
  • server/services/recorder.ts — single write path; recursively redacts secrets/passwords/tokens, then size-caps the blob; writes via the query engine (bypasses the document middleware → no feedback loop); fail-open (an audit error never breaks the admin action).
  • server/content-types/audit-log — hidden, append-only audit_logs table.
  • admin/ — the read-only UI (filter by search/category/status/user/action/date, paginated, CSV export, per-row details with a field diff).

Configuration

All config is optional and set under config/plugins.ts'audit-log': { config: { … } }:

| Option | Default | Purpose | |---|---|---| | retentionDays | 90 | Daily 03:00 cron prunes entries older than this (batched delete). | | maxPayloadBytes | 16384 | Cap on a stored payload blob; larger is truncated with a marker. | | capture | all true | Per-category switch: { content, media, settings, auth }. | | contentActions | all | Which content actions to record (create/update/delete/publish/unpublish). | | excludeContentTypes | [] | Content-type UIDs to skip entirely (e.g. high-churn singletons). | | sensitiveKeys | [] | Extra key names to redact, on top of the built-in secret list. |

  • The legacy AUDIT_LOG_RETENTION_DAYS env var still works but is deprecated — prefer config.retentionDays.
  • Access is gated by the plugin::audit-log.read RBAC permission (Super Admin by default; grantable per role in Settings → Roles).

Not a tamper-proof ledger

This is an activity log, not a forensic audit trail: the audit_logs table is hidden from the Content Manager but is not cryptographically tamper-evident. Read operations are intentionally not logged. For compliance-grade immutability (hash-chaining / write-only storage), treat that as a bespoke add-on.

Requirements

  • Strapi ^5
  • Node >=20 <=24

See examples/ for ready-to-copy config/plugins.ts and config/middlewares.ts snippets.

Links

License

MIT