laravel-chronicle/core
Cryptographically verifiable audit ledger for Laravel. Append-only entries are hash-chained so tampering, deletion, or reordering is detectable—built for security logging, compliance, and forensic audit trails.
deleted_at is a weak answer; a verifiable ledger with signed checkpoints and external anchoring is a defensible one. This package is effectively a go/no-go enabler for selling into those buyers.HasChronicle automatic model auditing, (2) chronicle:checkpoint on a schedule, (3) external anchoring (RFC 3161 TSA in core, or AWS S3 Object Lock via laravel-chronicle/anchor-s3), (4) KMS/HSM signing via laravel-chronicle/kms-aws so the private key never lives in app config, (5) scalable verification modes in CI/ops. Each step is independently valuable and independently demoable — good for quarterly planning.chronicle:verify --checkpoints-only --anchors returning an O(checkpoints) proof rather than a full re-walk is a meaningful operational lever: it turns "verify the ledger" from a nightly batch that grows forever into something you can run hourly or on-demand from an auditor. That changes what you can promise in a security questionnaire.chronicle:key:rotate writes a boundary checkpoint first) means key rotation is a scheduled maintenance event, not a breaking migration. PM decision: who owns the private key, where it lives (env vs. KMS/HSM), and what the rotation cadence is — this is a policy input, not just an engineering one.metadata, what gets tokenized, and how erasure coexists with an immutable ledger. Better to settle this before shipping than to discover it during a DSR.Chronicle\Testing\LedgerSeeder drives the real write path (hash chain + signing) inside one transaction, so seeded ledgers actually verify — raw factory inserts do not. PM-relevant because it prevents a class of "our audit tests pass but prove nothing" bugs and keeps integration suites fast.Consider adopting when:
ext-sodium + ext-openssl are acceptable production dependencies (verify this against your hosting/container baseline — a non-trivial share of managed PHP platforms and hardened images omit or gate these).HasChronicle, Chronicle::observe(), and the fluent record()->actor()->action()->subject()->commit() chain make this consistent across teams.Look elsewhere when:
laravel-chronicle) that is community rather than first-party. That is a young, unproven dependency in a security-critical path — reasonable teams will defer.chronicle:verify cadence in CI or ops, or have no plan to act on a verification failure. A tamper-detection system nobody monitors is a compliance liability, not an asset.To executives and buyers: Chronicle turns "we have logs" into "we can prove our logs are complete and unaltered." Most of the cost of compliance is evidence-gathering, and audit trails are one of the few controls you can make self-verifying. It is MIT-licensed, self-hosted, and replaces what would otherwise be a bespoke, permanently-maintained cryptographic component. The pragmatic framing: it compresses months of audit-prep friction and unblocks enterprise and regulated deals, at the cost of one dependency and a key-management runbook. The caveat to state plainly: this is an early-stage package (~128 stars, no dependent projects, no commercial support tier), so adoption should be paired with an abstraction seam and a documented exit path rather than wired into every call site.
To engineering: It does the cryptographic work properly and gets out of the way. Payload canonicalization, SHA-256 hash chaining, ULID generation, and transactional persistence are handled inside commit(); automatic Eloquent auditing is a single trait or Chronicle::observe() registration. Signing is pluggable — Ed25519 via libsodium or ECDSA P-256 via OpenSSL out of the box, with KMS/HSM adapters available — and the key ring means rotation is a scheduled operation (chronicle:key:rotate writes a boundary checkpoint) rather than a data migration. Verification is tiered, so CI doesn't re-walk the entire ledger on every run: full, --since-last-checkpoint, --from-checkpoint/--to-checkpoint, --checkpoints-only --anchors, and --resume. LedgerSeeder seeds verifiable fixtures through the real write path, which fixes the common trap where factory-inserted audit rows silently fail integrity checks. The reference resolver is DB-free by default (resolveReference / referenceLabel) and only hydrates on explicit opt-in — a detail that matters when rendering audit views over a large ledger.
What I would flag before sign-off: the append-only chain is serial by construction; the ext-sodium/ext-openssl requirements must be confirmed against the deployment image; anchor failures are non-fatal by design (good for availability, but it means your monitoring must alert on pending/failed anchors, not assume the checkpoint implies anchoring); and the external anchoring and KMS paths are the newest parts of the surface area, so pilot them in staging with a real TSA/S3 bucket before betting a compliance deadline on them. Recommended rollout: adopt the ledger and checkpoints first, add anchoring once verification is running in CI and someone owns the alerting, then move the private key to KMS.
How can I help you explore Laravel packages today?