Welcome to the Transaction Management System! This document will guide you through the installation, usage, and structure of the project.
The Transaction Management System is a robust application designed to handle and manage financial transactions and account data.
- Transaction Handling: Processes and stores transactions with various states.
- Account Management: Manages account data including balance and state.
- Data Persistence: Saves and loads data from CSV files.
- Interactive Console Application: Provides a console interface for operations.
- Cardholder Name Validation:
- The program ensures that the cardholder's name consists of 20 to 24 alphabetic characters. This feature helps verify that the entered name is valid and meets the required standards.
- Primary Account Number (PAN) Validation:
- The program checks that the Primary Account Number (PAN) consists of 16 to 19 digits and rejects any invalid numbers. This ensures that only valid numbers conforming to the standard format are accepted.
- Card Expiry Date Validation:
- The program validates the card's expiry date to ensure it follows the required format "MM/YY" and that the card has not expired.
- Transaction Date Validation:
- The program checks the validity of the transaction date entered by the user, ensuring it matches the "DD/MM/YYYY" format. This helps prevent the entry of incorrect or invalid dates.
- Transaction Amount Validation:
- The program ensures that the entered transaction amount is greater than zero and does not exceed the allowed maximum. This allows effective management of transactions and prevents errors due to incorrect amounts.
- Maximum Transaction Amount Setting:
- Users can set a maximum transaction amount, and the program ensures that transactions do not exceed this limit. This feature provides flexibility in managing transaction limits.
- Account Validation:
- The program verifies the existence of the account associated with the card in the account database, ensuring that all transactions are linked to valid and known accounts.
- Account State Management:
- The program checks the account's status to see if it is active or blocked, ensuring that transactions are processed only for active accounts.
- Sufficient Balance Check:
- The program checks if the account balance is sufficient to perform the transaction. If the balance is insufficient, the transaction is declined, protecting the accounts from overdrafts.
- Transaction Saving:
- All transactions are saved in the server's transaction database, allowing secure and seamless tracking of all transactions.
- Saved Transactions Listing:
- Users can view all saved transactions on the server, providing transparency and ease in reviewing past records.
- Looping for Valid Input:
- If the user enters an incorrect option, the program continues to prompt for valid input until a correct choice is made. This improves the user experience and reduces the chances of errors.
- Separation of Concerns:
- The program is structured with a modular design, separating card data processing, transaction management, and server handling into independent modules. This makes it easier to extend and modify the project in the future.
To set up the project, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/transaction-management-system.git
-
Navigate to the project directory:
cd transaction-management-system -
Compile the project:
gcc -o transaction_management main.c app/app.c Handling/handling.c Server/server.c Terminal/terminal.c Card/card.c -I./include
-
Run the application:
./transaction_management
- Start the Application: Execute the compiled file to launch the system.
- Perform Transactions: Follow the on-screen instructions.
- Save & Load Data: Handled automatically.
- Exit the Application: All data is securely saved.
transaction-management-system/
├── Handling/
│ ├── handling.c
│ ├── handling.h
├── app/
│ ├── app.c
│ ├── app.h
├── Server/
│ ├── server.c
│ ├── server.h
├── Terminal/
│ ├── terminal.c
│ ├── terminal.h
├── Card/
│ ├── card.c
│ ├── card.h
├── main.c
├── transactions.csv
├── accountDB.csv
└── README.md
File: main.c
Description: Manages the application flow, initializes data, and handles user interactions.
File: handling.c, handling.h
Description: Manages saving, loading, and manipulating transaction and account data.
File: app.c, app.h
Description: Handles core application logic such as transaction processing and card reporting.
- Improved Security: Add encryption for CSV files.
- Enhanced User Interface: Develop a graphical UI.
- Reporting & Analytics: Add features for generating reports.
This project was developed by Amr Khaled. Visit my GitHub profile for more projects!


