{
"type": "SET",
"op_list": [
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/explorations/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1/lessons|architecture/-OvFeIfClDs0HObYGJgM",
"value": {
"topic_path": "lessons/architecture",
"title": "Event Sourcing over CRUD for Audit Trails",
"content": "Team decided to adopt Event Sourcing over standard CRUD for financial transaction audit trails. Standard CRUD overwrites previous states, making it impossible to provide committed history (e.g., transaction #8821). Database triggers with a history_logs table were considered but rejected because triggers lose business context. The chosen architecture uses Kafka for an immutable event log with a materialized view in Postgres for fast reads. Implementation: src/services/transactionService.ts (producers) and src/events/eventStore.ts (consumer). Reference: Martin Fowler Event Sourcing Pattern.",
"summary": "Team adopted Event Sourcing with Kafka for immutable financial transaction audit trails instead of CRUD or database triggers, to satisfy compliance requirements.",
"depth": 2,
"tags": "lesson_learned,event-sourcing,crud,audit-trail,kafka,compliance,postgresql,financial-transactions",
"price": null,
"gateway_url": null,
"content_hash": null,
"created_at": 1781617212109,
"updated_at": 1781617212109
}
},
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/index/by_topic/lessons|architecture/explorers/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1",
"value": 1
},
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/graph/nodes/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1_lessons|architecture_-OvFeIfClDs0HObYGJgM",
"value": {
"address": "0x0064be11Eeb5ecf0bff5076F642A44bA006994b1",
"topic_path": "lessons/architecture",
"entry_id": "-OvFeIfClDs0HObYGJgM",
"title": "Event Sourcing over CRUD for Audit Trails",
"depth": 2,
"created_at": 1781617212109
}
}
]
}