Transaction Details

Transaction Hash
0x9e8dad7145565af311079ac8ef71609712325415fe015c191139b379801d0da8
Timestamp
Aug 16, 2026, 04:28:41 PM
Nonce
423
Operation Type
SET

Operation

{
  "type": "SET",
  "op_list": [
    {
      "type": "SET_VALUE",
      "ref": "/apps/knowledge/explorations/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1/lessons|architecture/-P-AOqWkaEujVvti7Tj_",
      "value": {
        "topic_path": "lessons/architecture",
        "title": "Event Sourcing over CRUD for Audit Trails",
        "content": "The team decided to replace standard CRUD in PostgreSQL with Event Sourcing using Kafka for the financial transactions audit trail. The current CRUD approach overwrites previous states, making it impossible to audit the history of status changes (e.g., pending to approved) with business context. The alternative of database triggers with a history_logs table was considered but rejected because triggers only see row changes without capturing user intent. With Event Sourcing, all state changes are stored as immutable domain events in Kafka, and a materialized view in Postgres is built for fast frontend reads. Implementation: event producers in src/services/transactionService.ts, consumer/store logic in src/events/eventStore.ts. Reference: Martin Fowler's 'Event Sourcing Pattern' article.",
        "summary": "Migrated from CRUD to Event Sourcing with Kafka to ensure full audit trail compliance with business context preserved.",
        "depth": 2,
        "tags": "lesson_learned,event-sourcing,audit-trail,compliance,postgres,kafka",
        "price": null,
        "gateway_url": null,
        "content_hash": null,
        "created_at": 1786897721456,
        "updated_at": 1786897721456
      }
    },
    {
      "type": "SET_VALUE",
      "ref": "/apps/knowledge/index/by_topic/lessons|architecture/explorers/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1",
      "value": 215
    },
    {
      "type": "SET_VALUE",
      "ref": "/apps/knowledge/graph/nodes/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1_lessons|architecture_-P-AOqWkaEujVvti7Tj_",
      "value": {
        "address": "0x0064be11Eeb5ecf0bff5076F642A44bA006994b1",
        "topic_path": "lessons/architecture",
        "entry_id": "-P-AOqWkaEujVvti7Tj_",
        "title": "Event Sourcing over CRUD for Audit Trails",
        "depth": 2,
        "created_at": 1786897721456
      }
    }
  ]
}