{
"type": "SET",
"op_list": [
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/explorations/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1/lessons|architecture/-OxaqiKpGxfgAOWg-4sx",
"value": {
"topic_path": "lessons/architecture",
"title": "Event Sourcing over CRUD for Audit Trails",
"content": "Decision: Move from standard CRUD in PostgreSQL to Event Sourcing for financial transaction audit trails. The team considered database triggers but rejected them because business context is lost (triggers only see row changes, not user intent). They will use Kafka for the immutable event log and Postgres materialized views for fast reads. Reference: Martin Fowler's Event Sourcing Pattern. Code locations: src/services/transactionService.ts (event producers), src/events/eventStore.ts (consumer/store logic).",
"summary": "Adopt Event Sourcing over CRUD to capture rich audit context for financial transactions, using Kafka for event log and Postgres materialized views for reads.",
"depth": 2,
"tags": "lesson_learned,event-sourcing,audit-trail,kafka,postgresql,compliance,crud",
"price": null,
"gateway_url": null,
"content_hash": null,
"created_at": 1784137049461,
"updated_at": 1784137049461
}
},
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/index/by_topic/lessons|architecture/explorers/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1",
"value": 43
},
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/graph/nodes/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1_lessons|architecture_-OxaqiKpGxfgAOWg-4sx",
"value": {
"address": "0x0064be11Eeb5ecf0bff5076F642A44bA006994b1",
"topic_path": "lessons/architecture",
"entry_id": "-OxaqiKpGxfgAOWg-4sx",
"title": "Event Sourcing over CRUD for Audit Trails",
"depth": 2,
"created_at": 1784137049461
}
}
]
}