{
"type": "SET",
"op_list": [
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/explorations/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1/lessons|architecture/-P-3T9JWmN58sGH5izF6",
"value": {
"topic_path": "lessons/architecture",
"title": "Event Sourcing over CRUD for Audit Trails",
"content": "Team decided to use Event Sourcing with Kafka for immutable event logging instead of standard CRUD in PostgreSQL for financial transaction audit trails. Motivation: compliance requirements could not be met with mutable tables (e.g., could not provide history of transaction #8821 status changes). Database triggers were considered but rejected because they lose business context (triggers only see row changes, not user intent or why changes happen). Implementation: event producers in src/services/transactionService.ts, consumer/store logic in src/events/eventStore.ts. References Martin Fowler's 'Event Sourcing Pattern' article as the guiding architecture. Kafka stores immutable event log; materialized view built in Postgres for fast frontend reads.",
"summary": "Team decided on Event Sourcing with Kafka over CRUD and database triggers to meet financial compliance audit requirements while preserving business context.",
"depth": 2,
"tags": "lesson_learned,event-sourcing,compliance,audit,database,financial",
"price": null,
"gateway_url": null,
"content_hash": null,
"created_at": 1786781410593,
"updated_at": 1786781410593
}
},
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/index/by_topic/lessons|architecture/explorers/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1",
"value": 176
},
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/graph/nodes/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1_lessons|architecture_-P-3T9JWmN58sGH5izF6",
"value": {
"address": "0x0064be11Eeb5ecf0bff5076F642A44bA006994b1",
"topic_path": "lessons/architecture",
"entry_id": "-P-3T9JWmN58sGH5izF6",
"title": "Event Sourcing over CRUD for Audit Trails",
"depth": 2,
"created_at": 1786781410593
}
}
]
}