Skip to content

g-laliotis/atm-management-system

Repository files navigation

ATM Management System

License: MIT C99 CI CodeQL Tests Build GitHub GitHub Pages

A professional ATM management system written in C with advanced features including real-time notifications, password encryption, and enhanced UI.

🌐 View Live Demo & Documentation

Features

Core Features

  • User registration and login (unique usernames)
  • Create new accounts (savings, current, fixed01, fixed02, fixed03)
  • Update account information (country, phone number)
  • Check account details with interest calculations
  • Make transactions (deposit/withdraw) - not allowed for fixed accounts
  • Remove accounts
  • Transfer account ownership

Bonus Features ⭐

  • Password Encryption - XOR cipher for secure password storage
  • Enhanced Terminal UI - Color-coded messages and professional layout
  • Real-time Notifications - Named pipes for instant transfer alerts
  • Comprehensive Test Suite - 8 automated tests with 100% pass rate
  • CI/CD Workflows - GitHub Actions for automated testing, releases, and security
  • Professional Structure - Organized folders (bin/, obj/, src/, etc.)
  • Custom Makefile - Advanced build system with multiple targets
  • SQLite Support - Optional database backend with conditional compilation
  • Code Optimization - Modular design with separated utilities

Interest Rates

  • Savings: 7% annual (monthly interest)
  • Fixed01 (1 year): 4% annual
  • Fixed02 (2 years): 5% annual
  • Fixed03 (3 years): 8% annual
  • Current: No interest

Building and Running

# Build (text files - default)
make

# Build with SQLite database
make sqlite

# Run tests
make test

# Run
make run
# or
./bin/atm

# Clean
make clean

# Show all targets
make help

# Install system-wide (optional)
sudo make install

Project Structure

.
├── .github/          # GitHub Actions workflows
│   └── workflows/    # CI/CD automation
│       ├── ci.yml    # Continuous Integration
│       ├── codeql.yml# Security analysis
│       └── release.yml# Automated releases
├── bin/              # Compiled binaries
├── obj/              # Object files
├── src/              # Source code
│   ├── header.h      # Header file with structures
│   ├── main.c        # Main program and menu
│   ├── auth.c        # Authentication with encryption
│   ├── system.c      # Account management
│   ├── utils.c       # UI and notification utilities
│   └── db.c          # Database layer (SQLite optional)
├── data/             # Data storage
│   ├── records.txt   # Account records
│   ├── users.txt     # User credentials (encrypted)
│   └── atm.db        # SQLite database (when using make sqlite)
├── logs/             # Application logs
├── docs/             # Documentation
│   ├── FEATURES.md   # Additional features documentation
│   └── index.html    # GitHub Pages
├── test_atm.c        # Comprehensive test suite
├── CHANGELOG.md      # Version history
├── CONTRIBUTING.md   # Contribution guidelines
├── DEVELOPMENT.md    # Development summary
├── LICENSE           # MIT License
├── Makefile          # Build configuration
└── README.md         # Project documentation

Sample Users

  • Username: Alice, Password: 1234password
  • Username: Michel, Password: password1234

Real-time Notifications Demo

Open two terminals:

Terminal 1:

./bin/atm
# Login as Alice
# Transfer account to Michel

Terminal 2:

./bin/atm
# Login as Michel
# You'll see instant notification when Alice transfers!

Technical Details

  • Language: C (C99 standard)
  • Threading: POSIX threads for notifications
  • IPC: Named pipes (FIFOs)
  • Encryption: XOR cipher
  • Build System: GNU Make
  • CI/CD: GitHub Actions (automated testing, releases, security)
  • Testing: Comprehensive test suite with 8 automated tests
  • Optional DB: SQLite3

Security

  • Passwords are encrypted using XOR cipher before storage
  • User authentication validates encrypted credentials
  • Account operations require ownership verification

Testing

The project includes a comprehensive test suite that validates:

  • Password encryption/decryption
  • User registration and authentication
  • Account creation and management
  • Interest calculations
  • File operations
  • Data validation
  • Notification system
# Run all tests
make test

Test results show pass/fail status and overall success rate.

Development

Compiled with strict warnings:

gcc -Wall -Wextra -std=c99 -pthread

No warnings, clean compilation.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Giorgos Laliotis

About

A professional ATM management system

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors