Case studies
Custom

Ledgerfern

A Bubble finance operations migration with reproducible approved batches

  • Custom
  • Finance operations
  • Bubble

33days

Delivery

50/50

Historical reproducibility

40/40

Approval integrity

44s

75.6% lower

10,000-record reconciliation, p95

Illustrative before/after figures.

The product

Preparers assembled records, approvers authorised batches and reconcilers compared output with an accounting system. The product handled two currencies and one existing export. It did not hold or move funds. Some batches combined thousands of underlying entries, while corrections referred back to earlier records. A matching grand total could conceal two offsetting errors, making record-level identity as important as arithmetic.

The challenge

The story's trigger was a historical batch that balanced but could not be reproduced using today's rules. The team inspected rounding, source snapshots and the meaning of approval at decision time. Better versioning in the original app was considered before selecting a migration supported by the receiving engineering team. The chosen rebuild addressed stable operational requirements; it did not create a new financial product or establish regulatory compliance.

The finance owner needed to reproduce an approved historical reconciliation after rates or rounding rules changed. A total that merely looked close was unacceptable, and editing an approved result obscured its history. We agreed precision, versioning and correction policies before rebuilding calculation paths. The example retained two currencies and one accounting contract; adding currencies or changing financial policy would require a separate acceptance set.

How we tackled it

  1. 01

    Fix representation. Amounts used exact decimal or integer minor-unit rules with currency-specific precision.

  2. 02

    Preserve reproducibility. Each approved result retained calculation version and source snapshot.

  3. 03

    Bind authority. Approval referenced the exact batch version, so an edit could not inherit an earlier decision silently.

  4. 04

    Keep correction lineage. Changes referenced their original records; export intents reconciled uncertain external outcomes before retrying.

What we built

Next.js and TypeScript provided the operating interface. Postgres with Drizzle stored monetary records, snapshots and decisions. A durable worker handled reconciliation and the existing accounting export. Managed identity enforced preparer, approver and reconciler boundaries. Diagnostic logs used operation references without unnecessary financial details. Calculation releases and schema changes were included in the deployment and recovery procedures.

The rehearsal compared individual records and aggregate totals by currency and period. Tests covered negative corrections, rounding boundaries, revoked approvers and a lost export acknowledgement. Finance reviewers approved reference examples before migration. Approval and export paused for the final in-flight reconciliation. Recovery preserved new corrections and external acknowledgements before reopening the earlier route. A technically balanced but outdated snapshot was not treated as sufficient.

Before & after — illustrative results

The illustrative reproducibility result checks 50 historical fixtures from their versioned inputs. Exact monetary agreement is required together with record identity and correction links. Performance uses five parallel 10,000-record reconciliation runs on one stated environment. The figures describe an invented controlled comparison, not a faster real month-end close or reduced finance-team cost. Those business outcomes would require actual operating records.

Illustrative before/after values. No tests or client measurements were performed for this story. The comparison conditions describe how an equivalent real migration would be evaluated; they are not a test report.

MetricBeforeAfterComparison conditions
Monetary reconciliation100,000 source records in two currenciesExact fixture totals; 0 unresolved record mismatchesCompare identity, precision, amount, period and correction lineage.
Historical reproducibility38/50 reference batches reproduce exactly50/50 reproduce exactlySame versioned inputs and approved rounding policies.
Approval integrity31/40 defined checks pass40/40 passPost-approval edits, revoked roles and duplicate approval requests.
10,000-record reconciliation, p95180 seconds44 seconds — 75.6% lowerFive parallel runs on a fixed environment; output correctness remains required.
Investigate a reconciliation discrepancy, median55 min14 minTen fixed discrepancies; same finance operator; reproduce exact input version and correction lineage before resolution.
Prepare a historical batch evidence pack, median90 min25 minTen approved batches; identical required inputs, outputs, approvals and rule versions; no claim about an external audit opinion.

The outcome

Ledgerfern ended the example with a reviewer able to reconstruct an approved batch and explain a later correction without losing the original decision. Handover included deterministic examples, the precision glossary and recovery instructions for ambiguous exports. The case illustrates Custom work where correctness and traceability must be designed into the migration, rather than checked only through a final balance.

Why these improvements mattered

The receiving team could trace a number back to a versioned input rather than rebuild its history from emails. Correction records preserved the original approval. These changes make future maintenance more predictable, but the example does not equate a shorter reconciliation with lower financial or regulatory risk in every deployment.

Scope & timeline

Scope

Custom delivered the calculation specification, precision policy, source snapshots, approval-version model and accounting adapter. The two currencies and existing export contract defined the boundary. Unknown historical rates or approvals entered an exception register rather than being inferred. Corrections followed a controlled path instead of unrestricted editing of approved output. Where that changed behaviour, the finance owner approved the change explicitly.

Delivery timeline

Delivery schedule: 33 working days. Team: Two senior engineers, shared QA and a finance owner available for exact-result approval. The clock starts after scope approval, usable source data, test access and agreed UI are available. Waiting for external approvals is excluded. This is a bounded example, not a turnaround guarantee.

Days 1–7: approve precision, snapshots and correction semantics.

Days 8–20: build versioned calculations and accounting exchange.

Days 21–30: reproduce reference batches and test approval integrity.

Days 31–33: switch accepted batches and transfer finance operations.

FAQ

Is a matching total sufficient for financial data migration?
No. Record identity, currency precision, correction relationships and approval versions must agree as well.
Can approved history be preserved when rules change?
Versioned calculations and source snapshots can retain the meaning of earlier output while new work follows the updated rules.

Discuss a similar migration

Bring a historical batch, its approved output and a correction that changed the source records. Bubble to Code can define the reproducibility contract and reconciliation depth for Custom scope. Establish what must be provable about each amount and approval before selecting new integrations.