XRAPH/Work/Audit trail
Go · since 2026

Chronicle

An append-only audit log where every event carries the hash of the one before it, so an edit or a deletion breaks the chain and shows up in verification. Per-subject encryption means a GDPR erasure request destroys a key rather than a row, and the chain still verifies afterwards. Exports SOC 2, HIPAA and EU AI Act reports.

Language
Go
Category
Audit trail
Since
2026
Stars
0
Repository
01

Anatomy

3 modules
01

Chain

Hash-linked entries; tampering breaks the link.

02

Crypto-erasure

Deleting the key deletes the content, not the chain.

03

Query

Who did what to which record, answerable months later.

02

Why it exists

Design notes

#What it is

Chronicle is an immutable audit trail. Every event is linked to the one before it by SHA-256, so editing or deleting an event breaks the chain and shows up in verification.

It does not prevent tampering, since nothing prevents someone with database access from writing to the database. It makes tampering detectable, which is the property auditors are actually asking about.

#GDPR without breaking the chain

An append-only hash-linked log and a right to erasure are not compatible in their naive forms. Chronicle resolves it with per-subject AES-256-GCM encryption: personal data in an event is ciphertext under a key belonging to that data subject, and the key lives outside the log.

Destroy the key and the ciphertext stays exactly where it is with its hash unchanged, so the chain still verifies end to end, while the plaintext is unrecoverable.

You delete the key, not the record.

The catch is that key management becomes the whole problem, including backups of the key store, and that a key vault with a thirty-day soft-delete window quietly invalidates the claim.

#What else it does

  • Multi-tenant scoping from context, so cross-tenant queries are impossible rather than filtered.
  • Compliance reports for SOC 2 Type II, HIPAA, the EU AI Act and custom frameworks, exported to JSON, CSV, Markdown or HTML.
  • Pluggable stores: Postgres via pgx, Grove, SQLite, Redis as a cache layer, memory for tests.
  • Pluggable sinks for fire-and-forget outputs (stdout, file, S3, custom) that never block the pipeline.
  • Retention policies with scheduled archival and purge.
  • 21 admin endpoints covering events, verification, erasure, retention, compliance and stats.

#The design constraint

An audit event has a fixed shape: actor, action, resource, outcome, scope, timestamp. Every request to add a free-form field has been refused. That is why a compliance report is a query rather than a text-mining project.

03

Signals

GitHub
Stars
0
Language
Go
Since
2026
Adopters
00

Shipping something on Chronicle? Nobody is listed here yet. Tell me what you built and you will be the first.

Get listed