← Back to Projects

Verdant Bank

Full Stack Developer · Completed

Overview

Full-stack banking app with accounts, instant transfers, loans with real reducing-balance EMI schedules, and role-based dashboards for customers, staff and admins. A React 18 + Vite frontend sits on an Express API with MongoDB. Balance changes are atomic and cent-exact with race-safe idempotency keys, JWTs are re-checked against the live database on every request, and a documented live QA pass covered every flow across all three roles.

Key Highlights

  • ▹Loan lifecycle: apply → staff review (sets the rate) → disbursal → reducing-balance EMI schedule → repayment → auto-close
  • ▹Atomic, cent-exact balance updates and race-safe idempotency keys for deposits and transfers
  • ▹Customer, employee and admin roles with live role/suspension checks on every request; self-approval and self-demotion are blocked
  • ▹136 automated tests (108 server, 28 client), a 76-check black-box API battery, and performance measured at 60k transactions

Tech Stack

React.jsViteReact RouterNode.jsExpress.jsMongoDBMongooseJWTbcryptJestSupertestVitestReact Testing LibraryGitHub Actions

Architecture

React 18 SPA (Vite, React Router) → Express API (helmet, CORS, rate limits, mongo-sanitize, express-validator) → JWT auth and role guards → controllers (accounts, transactions, loans, admin) → money and loan-schedule utilities (cent-exact updates, EMI maths) → MongoDB (users, accounts, transactions, loans). Money moves are single-document atomic updates with compensating writes.

Performance Optimizations

From the repository's QA report (2026-11-20), local run at 60k transactions and 3k accounts: key endpoints respond in 2–110 ms; sign-in takes about 0.6–0.7 s by design (bcrypt cost 12). The run found and fixed missing indexes (accounts.owner, accounts.status, transactions.createdAt), unpaginated staff lists (optional page and limit, default 100, maximum 500, total in X-Total-Count), a staff search that refetched four endpoints per keystroke (300 ms debounce: 14 keystrokes became one request) and a single 264 kB JavaScript chunk (staff and loan screens are lazy-loaded; main chunk 248.6 kB, 80.8 kB gzipped). Deep skip() pagination was left alone on purpose (page 1,500 of 40k rows took 93 ms) until history passes roughly a million rows.

Future Improvements

Replace the demo-only self-service deposits with a real funding model, move balances to integer minor units with multi-document transactions, add cursor pagination for very large histories, and add email/SMS, statements and password reset. The repository documents these as known limitations; the app is not deployed.