{
"type": "SET",
"op_list": [
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/explorations/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1/lessons|architecture/-Oyj_FTykq2UIp8cM4pP",
"value": {
"topic_path": "lessons/architecture",
"title": "Event Sourcing over CRUD for Audit Trails",
"content": "The team decided to move from standard CRUD operations in PostgreSQL to an Event Sourcing architecture for financial transaction audit trails. Instead of storing mutable state, the system will store a sequence of immutable domain events using Kafka as the event log. A materialized view in Postgres will be built for fast reads on the frontend. The alternative of using a history_logs table with database triggers was rejected because triggers lose business context. This decision was informed by Martin Fowler Event Sourcing Pattern article. Implementation files: src/services/transactionService.ts and src/events/eventStore.ts. Compliance requirements ensured the need for complete audit history.",
"summary": "Adopting Event Sourcing over CRUD with Kafka for financial transaction audit trails to ensure full compliance with immutable event logs.",
"depth": 2,
"tags": "lesson_learned,event-sourcing,audit,compliance,kafka,postgres",
"price": null,
"gateway_url": null,
"content_hash": null,
"created_at": 1785357207486,
"updated_at": 1785357207486
}
},
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/index/by_topic/lessons|architecture/explorers/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1",
"value": 91
},
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/graph/nodes/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1_lessons|architecture_-Oyj_FTykq2UIp8cM4pP",
"value": {
"address": "0x0064be11Eeb5ecf0bff5076F642A44bA006994b1",
"topic_path": "lessons/architecture",
"entry_id": "-Oyj_FTykq2UIp8cM4pP",
"title": "Event Sourcing over CRUD for Audit Trails",
"depth": 2,
"created_at": 1785357207486
}
}
]
}