Skip to content

AkshKansagara/ATM-CLI-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ATM Management System

A console-based ATM and banking management system built in Python using OOP and modular role-based design.

This project supports 3 roles:

  • Admin: manages banks and can view all users/ATMs
  • Bank: manages ATMs and users for the logged-in bank
  • User: performs ATM transactions using card and PIN

Core Highlights

  • Clean module separation for admin, bank, ATM, and user domains
  • Validation helpers split by domain (admin/bank/atm/user)
  • Constants centralized in each module for maintainable UI messages
  • In-memory datastore with seed banks, ATMs, and dummy users
  • Cross-bank withdrawal charge support
  • ATM and user transaction rule checks

Current Features

Admin Features

  • Admin login with configured password
  • Add new bank with generated bank ID and password
  • View all banks
  • View all users
  • View all ATMs

Bank Features

  • Bank login using bank ID and password
  • View only the ATMs belonging to logged-in bank
  • Add ATM for logged-in bank
  • Load cash from bank balance into selected ATM
  • Register user under logged-in bank
  • View users of logged-in bank
  • Delete users of logged-in bank
  • View logged-in bank details (bank ID, name, balance, IFSC)

User ATM Features

  • Select ATM from available ATM list
  • Authenticate user by card number
  • PIN verification with max 3 attempts per sensitive operation
  • Balance inquiry
  • Deposit (same-bank ATM only)
  • Withdraw with all below checks:
    • Positive amount
    • Amount in multiples of 100
    • ATM max withdrawal per transaction
    • User daily transaction count limit
    • User daily withdrawal amount limit
    • User account balance sufficiency
    • ATM balance sufficiency
    • Cross-bank charge application (5%)
  • Change PIN (4-digit format + confirm PIN)

Project Flow (End-to-End)

1. Startup Flow

  1. App starts from main.py.
  2. store.py loads initial in-memory data (banks, ATMs, dummy users).
  3. Main menu is shown:
    • 1 = Admin
    • 2 = Bank
    • 3 = User (ATM operations)
    • 0 = Exit

2. Admin Flow

  1. Select Admin from main menu.
  2. Enter admin password.
  3. On success, admin menu opens:
    • Manage Banks
    • View All Users
  4. Inside Manage Banks:
    • Add Bank
    • View Banks
    • View ATMs
  5. Logout returns to main menu.

3. Bank Flow

  1. Select Bank from main menu.
  2. Enter bank ID and password.
  3. On success, bank menu opens:
    • Manage ATMs
    • Manage Users
    • Bank Details
  4. ATM management flow:
    • Add ATM
    • View bank ATMs
    • Load cash into bank's ATM
  5. User management flow:
    • Register user (validated fields)
    • View bank users
    • Delete bank user
  6. Logout returns to main menu.

4. User ATM Flow

  1. Select User from main menu.
  2. Choose ATM ID.
  3. Enter card number.
  4. On success, transaction menu opens:
    • Balance Inquiry
    • Deposit
    • Withdraw
    • Change PIN
    • Logout
  5. For each protected action, user must verify PIN.
  6. On logout, return to main menu.

Validation Rules Implemented

Bank/User Registration Validations

  • Name format and length checks
  • Email format basic checks
  • Mobile number format checks
  • Aadhaar number digit and length checks
  • Age range checks
  • PAN format checks (for adult users)
  • Minimum opening balance checks

Transaction Validations

  • Positive amount only
  • Amount multiple of 100 where required
  • ATM-specific transaction limit check
  • User daily transaction count check
  • User daily amount withdrawal check
  • ATM cash availability check
  • User account balance check including cross-bank charges

Folder Structure

ATM/

  • main.py
  • store.py
  • admin/
    • admin.py
    • constants.py
    • validation.py
  • bank/
    • bank.py
    • operations.py
    • constants.py
    • validation.py
  • atm/
    • model.py
    • atm.py
    • constants.py
    • validation.py
  • user/
    • user.py
    • validation.py
  • common/
    • constants.py

Requirements

  • Python 3.8+
  • No third-party packages

Run The Project

python3 main.py

Default Access and Seed Data

Admin

  • Password: admin1

Seed Banks

  • B001, B002, B003 preloaded
  • Default password for seeded banks: bank123

Seed Users

  • Two dummy users are created at startup
  • Dummy credentials are printed in terminal at startup

Notes

  • Data is in-memory only (no database).
  • Restarting the app resets all runtime changes.
  • Random values are used for user account/card/PIN generation.
  • Constants and validation are intentionally separated by module for readability and maintenance.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages