A scalable and secure backend banking system built using Node.js, Express.js, MongoDB, and JWT Authentication.
This project simulates real-world banking operations including user authentication, account management, transactions, ledger tracking, and audit logging.
- User Registration
- User Login
- JWT-based Authentication
- Protected Routes
- Token Blacklisting (Logout Support)
- Create Bank Accounts
- Account Validation
- Account Information Retrieval
- Customer Account Association
- Secure Fund Transfers
- Initial Account Funding
- Transaction Recording
- Transaction Validation
- Atomic Transaction Processing
- Double-Entry Ledger Recording
- Financial Audit Trail
- Debit & Credit Tracking
- Transaction Ledger Management
- Email Notifications
- Transaction Confirmation Emails
- Account Activity Alerts
- Password Hashing with bcrypt
- JWT Token Verification
- Protected API Endpoints
- Environment Variable Security
- Centralized Error Handling
CORE-BANKING-SERVICE
│
├── src
│ ├── config
│ │ └── db.js
│ │
│ ├── controllers
│ │ ├── accountController.js
│ │ ├── auth.controller.js
│ │ └── transaction.controller.js
│ │
│ ├── middleware
│ │ └── auth.middleware.js
│ │
│ ├── models
│ │ ├── user.model.js
│ │ ├── account.model.js
│ │ ├── transaction.model.js
│ │ ├── ledger.model.js
│ │ └── blackList.model.js
│ │
│ ├── routes
│ │ ├── auth.routes.js
│ │ ├── account.routes.js
│ │ └── transaction.routes.js
│ │
│ ├── services
│ │ └── email.service.js
│ │
│ └── app.js
│
├── .env
├── server.js
├── package.json
└── README.md
| Technology | Purpose |
|---|---|
| Node.js | Runtime Environment |
| Express.js | Backend Framework |
| MongoDB | Database |
| Mongoose | ODM |
| JWT | Authentication |
| bcrypt.js | Password Hashing |
| Nodemailer | Email Service |
| dotenv | Environment Variables |
git clone https://github.com/yourusername/core-banking-service.gitcd core-banking-servicenpm installCreate a .env file:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_email_passwordDevelopment Mode
npm run devProduction Mode
npm start| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register | Register User |
| POST | /api/auth/login | Login User |
| POST | /api/auth/logout | Logout User |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/accounts | Create Account |
| GET | /api/accounts/:id | Get Account |
| GET | /api/accounts/balance/:id | Check Balance |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/transactions | Create Transaction |
| POST | /api/transactions/system/initial-funds | Create Initial Funds Transaction |
- JWT Authentication
- Password Hashing using bcrypt
- Route Protection Middleware
- Environment Variable Security
- Token Blacklisting
- Input Validation
- Error Handling
User Login
│
▼
JWT Generated
│
▼
Authenticated Request
│
▼
Transaction Processing
│
▼
Ledger Entry Creation
│
▼
Account Balance Update
│
▼
Email Notification
- Role-Based Access Control (RBAC)
- KYC Verification
- Loan Management System
- Fixed Deposit Module
- UPI Integration
- Real-time Notifications
- Transaction Analytics Dashboard
- Microservices Architecture
Run Tests:
npm testRiyanshu Sharma
B.Tech CSE (2024-2028)
Backend Developer | Banking Systems Enthusiast
This project is licensed under the MIT License.