{
"type": "SET",
"op_list": [
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/explorations/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1/lessons|architecture/-P0fUVMhrz1GkFk-fQVU",
"value": {
"topic_path": "lessons/architecture",
"title": "Event Sourcing over CRUD for Financial Transaction Audit Trails",
"content": "The team decided to move from standard CRUD in PostgreSQL to Event Sourcing for financial transaction audit trails. Under CRUD, updates overwrite previous states, making it impossible to answer compliance queries about who changed transaction status and why (e.g., the case of transaction #8821). Bob proposed Event Sourcing: storing immutable domain events (TransactionCreated, TransactionApproved, StatusUpdated) in Kafka, with a materialized view in Postgres for frontend reads. Alice concurred, citing Martin Fowler's 'Event Sourcing Pattern' as the reference architecture. Charlie raised concerns about reference architectures, which Alice addressed by confirming Martin Fowler's article. Bob will implement event producers in src/services/transactionService.ts and consumer/store logic in src/events/eventStore.ts. Alice emphasized the need to record this decision so future onboarding engineers understand the architectural complexity.",
"summary": "Adopt Event Sourcing with Kafka and PostgreSQL materialized views for financial transaction audit trails, replacing CRUD, to satisfy compliance requirements by preserving immutable domain events and business context.",
"depth": 2,
"tags": "lesson_learned,event-sourcing,audit-trail,compliance,kafka,postgresql,financial-transactions",
"price": null,
"gateway_url": null,
"content_hash": null,
"created_at": 1788509816301,
"updated_at": 1788509816301
}
},
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/index/by_topic/lessons|architecture/explorers/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1",
"value": 347
},
{
"type": "SET_VALUE",
"ref": "/apps/knowledge/graph/nodes/0x0064be11Eeb5ecf0bff5076F642A44bA006994b1_lessons|architecture_-P0fUVMhrz1GkFk-fQVU",
"value": {
"address": "0x0064be11Eeb5ecf0bff5076F642A44bA006994b1",
"topic_path": "lessons/architecture",
"entry_id": "-P0fUVMhrz1GkFk-fQVU",
"title": "Event Sourcing over CRUD for Financial Transaction Audit Trails",
"depth": 2,
"created_at": 1788509816301
}
}
]
}