A full-stack Retail Banking System built with Flask + MySQL + React, featuring secure authentication, OTP verification, account operations, fund transfers, bill payments, loans, support tickets, admin screens, and detailed transaction logs.
A production-grade demo of a modern BFSI workflow with strong security patterns and clean architecture.
- Overview
- Key Features
- Project Architecture
- Tech Stack
- Folder Structure
- Setup Instructions
- .env Configuration
- Database & Migrations
- API Endpoints
- Frontend Details
- Testing Workflow
- Screenshots & Visuals
- Production Deployment
- Troubleshooting
- Preparing Repository for GitHub
- Commit Guide
- License
- Author
- Project Report (PDF)
This project is a secure BFSI Retail Banking system that simulates real-world banking operations end-to-end:
✔️ Customer onboarding with OTP ✔️ JWT-based login & protected routes ✔️ Account operations (deposit/withdraw) ✔️ Fund transfer with payer/payee logs ✔️ Bill payment & loan application workflows ✔️ Support ticketing module ✔️ Transaction history with balance tracking ✔️ MySQL relational database with migrations ✔️ React dashboard with Axios integration
The goal is to create a production-style system with proper architecture, modular backend components, and scalable frontend structure.
- User registration
- OTP verification through backend
- Login via JWT
- Auto-session management
- Protected routes (dashboard cannot open without token)
-
Deposit
-
Withdraw (up to ₹0.0 allowed)
-
Fund Transfer
-
Automatic dual transactions for transfer
-
Transaction logs with:
- Timestamp
- Type (credit/debit)
- Amount
- Payer email
- Payee email
- Description
- Bill payments
- Bill history + payment transaction entries
- Loan application
- Loan status tracking
- Transactions captured for loan requests
- Create support tickets
- List user support history
- Admin loan dashboard
- Admin transaction views
- Modern React UI
- React Router
- Axios interceptor for JWT
- Clean componentized structure
┌─────────────────────┐
│ FRONTEND │
│ React + Axios │
│ Pages & Components │
└─────────┬───────────┘
│ HTTP / JSON
▼
┌─────────────────────┐
│ BACKEND │
│ Flask REST API │
│ Blueprints: │
│ - auth │
│ - account │
│ - transaction │
│ - loan │
│ - bill │
│ - support │
└─────────┬───────────┘
│ SQLAlchemy ORM
▼
┌─────────────────────┐
│ DATABASE │
│ MySQL / PyMySQL │
│ Flask-Migrate │
└─────────────────────┘
- Python 3.x
- Flask
- SQLAlchemy
- Flask-Migrate
- PyJWT
- MySQL (with
pymysql) - Werkzeuge hashing
- Flask-CORS
- React (Vite)
- React Router DOM
- Axios
- Modern ES Modules
- Virtualenv
- Git
- Node.js
- MySQL Workbench
BFSI_Retail_Banking_App/
│
├── backend/
│ ├── app/
│ │ ├── models/ # SQLAlchemy models
│ │ ├── routes/ # Blueprints
│ │ └── __init__.py
│ ├── migrations/ # Alembic migration history
│ ├── requirements.txt
│ └── run.py
│
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── axios.js
│ │ └── main.jsx
│ ├── public/
│ ├── package.json
│ └── vite.config.js
│
├── docs/ # Screenshots, diagrams
├── scripts/ # setup scripts
├── tests/ # placeholder test folder
├── README.md
├── LICENSE
└── .gitignore
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtCREATE DATABASE bfsi_db;flask db upgradepython run.pyBackend runs at: http://127.0.0.1:5000
cd frontend
npm install
npm run devFrontend runs at: http://localhost:5173
Create backend/.env (DO NOT COMMIT IT):
SECRET_KEY=supersecretkey
DATABASE_URL=mysql+pymysql://root:password@localhost:3306/bfsi_db
FLASK_APP=run.py
FLASK_ENV=development
Also provide .env.example for others.
Using Flask-Migrate (Alembic).
flask db migrate -m "message"flask db upgrade| Method | Endpoint | Description |
|---|---|---|
| POST | /api/register |
Register user & send OTP |
| POST | /api/verify-otp |
OTP verification |
| POST | /api/login |
Login & get JWT |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/account/transaction |
deposit/withdraw |
| POST | /api/account/transfer |
transfer funds |
| GET | /api/account/balance |
fetch balance |
| GET | /api/account/transactions |
all transactions |
| Method | Endpoint |
|---|---|
| POST | /api/bill/pay |
| GET | /api/bill/mybills |
| Method | Endpoint |
|---|---|
| POST | /api/loan/apply |
| GET | /api/loan/myloans |
| Method | Endpoint |
|---|---|
| POST | /api/support/submit |
| GET | /api/support/mytickets |
Automatically injects:
Authorization: Bearer <token>
- BalanceInfo
- Transactions
- AllTransactions
- DepositWithdraw
- FundTransfer
- BillPayment
- Loan
- Support
- AdminLoans
- Login
- Register
- Verify OTP
- Dashboard
- Register → Verify OTP → Login
- Deposit money
- Withdraw money
- Transfer between two accounts
- Pay bill
- Apply loan
- Create support ticket
- Verify transaction logs update correctly
Place images inside /docs/.
Suggested names:
dashboard.pngtransactions.pngfund_transfer.pngbill_payment.pngloan_application.png
- Server: Ubuntu + Gunicorn + Nginx
- DB: AWS RDS MySQL
- Environment:
.envusing system variables - SSL via Let's Encrypt
- Reverse proxy with Nginx
Dockerfilefor backenddocker-compose.ymlfor backend + MySQL + frontend
Check localStorage key token.
Ensure Flask-CORS enabled in backend.
Check:
account.balanceupdate- commit session
- React refresh trigger
Ensure:
export FLASK_APP=run.py
flask db upgrade
- backend/app
- backend/migrations
- frontend/src
- README.md
- LICENSE
- docs/
- backend/venv
- frontend/node_modules
- .env
- .DS_Store
- pycache
Use conventional commits:
| Type | Meaning |
|---|---|
| feat: | new feature |
| fix: | bug fix |
| chore: | maintenance |
| docs: | documentation updates |
| refactor: | code improvement |
Example commits:
feat: add loan application API
fix: fund transfer payer/payee logging
docs: update README with setup instructions
This project is licensed under the MIT License.
See the LICENSE file for full details.
HARINATH MAKKA Developer • BFSI Enthusiast • Full-Stack Engineer
Report PDF: report.pdf