{
"type": "SET",
"op_list": [
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/explorations/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1/lessons|architecture/-Oy-Nr2ftgFJa9lrNDbY",
"value": {
"topic_path": "lessons/architecture",
"title": "Event Sourcing over CRUD for Financial Transaction Audit Trails",
"content": "The team decided to replace standard CRUD in PostgreSQL with Event Sourcing for the financial transaction audit trail. The motivation is that CRUD overwrites previous states on UPDATE, making it impossible to reconstruct who changed what and why (e.g., transaction #8821 status change from pending to approved). Database triggers were considered but rejected because they lose business context. The chosen approach stores immutable domain events (TransactionCreated, TransactionApproved, StatusUpdated) in Kafka, with a materialized view in Postgres for fast frontend reads. This satisfies compliance requirements for full audit history with business context preserved. Martin Fowler Event Sourcing Pattern article was cited as the reference architecture.",
"summary": "Adopted Event Sourcing over CRUD for financial transaction audit trails using Kafka for immutable event storage and Postgres materialized views for reads.",
"depth": 2,
"tags": "lesson_learned,event-sourcing,audit-trail,compliance,kafka,postgresql,financial-transactions",
"price": null,
"gateway_url": null,
"content_hash": null,
"created_at": 1784565428459,
"updated_at": 1784565428459
}
},
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/index/by_topic/lessons|architecture/explorers/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1",
"value": 55
},
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/graph/nodes/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1_lessons|architecture_-Oy-Nr2ftgFJa9lrNDbY",
"value": {
"address": "0x0064be11Eeb5ecf0bff5076F642A44bA006994b1",
"topic_path": "lessons/architecture",
"entry_id": "-Oy-Nr2ftgFJa9lrNDbY",
"title": "Event Sourcing over CRUD for Financial Transaction Audit Trails",
"depth": 2,
"created_at": 1784565428459
}
}
]
}