A modern, full-stack MERN application designed for high-performance, secure banking transactions.
- 🔐 Secure Transactions: All money transfers require a mandatory, hashed 4-digit PIN verification.
- 📜 Atomic Ledger: A dual-entry ledger system ensures transaction integrity even in standalone MongoDB environments.
- ⚡ Real-time Updates: Instant balance updates and transaction history tracking.
- 🎨 Premium UI/UX: A modern, responsive dashboard built with React, Tailwind CSS, and Lucide React icons.
- 🛡️ Robust Security: JWT-based authentication stored securely, with password hashing (Bcrypt) and payload validation (Joi).
- 🛠️ Developer Ready: Fully Docker-ready, automated monorepo build scripts, and production-optimized routing.
- React 18 — Fast, modern UI development.
- Tailwind CSS — Utility-first styling for a premium aesthetic.
- React Router v6 — Declarative routing and navigation.
- Axios & Context API — API communication and global state management for auth & transactions.
- Node.js & Express.js (v5) — Robust backend framework.
- MongoDB & Mongoose — Database for flexible user, account, and ledger storage.
- Redis (Upstash) — Fast token blacklisting and session management.
- JWT & Bcrypt — Secure user authentication and password/PIN protection.
EliteBank leverages a scalable MERN architecture with a focus on transaction integrity and security:
┌──────────────────────────────────────────────────────────────────┐
│ CLIENT (React 18) │
│ Context API manages Auth & Transaction states globally │
└──────────┬────────────────────────────┬─────────────────────────┘
│ HTTP (RESTful API) │
▼ ▼
┌───────────────────────┐ ┌────────────────────────────────────┐
│ EXPRESS API SERVER │ │ REDIS (Upstash) │
│ (Node.js / Express) │───>│ (Fast Token Blacklisting & │
│ │ │ Session Management) │
│ • JWT Verification │ └────────────────────────────────────┘
│ • Input Validation │
│ • Ledger Processing │
└──────────┬────────────┘
│
▼
┌───────────────────────┐
│ MONGODB CLUSTER │
│ (Users, Accounts, │
│ Ledger Entries) │
└───────────────────────┘
- Dual-Entry Ledger: Instead of simply updating a balance field, every transaction creates two immutable ledger entries (Debit and Credit). The current balance is calculated dynamically on-the-fly via MongoDB aggregation, guaranteeing absolute data integrity.
- Lazy Account Initialization: Bank accounts are automatically generated upon registration or upon the first login, ensuring users never encounter an "Account Not Found" error.
- Monorepo Structure: A single root
package.jsonseamlessly manages dependencies and build scripts for both the frontend and backend, enabling easy 1-click deployments on platforms like Render.
Follow these instructions to get a copy of the project up and running on your local machine.
- Node.js (v18+)
- MongoDB URI (Local or MongoDB Atlas)
- Redis URL (Local or Upstash)
git clone https://github.com/your-username/bank-system.git
cd bank-system
# Install dependencies for BOTH frontend and backend automatically
npm run install-allCreate a .env file in the backend directory:
PORT=5000
NODE_ENV=development
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
REDIS_URL=your_redis_urlBecause this is a monorepo, you can start both servers concurrently with a single command from the root folder:
# Starts Express on Port 5000 and React on Port 3000
npm run devVisit http://localhost:3000 to access the EliteBank dashboard!
This project is fully optimized for Render using a single-service architecture (the backend serves the frontend in production).
- Build Command:
npm run build - Start Command:
npm start - Environment Variables: Add
MONGODB_URI,REDIS_URL,JWT_SECRET, andNODE_ENV=productionin the Render dashboard.
Contributions are welcome! Please feel free to submit a Pull Request.