How gtm-safal/banking_system works
Project type and purpose
• This is a standalone, console‐based banking system written in C. It’s neither a web app nor a distributed service; it’s a simple file‐based tool that simulates banking operations (account creation, login, deposit/withdraw, transfer, admin management).
File structure
• Top‐level C modules:
• main.c – The entry point and menu dispatcher
• login.c – Login functionality for admins and account holders
• accHolderSection.c – Account‐holder operations (balance inquiry, transfer)
• adminSection.c – Admin operations (create/delete accounts, change credentials)
• depositAndWithdraw.c – Deposit and withdraw routines
• utilities.c/h – Shared helper functions (file I/O, validations)
• Data files (persistent storage):
• accholderCredential.dat
• adminCredential.dat
• details.dat (likely stores account balances and metadata)
• Supporting materials:
• Banking System.pptx / project.pdf – design docs
• README.md – usage instructions
README for additional insights
• Confirms file‐handling approach for “secure” data storage.
• Lists core features: account creation, login, deposit/withdraw, transfer, admin management.
• Compilation is a single gcc command—no external dependencies.
Components
a. Main components:
• User Interface (CLI)
• Authentication Module (login.c)
• Account Holder Module (accHolderSection.c)
• Transaction Module (depositAndWithdraw.c + transfer logic)
• Admin Module (adminSection.c)
• Utility Library (utilities.c/h)
• Data Storage (three .dat files)
b. Relationships & interactions:
• CLI invokes Authentication Module
• Upon successful login, CLI dispatches to either Account Holder or Admin Module
• Account Holder Module uses Transaction Module & Utility Library to update details.dat and accholderCredential.dat
• Admin Module uses Utility Library to read/write adminCredential.dat and modify details.dat
• Utility Library encapsulates low‐level file I/O
c. Architectural patterns / design principles:
• Modular design: separation of concerns across modules
• Layered flow: CLI → Business logic (login / operations) → Data access (files)
• Single responsibility: each .c file handles one domain of functionality
d. Key technologies:
• Plain C (gcc)
• File I/O (fopen, fread, fwrite)
• Data files as persistence layer
Detailed breakdown to capture all architectural elements
• CLI (main.c)
• Presents menus
• Routes requests
• Authentication Module (login.c)
• Verifies credentials (reads adminCredential.dat or accholderCredential.dat)
• Account Holder Module (accHolderSection.c)
• Balance inquiry (reads details.dat)
• Transfer (reads/writes details.dat, updates credentials if needed)
• Transaction Module (depositAndWithdraw.c)
• Deposit (reads/writes details.dat)
• Withdraw (validates balance, updates details.dat)
• Admin Module (adminSection.c)
• Create/Delete accounts (updates .dat files)
• Change usernames/passwords (rewrites credential files)
• Utility Library (utilities.c/h)
• Abstract file-open, read/write record routines
• Data Store
• accholderCredential.dat
• adminCredential.dat
• details.dat