SShortSingh.
Back to feed

Event sourcing pattern fixes silent reconciliation drift in NestJS fintech backend

0
·1 views

A NestJS-based fintech backend was experiencing recurring reconciliation drift, where internal ledger figures consistently failed to match payment processor records by small but significant amounts. Investigation revealed that three separate code paths — a webhook handler, a retry job, and an admin support tool — could each independently update a transaction's status without any shared record of changes. Because the system overwrote transaction states directly, there was no audit trail to determine whether a settlement had been applied once or multiple times. The fix involved replacing direct status updates with an event sourcing approach, where every status change is stored as a new immutable record that includes its origin source. This allows engineers to reconstruct a transaction's full history and quickly identify duplicate or conflicting updates during reconciliation reviews.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer Questions Whether Programming Languages Still Need to Exist in the AI Era

A technologist who attended a major tech advisory board in 2023 has been reflecting on a question sparked by the early rise of AI code generation tools. While most observers focused on AI's ability to write code, this developer began questioning whether programming languages themselves remain the right interface between human intent and machine execution. The current AI-assisted workflow still routes human intentions through traditional programming languages before reaching machines, which the author argues may be optimizing the wrong layer. Drawing on concepts like Intentional Programming, the piece asks whether a future computing paradigm might use representations designed for machines rather than humans. The author stresses that as AI takes on more software-building tasks, human understanding of systems becomes more critical, not less, especially as software increasingly controls physical infrastructure and medical devices.

0
ProgrammingDEV Community ·

Solo Developer Builds and Launches Block Puzzle Game Using React Native and Expo

A solo developer from Pakistan recently launched Blockbeam, a free block puzzle mobile game built entirely with React Native and Expo, now available on Google Play. The 8x8 grid game lets players drag colorful blocks to fill rows and columns, featuring six color themes, daily rewards, and power-ups with no paywalls. The developer used a stack including Expo SDK 54, react-native-reanimated for smooth animations, and react-native-gesture-handler for drag-and-drop mechanics. A flat 64-element array powers the board state, while a custom greedy solver algorithm drives an auto-play bot that evaluates every possible move to maximize line clears. The project highlights React Native's viability for casual 2D game development, with the developer recommending early TypeScript adoption and real-device testing as key lessons learned.

0
ProgrammingDEV Community ·

Developer builds open-source tool to stop AI coding assistants defaulting to generic designs

A solo developer created an open-source tool called Tastemaker after noticing that AI-generated websites consistently defaulted to the same indigo gradients, fonts, and card layouts. The free tool works as a skill folder for AI coding assistants like Claude Code, Cursor, and Windsurf, locking in a defined design system — including color palettes, font pairings, illustrations, logos, and animations — before any code is written. The developer chose five curated color presets but discovered during WCAG contrast testing that two initially failed readability standards, prompting corrections before release. Tastemaker requires no API keys or account setup and is available on GitHub under the MIT license. The project argues that any deliberate design direction, once written down and tested, produces more distinctive and accessible results than leaving an AI model to improvise.

0
ProgrammingDEV Community ·

Single RTX 5090 Replicates 12-GPU Cluster Proof, Using 41% Less Search Work

A software developer rebuilt a 2023 NeurIPS game-solving algorithm and ran it on a single Nvidia RTX 5090 to benchmark a decade of GPU progress against a 12-card GTX 1080Ti cluster. The experiment used an identical solver, problem, and settings — only the hardware differed — targeting a mathematical proof for a 7x7 Go opening called JA. The single card completed the proof in 41.4 hours versus the cluster's 8.9 hours, but operated with just 1/16 the parallel workers. Despite the slower wall-clock time, the RTX 5090 required 41% less total search work, largely because its co-located trainer updated the neural network guidance roughly every 37 seconds compared to every 2.5 minutes on the cluster. The results suggest that more frequent model updates during online fine-tuning meaningfully reduce search effort, though the author notes worker count and update frequency remain statistically confounded in this single comparison.

Event sourcing pattern fixes silent reconciliation drift in NestJS fintech backend · ShortSingh