ACP-BANK is a full-stack, microservices-based digital banking platform that simulates real-world banking workflows for both Bank Staff (Bank Side) and Users (User Side).
- On the Bank Side, staff authenticate with branch credentials, create customer accounts, and manage deposits.
- On the User Side, customers can only register if their account exists in the bankβs database (just like SBI YONO). Once registered, they can log in, check balances, make payments, and view transaction history.
Built with Node.js/Express microservices, React (Vite) frontend, Kafka for event-driven messaging, Docker for containerization, JWT authentication, and MongoDB for persistence.
- Description
- Workflows
- Features
- Tech Stack
- Project Structure
- Architecture
- Microservices Architecture
- Bank Side Flow
- User Side Flow
- Installation
- Usage
- API Reference
- Testing
- Contributing
- Roadmap
- Known Issues
- License
- Contact
ACP-BANK replicates how modern banks operate with a Bank-First Workflow:
- Bank Staff create customer accounts (with required details + initial deposit).
- Users can only register after their account exists in the Bank DB.
- Secure transactions, payments, and notifications are enabled for verified users.
This design ensures realism and security, just like actual digital banking systems (e.g., SBI YONO).
- Staff login with Branch Name + Branch Secret Code.
- Create new customer accounts (requires initial deposit).
- Validate and manage account details.
- Deposit money into accounts during account creation or later.
- Users can only register if their Account Number exists in Bank DB.
- Registration requires OTP verification (via SMS).
- Login with JWT authentication.
- Users can:
- View account balance.
- Deposit, withdraw, transfer money.
- View transaction history/statements.
- Receive real-time notifications (via Kafka + SMS/Email).
- Branch Authentication: Staff login with branch credentials.
- Account Creation: Staff create new customer accounts with required details.
- Initial Deposit: Accounts are only activated after deposit is made.
- Internal Operations: Staff can update or validate accounts.
- Secure Registration: Users can register only if account exists in DB.
- OTP Verification: OTP sent via Twilio SMS.
- Login with JWT: Secure token-based authentication.
- Banking Services: Check balance, transfer money, withdraw, deposit.
- Transaction Statements: View all past transactions.
- Real-Time Notifications: Kafka publishes events β Notification Service sends SMS/Email.
- JWT Tokens for secure sessions.
- OTP Verification for account registration/login.
- AES Encryption for sensitive payment data.
- Frontend: React + Vite
- Backend: Node.js, Express
- Messaging: Apache Kafka
- Database: MongoDB
- Auth/Security: JWT, OTP (via Twilio SMS), AES encryption
- Containerization: Docker + Docker Compose
- Tooling: ESLint, npm
Backend/
BankServer/ # Bank-side services
accountServer/ # Account lifecycle (create, update, delete)
bankServerGateway/ # Branch/staff authentication
GatewayServer/ # API Gateway (entrypoint)
PaymentServer/ # Payment service (deposit, withdraw, transfer)
Notification/ # Kafka consumer β notifications (SMS/Email)
UserServer/ # User microservice (registration, login, profiles)
Frontend/ # React + Vite frontend [ Client / Frontend ]
/ \
[User Side] [Bank Side]
| |
v v
[ API Gateway (3000) ]
/ | \
v v v
[User] [Account] [Payment]
|
v
Publishes Events
|
v
[Kafka Bus]
|
v
[Notification Service]
(SMS / Email Alerts)
ACP-BANK follows a microservices-based architecture where each service is independent, modular, and communicates over APIs and events.
- Independent deployment and scaling of services.
- Easier maintenance (change one service without breaking all).
- Fault isolation (if Payment fails, Auth still works).
- Event-driven scalability using Kafka.
- Acts as the message bus between services.
- Payment transactions publish events β consumed by Notification Service.
- Enables asynchronous communication and event-driven design.
- Each service runs in its own Docker container.
- Kafka and Zookeeper run as containers.
- Future: A
docker-compose.ymlcan orchestrate all services together.
- JWT Authentication β Secure login sessions for users.
- OTP Verification (via Twilio) β Prevents unauthorized user registration.
- AES Encryption β Protects sensitive data (payments, account numbers).
- Service-Level Authentication β Bank staff must verify with branch credentials.
- Bank Staff create account β record saved in Account Service.
- User registers β User Service checks Account DB β OTP verification.
- User logs in β JWT issued.
- Payment Service handles deposit/withdraw/transfer.
- Payment Service publishes events to Kafka Bus.
- Notification Service consumes events β sends SMS/Email.
- All services run in Docker β can scale independently.
- Staff authenticate via Branch Name + Secret Code.
- Staff create new accounts by entering customer details.
- Staff add initial deposit β only then account is activated.
- User can now register on the customer app.
- POST /api/v1/bank/verify β Verify branch session.
- POST /api/v1/accounts/newaccount β Create a new account with deposit.
- GET /api/v1/bank/health β Service health check.
- User registers β system checks if AccountNo exists in Bank DB.
- OTP sent via Twilio β user verifies OTP.
- On successful verification β account activated for user.
- User logs in β receives JWT token.
- User can now perform banking operations.
- POST /api/v1/users/register β Register (validates account number).
- POST /api/v1/users/verify β Verify OTP.
- POST /api/v1/users/login β Login.
- GET /api/v1/users/userinfo/:accountNo β Get user info.
ββββββββββββββββββββ
β BANK STAFF β
βββββββββ¬βββββββββββ
β
βββββββββΌβββββββββββ
β GATEWAY SERVER β
βββββββββ¬βββββββββββ
β
ββββββββββββββββββββββΌββββββββββββββββββββββ
β β β
βββββββββββΌβββββββββ βββββββββΌβββββββββββ βββββββΌβββββββββββ β BANK SERVER β β USER SERVER β β PAYMENT SERVER β β (Staff Auth, Ops) β β (Reg/Login) β β (Txn Handling) β βββββββββββ¬βββββββββ ββββββββββ¬ββββββββββ ββββββββββ¬βββββββββ β β β βββββββββββΌβββββββββ βββββββββββΌββββββββββ βββββββββΌββββββββββ β BANK GATEWAY SRV β β CUSTOMER DB β β PAYMENT DB β βββββββββββ¬βββββββββ βββββββββββββββββββββ ββββββββββ¬βββββββββ β β βββββββββββΌβββββββββ β β ACCOUNT SERVER β β βββββββββββ¬βββββββββ β β β βββββββββββΌβββββββββ β β BANK DB β β ββββββββββββββββββββ β β βββββββββΌββββββββ β KAFKA BUS β βββββββββ¬ββββββββ β ββββββββββββΌβββββββββββ β NOTIFICATION SERVER β β (SMS / Email Alerts)β βββββββββββββββββββββββ
- Node.js β₯ 18
- MongoDB (local/cloud)
- Docker + Docker Compose (for Kafka)
- Git
# Clone repo
git clone <repo-url>
cd ACP-BANK
# Install dependencies (each service)
cd Backend/UserServer && npm install
cd Backend/AccountServer && npm install
cd Backend/PaymentServer && npm install
cd Backend/Notification && npm install
cd Backend/GatewayServer && npm install
cd Frontend && npm install
# Start Kafka
cd Backend/PaymentServer
docker-compose up -d
# Start services (separate terminals)
npm start
# Start frontend
cd Frontend
npm run devVisit β http://localhost:5173
# Staff login
curl -X POST http://localhost:3000/api/v1/bank/verify \
-d '{"branch":"KolkataMain","branchSecret":"secure123"}'
# Create new account (with deposit)
curl -X POST http://localhost:3000/api/v1/accounts/newaccount \
-d '{"name":"Arijit","phone":"+911234567890","deposit":5000}'# Register user (account must exist in DB)
curl -X POST http://localhost:3000/api/v1/users/register \
-d '{"accountNo":"ACC001","email":"a@b.com","password":"pass","phone":"+15551234567"}'
# Verify OTP
curl -X POST http://localhost:3000/api/v1/users/verify \
-d '{"email":"a@b.com","otp":"123456"}'
# Login
curl -X POST http://localhost:3000/api/v1/users/login \
-d '{"email":"a@b.com","password":"pass"}'POST /api/v1/bank/verifyβ Branch authenticationPOST /api/v1/accounts/newaccountβ Create accountGET /api/v1/bank/healthβ Health check
POST /api/v1/users/registerβ Register userPOST /api/v1/users/verifyβ Verify OTPPOST /api/v1/users/loginβ LoginGET /api/v1/users/userinfo/:accountNoβ User info
POST /api/v1/payments/depositeβ DepositPUT /api/v1/payments/withdrawβ WithdrawPUT /api/v1/payments/pay/:senderβ Transfer fundsPUT /api/v1/payments/status/:idβ Update statusGET /api/v1/payments/paymentinfo/:accountNoβ Payment infoGET /api/v1/payments/transactionβ All transactions
- Kafka consumer β listens for transaction events.
- Sends SMS/Email alerts.
- No public REST endpoints.
-
Unit + integration tests per service.
-
Suggested:
- Mock Kafka in tests.
- Use test MongoDB instance.
- Add validation + controller tests.
-
Branch naming:
feature/<name>,fix/<name>,chore/<name> -
Flow:
- Fork & create feature branch
- Keep changes scoped per service
- Update docs if needed
- Ensure lint passes
- Open PR
-
Commit style: Conventional Commits (
feat:,fix:,chore:)
- Centralized Docker Compose for all services.
- CI/CD with GitHub Actions.
- Observability (logging, tracing, metrics).
- Role-based access (admin, customer).
- Audit logging for compliance.
- Kafka must be running for payment + notifications.
- No global
docker-compose.ymlyet. - Limited request validation.
- Twilio trial SMS β only verified numbers.
MIT License.
Maintainer: Arojit Paul Email: paulajitchnadra11111@gnail.com GitHub: Arojit45