Skip to content

Prototype for web-based banking account.

0xshae/finflow-netbanking-app

Repository files navigation

Finflow

A comprehensive web-based banking system prototype built with Django and Python. Finflow provides a complete digital banking experience with user management, transaction processing, automated interest calculations, and comprehensive reporting features.

Features

User Management

  • User registration with email-based authentication
  • Personal information collection (name, gender, birth date)
  • Address management (street, city, postal code, country)
  • Secure password creation with validation
  • Automatic account creation with unique account numbers

Banking Operations

  • Multiple account types with configurable interest rates and withdrawal limits
  • Deposit money with minimum amount validation
  • Withdraw money with balance and limit checks
  • Real-time balance tracking
  • Transaction history with detailed records

Interest System

  • Automated interest calculation using Celery background tasks
  • Configurable interest rates per account type (0-100%)
  • Flexible interest calculation periods (monthly, quarterly, etc.)
  • Automatic interest application to account balances
  • Interest transaction recording

Reporting & Analytics

  • Complete transaction reports with date/time stamps
  • Interactive date range filtering for transaction history
  • Formatted currency display with proper formatting
  • Current balance display
  • Transaction type categorization (Deposit, Withdrawal, Interest)

Administrative Features

  • Django admin interface for user and account management
  • Account type configuration
  • Transaction monitoring and management
  • User address management

Security & Validation

  • CSRF protection
  • Form validation with custom error messages
  • Authentication requirements for protected views
  • Atomic transactions for data integrity
  • Password validation using Django's built-in validators

Technology Stack

  • Backend: Django 3.1.8
  • Database: SQLite3 (development)
  • Background Tasks: Celery 4.4.7 with Redis
  • Task Scheduling: django-celery-beat
  • Frontend: HTML templates with Tailwind CSS
  • Authentication: Django's built-in authentication system

Prerequisites

  • Python 3.7+
  • Redis server (for Celery background tasks)
  • pip (Python package installer)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd finflow
  2. Create a virtual environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Set up Redis server

    • Install Redis on your system
    • Start Redis server: redis-server
    • Redis should be running on localhost:6379
  5. Run database migrations

    python manage.py migrate
  6. Create a superuser (optional)

    python manage.py createsuperuser

Running the Application

Development Server

  1. Start the Django development server

    python manage.py runserver
  2. Start Celery worker (in a separate terminal)

    celery -A banking_system worker --loglevel=info
  3. Start Celery beat scheduler (in another terminal)

    celery -A banking_system beat --loglevel=info
  4. Access the application

Usage

For End Users

  1. Register: Visit the home page and click "Register" to create a new account
  2. Login: Use your email and password to access your account
  3. Deposit: Navigate to the deposit page to add money to your account
  4. Withdraw: Use the withdraw page to take money out of your account
  5. View Reports: Check your transaction history and current balance

For Administrators

  1. Access Admin: Go to /admin/ and login with superuser credentials
  2. Manage Account Types: Create and configure different bank account types
  3. Monitor Users: View and manage user accounts and information
  4. Transaction Oversight: Monitor all transactions across the system

Configuration

Environment Variables

The following settings can be configured in banking_system/settings.py:

  • ACCOUNT_NUMBER_START_FROM: Starting number for account generation (default: 1000000000)
  • MINIMUM_DEPOSIT_AMOUNT: Minimum amount for deposits (default: 10)
  • MINIMUM_WITHDRAWAL_AMOUNT: Minimum amount for withdrawals (default: 10)

Celery Configuration

Celery is configured to use Redis as both broker and result backend:

  • Broker URL: redis://localhost:6379
  • Result Backend: redis://localhost:6379

Project Structure

finflow/
├── accounts/                 # User management app
│   ├── models.py            # User, BankAccount, Address models
│   ├── views.py             # Registration, login views
│   ├── forms.py             # Registration and address forms
│   └── urls.py              # Account-related URLs
├── transactions/             # Transaction processing app
│   ├── models.py            # Transaction model
│   ├── views.py             # Deposit, withdraw, report views
│   ├── forms.py             # Transaction forms
│   ├── tasks.py             # Celery tasks for interest calculation
│   └── urls.py              # Transaction-related URLs
├── core/                     # Core app
│   └── views.py             # Home page view
├── banking_system/          # Main project settings
│   ├── settings.py          # Django settings
│   ├── urls.py              # Main URL configuration
│   └── celery.py            # Celery configuration
├── templates/               # HTML templates
├── static/                  # Static files (CSS, images)
└── requirements.txt         # Python dependencies

API Endpoints

  • / - Home page
  • /accounts/register/ - User registration
  • /accounts/login/ - User login
  • /accounts/logout/ - User logout
  • /transactions/deposit/ - Deposit money
  • /transactions/withdraw/ - Withdraw money
  • /transactions/report/ - Transaction history
  • /admin/ - Django admin interface

Development

Running Tests

python manage.py test

Creating Migrations

python manage.py makemigrations
python manage.py migrate

Collecting Static Files

python manage.py collectstatic

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is open source and available under the MIT License.

About

Prototype for web-based banking account.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published