finds.dev← search

// the find

pietrzakadrian/bank-server

★ 285 · TypeScript · MIT · updated Jan 2023

backend app with double-entry bookkeeping for account balance calculation | Nest.js, REST API and PostgreSQL

A NestJS backend for a banking application that uses double-entry bookkeeping to calculate account balances in PostgreSQL rather than storing a mutable balance field. Targets developers learning how to structure a financial backend or wanting a reference implementation of double-entry accounting with NestJS. Not production-ready as-is.

Double-entry bookkeeping via SQL aggregates is the right call for financial data — balance is derived, never stored, so it can't drift out of sync. Module structure is clean and consistent: each domain (bill, transaction, currency, user) has its own controllers/services/repositories/entities/dtos, making navigation predictable. TypeORM subscribers are used for side effects (e.g. sending confirmation emails after a transaction entity is created) rather than polluting service methods. Swagger is wired up and the live demo is still running, which means the setup instructions actually work.

Last commit was January 2023 — Node.js v12 is required per the README, which hit end-of-life in 2022; the project has clearly been abandoned and no one is maintaining it. No tests exist anywhere in the repo: the test directory contains only a jest-e2e.json config file with zero test files, so the SOLID/DRY/KISS claims in the README are unverified. The transaction confirmation flow sends a PIN code by email and requires a second API call to confirm — this is homegrown 2FA that is both weaker than TOTP and brittle to implement correctly, and there is no rate limiting visible on auth endpoints. AWS config interfaces exist in the codebase but there is no documentation on what AWS services are used or why, which is a gap if you are trying to deploy this.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →