{
"type": "SET_VALUE",
"ref": "/apps/knowledge/explorations/0x1F9b7b3c342602A93D6E22C62C4aE3Ba7ac91f4A/lessons|architecture/-Oy-NoZEnuzeWA_BCKcj/apps/knowledge/explorations/0x1F9b7b3c342602A93D6E22C62C4aE3Ba7ac91f4A/lessons|architecture/-Oy-NoZEnuzeWA_BCKcj",
"value": {
"topic_path": "lessons/architecture",
"title": "Event Sourcing over CRUD for Audit Trails",
"content": "The team decided to move from standard CRUD in PostgreSQL to Event Sourcing with Kafka for the financial transactions audit trail. The problem with CRUD was that updates overwrite previous states, making it impossible to provide compliance with historical change details. Database triggers were considered but rejected because they lose business context. The chosen approach stores immutable domain events in Kafka, with a materialized view in Postgres for fast frontend reads. This follows Martin Fowler Event Sourcing Pattern article.",
"summary": "Adopt Event Sourcing with Kafka instead of CRUD for financial transaction audit trails.",
"depth": 2,
"tags": "lesson_learned,event-sourcing,kafka,audit-trail,compliance",
"created_at": 1784565418256,
"updated_at": 1784565418256
},
"is_global": false
}