Skip to content

codeAs-sohail/Bank-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏦 Smart Bank - Bank Management System

A full-featured Bank Management System built with Django 5.2 and Python 3.11. Supports user registration, login/logout with session management, fund transfers, deposits, withdrawals, transaction history, and real-time email notifications.

🎨 Frontend UI (HTML + CSS) was entirely designed and generated using Qoder IDE — an AI-powered development environment.


🚀 Key Highlights

Feature Details
🧩 Framework Django 5.2.3
🐍 Language Python 3.11.9
🗄️ Database SQLite3 (via Django ORM)
🔒 Auth Custom session-based login
📧 Email Gmail SMTP with HTML templates
🛡️ Middleware Custom login guard middleware
📡 Signals Auto account creation on registration
🎨 Frontend HTML5 + CSS3 (generated by Qoder IDE)

📁 Project Structure

BankManagementSystem/ ├── STATIC/ │ └── CSS/ # All CSS stylesheets (10 files) │ ├── base.css # Global styles, header, footer │ ├── homepage.css # Public landing page │ ├── dashboard.css # User dashboard │ ├── login.css # Login page │ ├── logout.css # Logout page │ ├── register.css # Registration form │ ├── transfer.css # Money transfer │ ├── deposit.css # Deposit funds │ ├── withdraw.css # Withdraw funds │ └── history.css # Transaction history │ ├── Smart_Bank/ │ ├── Smart_Bank/ # Project config │ │ ├── settings.py # All settings (email, static, db) │ │ └── urls.py # Root URL config │ │ │ └── bank/ # Core Django app │ ├── models.py # 6 database models │ ├── views.py # All view logic (Account + Transactions) │ ├── forms.py # ModelForms and Forms │ ├── urls.py # 9 URL routes │ ├── middleware.py # Custom login check middleware │ ├── signals.py # Auto account creation signal │ ├── random_gen.py # Account/IFSC/Reference generators │ ├── admin.py # Django admin config │ └── templates/ │ ├── Registeraccount.html │ ├── login.html │ ├── logout.html │ ├── dashboard.html │ ├── TransHistory.html │ ├── operations.html │ ├── Transaction/ │ │ ├── Transfer.html │ │ ├── Deposit.html │ │ └── Withdraw.html │ └── emails/ # HTML email templates (inline CSS) │ ├── Regemail.html │ ├── Trans_email.html │ ├── Depo_email.html │ └── With_email.html │ ├── templates/ │ ├── base.html # Master template with header + footer │ └── index.html # Public homepage │ ├── env/ # Python virtual environment ├── requirements.txt # All dependencies └── Readme.md # This file plaintext


🗄️ Database Models

1. Register_account

Stores all user registration data including personal info, contact details, Aadhaar, photo, auto-generated account number and IFSC.

2. User_login

Tracks active login sessions — records are created on login and deleted on logout.

3. User_account

Auto-created via Django Signal when a user registers. Holds balance (default ₹1200), IFSC, bank name, and email.

4. Users_Transfer

Records every transfer transaction with sender, receiver, amount, balance after transfer, and a unique reference ID.

5. Users_Deposit

Records every deposit with user, account number, amount, balance after deposit, and reference ID.

6. Users_withdraw

Records every withdrawal with name, account, IFSC, amount, balance after withdrawal, and password verification.


🔗 URL Routes

URL View Name
/ Homepage home
/register/ User Registration register
/login/ User Login login
/logout/ User Logout logout
/transfer/ Money Transfer transfer
/deposit/ Deposit Funds deposit
/withdraw/ Withdraw Funds withdraw
/history/ Transaction History TransactionHistory
/operations/ Post-transaction page operations

🛡️ Middleware — bank.middleware.Login_check

A custom middleware that protects all routes except /login/, /register/, and /admin/. If a user is not logged in (no active session), they are automatically redirected to the login page.

🔐 Session Management

On login → User_login record created, user stored in session On logout → User_login record deleted, session flushed via request.session.flush() All protected pages check request.session.get('user') via middleware

📧 Email Notifications

Real-time HTML email notifications are sent via Gmail SMTP for: Event Template ✅ Account Registration emails/Reg_email.html 💸 Money Transfer emails/Trans_email.html 💰 Deposit emails/Depo_email.html 🏧 Withdrawal emails/With_email.html

🎨 Frontend Design

The entire frontend was designed and generated using Qoder IDE — an AI-powered development environment. Design features include: 🎨 CSS Custom Properties (design tokens/variables) 📐 CSS Grid and Flexbox layouts ✨ Smooth animations and transitions 📱 Fully responsive with media queries 🌈 Gradient-based color system 💅 Separate CSS file per page (10 CSS files) 📧 Ultra-styled inline CSS email templates

Environment Variables

Sensitive credentials like email and SMTP password are not stored in the repository. They are kept in a .env file for security.

Tech Stack

Backend: Python 3.11.9, Django 5.2.3 Database: SQLite3 ORM: Django ORM Email: Gmail SMTP via django.core.mail Frontend: HTML5, CSS3 (Qoder IDE) Image Handling: Pillow Session: Django Sessions Framework Security: Django CSRF, SessionMiddleware, Custom Login Middleware

About

A Django-based Bank Management System that supports deposits, withdrawals, transfers, transaction history, and automated email notifications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors