A comprehensive bank management system built with Django that allows users to manage accounts, perform transactions, and handle loans with email notifications.
Live Application: https://bankmanagementproject-withdjango.onrender.com/
- User registration with account creation
- Secure login/logout functionality
- Session management
- Profile management
- Multiple account types support
- User profile with personal information
- Address management
- Account balance tracking
- Deposit Money: Add funds to account with email confirmation
- Withdraw Money: Secure withdrawal system with balance validation
- Transaction History: Filterable transaction reports with date range
- Real-time Balance Updates
- Loan Requests: Submit loan applications (max 3 pending)
- Loan Approval System: Admin-controlled loan approval
- Loan Payment: Pay back approved loans
- Loan History: Track all loan activities
- Transaction confirmations
- Loan request submissions
- Loan payment receipts
- System notifications
- Backend: Django 4.2, Python
- Database: PostgreSQL
- Frontend: HTML, Tailwind CSS
- Authentication: Django Auth System
- Email: Django Email Backend
- Deployment: Render
bank_management/
βββ accounts/
β βββ models.py # User profiles and bank accounts
β βββ views.py # Authentication and profile views
β βββ forms.py # User registration and update forms
β βββ templates/ # Authentication templates
βββ transactions/
β βββ models.py # Transaction and loan models
β βββ views.py # Transaction processing views
β βββ urls.py # Transaction routes
β βββ templates/ # Transaction templates
βββ templates/
β βββ base.html # Base template
βββ requirements.txt # Project dependencies
- Python 3.8+
- PostgreSQL
- pip
- Clone the repository
git clone https://github.com/yourusername/django-bank-management.git
cd django-bank-management- Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies
pip install -r requirements.txt- Environment Configuration
Create
.envfile:
DEBUG=True
SECRET_KEY=your-secret-key
DATABASE_URL=postgres://user:password@localhost/bank_db
EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend- Database Setup
python manage.py migrate
python manage.py createsuperuser- Run Development Server
python manage.py runserverVisit http://localhost:8000 to view the application.
- One-to-one relationship with Django User
- Account type (Savings/Current)
- Unique account number
- Balance tracking
- Personal details (birth date, gender)
- User address information
- Street, city, postal code, country
- Links to user accounts
- Tracks amount and balance after transaction
- Supports multiple transaction types
- Loan approval status
- Timestamp ordering
- Deposit - Adding funds to account
- Withdrawal - Removing funds from account
- Loan - Loan request
- Loan Paid - Loan repayment
- User fills registration form
- System creates User and UserBankAccount
- Automatic login after registration
- Welcome email sent
- User selects transaction type
- System validates amount and balance
- Transaction record created
- Account balance updated
- Confirmation email sent
- User submits loan request (max 3 pending)
- Admin approves/rejects loan
- User pays approved loan
- System updates balances and sends notifications
- base.html - Main layout with navigation
- transaction_form.html - Deposit/withdrawal forms
- transaction_report.html - Filterable transaction history
- profile.html - User profile management
- user_registration.html - Registration form
- user_login.html - Login form
- Django built-in authentication
- Login-required decorators for protected views
- CSRF protection
- Form validation and error handling
- Secure password management
- Deposit confirmation
- Withdrawal notification
- Loan request submission
- Loan payment receipt
The project is configured for deployment on Render with:
- PostgreSQL database
- Static file serving
- Environment variable configuration
- Production-ready settings
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Imran Rafi - Student + Django learner
- Django documentation
- Tailwind CSS for styling
- Render for hosting