Skip to content

About

ATM & Banking CLI system built in C with SQLite3 persistence and POSIX signal (IPC) notifications.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ATM Management System

This project is an advanced ATM Management System written in C for Zone01 Athens. It allows users to register, log in, create accounts, perform transactions (deposits/withdrawals), and transfer account ownership securely.

Features & Upgrades

  • Relational Database Integration: Migrated from legacy text file storage to SQLite3 for robust, O(1) data persistence and querying.
  • Instant Notifications: Real-time inter-process communication using SIGUSR1 to notify users instantly when an account is transferred to them.
  • Robust Input Validation: Do-while validation loops protecting all scanf inputs from buffer overflows or infinite loops on invalid input types.
  • Encrypted Credentials: Passwords are encrypted (Caesar Cipher) before being written to the database.
  • Advanced Interest Calculations: Precise date parsing and unlock-date calculations for Fixed accounts.

Account Types & Interest Rates

The ATM system supports different types of accounts, each with its own rules for interest and transactions:

  • Saving Account (saving): Allows free deposits and withdrawals. Accrues 7% interest per year (distributed monthly on the day of deposit).
  • Fixed Account 1 Year (fixed01): No deposits or withdrawals allowed. Locks funds for 1 year and yields 4% total interest.
  • Fixed Account 2 Years (fixed02): No deposits or withdrawals allowed. Locks funds for 2 years and yields 10% total interest (5% per year).
  • Fixed Account 3 Years (fixed03): No deposits or withdrawals allowed. Locks funds for 3 years and yields 24% total interest (8% per year).

How to Compile & Run

Prerequisites

Make sure you have sqlite3 and standard C compilation tools (like gcc and make) installed. If you are on Linux/Ubuntu, you can install the database library via sudo apt install libsqlite3-dev.

Compilation

We use a Makefile to handle compilation. Simply run:

make

Execution

./atm

Inspecting the Database

The system automatically generates its database (bank.db) inside the data/ directory when it runs. To verify that users, encrypted passwords, and accounts are stored correctly, you can open the database directly from your terminal.

  1. Ensure you are in the project's root directory.
  2. Open the database using the SQLite CLI:
    sqlite3 ./data/bank.db
  3. Useful SQLite Commands:
    • See all tables:
      .tables
    • View all registered users (notice the encrypted passwords!):
      SELECT * FROM users;
    • View all bank accounts:
      SELECT * FROM records;
    • Turn on headers and column mode for better readability:
      .mode column
      .header on
      SELECT * FROM records;
    • Exit SQLite:
      .quit

Authors

  • Developed by: Elena Chanou

About

ATM & Banking CLI system built in C with SQLite3 persistence and POSIX signal (IPC) notifications.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages