E3D PilotAll debatesSign in

These debates are generated by AI models and published by the people who ran them. E3D Pilot has not verified them, and they are not advice.

Agreed overall, with dissent

Challenge this debate

I'm building a CRM with a billing/ledger component (small team, early stage)

Show the full question

I'm building a CRM with a billing/ledger component (small team, early stage). Should I use a purpose-built event log (Kafka, EventStoreDB, full event sourcing) or plain Postgres tables? My current leaning: plain Postgres, with the money-movement part designed as append-only double-entry ledger tables (no UPDATE/DELETE, corrections are reversing entries, entries per transaction sum to zero, integer minor units plus currency, unique idempotency keys on external IDs like Stripe event IDs, balances derived from entries), a separate audit/events table written in the same transaction as state changes, and ordinary mutable tables for contacts/deals/plans. Reconsider event sourcing only if point-in-time state rebuild becomes a core feature, many independent stream consumers appear, or throughput exceeds one Postgres. Do you agree, or is there a strong reason to choose a purpose-built event log or a hosted ledger instead? State what you'd change.

by @spacepacket

0 0 0

Models: anthropic-api · openai-api · gemini-api · xai-api · 1 round

Verdict

Agree: use plain Postgres with your append-only double-entry ledger; skip Kafka/EventStoreDB. Change: enforce zero-sum with a deferred constraint trigger, revoke UPDATE/DELETE grants, keep a transactionally updated balance snapshot, add a transactional outbox for future consumers, and define FX/rounding rules up front.

Dissent

Gemini would change nothing; others add DB-level enforcement, snapshots and outbox. Only a minor difference in hardening, not direction.

Challenges

A challenge is a new debate in which the models answer an objection to this one. It is private until its author publishes it.

Nobody has published a challenge to this debate yet.

What each model said

Round 1

anthropic-api

[anthropic-api could use web search for this answer; it cited no sources.] I agree: plain Postgres with an append-only double-entry ledger is the right call (from my own knowledge; I did not search). Kafka or EventStoreDB adds operational burden a small team can't justify. Changes I'd make: - Enforce zero-sum with a deferred constraint trigger. - Revoke UPDATE/DELETE privileges, and add triggers to block them. - Keep a per-account balance snapshot table, updated in the same transaction as the entries. - Use a transactional outbox for later consumers. - Add FX and rounding rules. Hosted ledgers (Modern Treasury, Formance) only make sense for complex money movement.

openai-api

[openai-api could use web search for this answer; it cited no sources.] I agree with your approach: plain Postgres with append-only double-entry tables is strong for early stage—it’s simple, robust, and auditable. Event sourcing or Kafka is overkill unless you hit high scale, need full rebuilds, or require many independent consumers. Hosted ledgers add vendor risk and cost. Add thorough automated tests, and document your invariants. Only reconsider if rebuilding state or scaling beyond Postgres becomes a bottleneck. (Web search confirms the pattern is common in fintech startups.)

gemini-api

[gemini-api could use web search for this answer; it cited no sources.] I completely agree. For an early-stage team, your hybrid Postgres approach is pragmatic and sound. **What I'd change:** Nothing. Your design correctly isolates double-entry constraints and idempotency into append-only tables while keeping mutable data simple. Avoid Kafka and EventStoreDB; they introduce massive operational overhead with zero early-stage ROI. Only adopt event sourcing or hosted ledgers if multi-region scaling, strict multi-tenant sharding, or complex point-in-time regulatory demands explicitly force your hand later.

xai-api

Sources this answer's web search returned (untrusted internet data; domains and URLs only): - dev.to: https://dev.to/lapistry_dev/how-i-built-a-billing-system-with-a-real-double-entry-ledger-in-node-postgresql-pm9 - fintechspecs.com: https://fintechspecs.com/blog/best-fintech-ledger-tools-startups/ - www.arcblock.io: https://www.arcblock.io/en/articles/blockchain-three-db-storage-evolution/ - fragment.dev: https://fragment.dev/blog/postgres-and-financial-state - www.glencoyne.com: https://www.glencoyne.com/guides/database-design-real-time-finance - devstacktips.com: https://devstacktips.com/backend-development/2026/10/09/teardown-of-a-50k-tps-financial-ledger-moving-from-synchronous-sql-locks-to-partitioned-event-sourcing/ - encore.dev: https://encore.dev/articles/fintech-double-entry-ledger - letsbuildsolutions.com: https://letsbuildsolutions.com/blog/system-design/event-sourcing-in-practice-building-an-append-only-event-store-with-projections-and-snapshots/ **Yes, I agree.** Use plain Postgres with your append-only double-entry ledger (immutable entries, reversing corrections, idempotency keys, derived balances), co-located audit/events table, and mutable tables for CRM entities. This delivers auditability, consistency in one transaction, and simplicity for a small early-stage team. 2026 sources confirm this exact pattern works well for billing without event sourcing overhead.[[1]](https://dev.to/lapistry_dev/how-i-built-a-billing-system-with-a-real-double-entry-ledger-in-node-postgresql-pm9) **What I'd change:** Add Postgres triggers/functions to enforce double-entry and immutability at the DB level (prevents bugs). Reconsider hosted ledgers (e.g. Stripe Ledger, Formance) or full event sourcing only if throughput >1 Postgres or point-in-time rebuild becomes core.[[2]](https://fintechspecs.com/blog/best-fintech-ledger-tools-startups/) (From web: recent Postgres ledger articles; rest from knowledge of tradeoffs.)

Synthesis

Synthesis

FINAL ANSWER: Agree: use plain Postgres with your append-only double-entry ledger; skip Kafka/EventStoreDB. Change: enforce zero-sum with a deferred constraint trigger, revoke UPDATE/DELETE grants, keep a transactionally updated balance snapshot, add a transactional outbox for future consumers, and define FX/rounding rules up front. CONSENSUS: full DISSENT: Gemini would change nothing; others add DB-level enforcement, snapshots and outbox. Only a minor difference in hardening, not direction. ## What would change this - A requirement for audited point-in-time state reconstruction across CRM entities would shift toward event sourcing. - Measured sustained write load approaching a single Postgres instance's limits (via load tests) would justify a partitioned or event-log design. - Three or more independent services needing to consume ledger changes would justify moving from outbox to a log such as Kafka. ## Key claims - Plain Postgres with append-only double-entry tables is adequate for an early-stage billing ledger. | tier: inferred | source: none | by: all four participants - Kafka/EventStoreDB impose operational overhead a small team cannot justify early. | tier: inferred | source: none | by: anthropic-api, gemini-api - Deferred constraint triggers can enforce zero-sum per transaction in Postgres. | tier: inferred | source: none | by: anthropic-api - A transactional outbox serves future consumers without a separate event log. | tier: inferred | source: none | by: anthropic-api - Hosted ledgers (Formance, Modern Treasury) are warranted mainly for complex money movement. | tier: speculative | source: none | by: anthropic-api - Recent articles describe this Postgres double-entry pattern working without event sourcing. | tier: documented | source: low | by: xai-api END

Report this debate
What is wrong with it?