How gagatun16/kyrsach20 works
1. This repository is a small C++ desktop application, likely a coursework project, for managing users, wallets, and money transfers. The architecture is centered on a local in-process domain model rather than a client/server system.
2. The presentation layer is a Win32 + OpenGL + Dear ImGui GUI. main.cpp and the example_win32_opengl3 project wire up the application window, render loop, and UI widgets. That means the UI, business logic, and persistence all live in the same executable boundary.
3. The core domain objects are User, Admin, WalletBalance, and Transaction. Admin appears to represent elevated access or management capabilities, while User and WalletBalance represent account state. Transaction is the base abstraction for money movement.
4. Money movement is split into transaction subtypes: incomingTransaction, outgoingTransaction, internalTransfer, and externalWithdrawal. This suggests the app treats different transfer directions and destinations as separate business cases, likely because each has distinct validation and logging rules.
5. TransferProcessor is the main orchestration boundary for transaction execution. It is likely responsible for applying business rules, updating balances, choosing the right transaction subtype, and coordinating persistence/logging after the transfer is accepted.
6. UserManager is the central registry/controller for user-related operations. It likely owns or indexes the active users, handles creation/removal/lookups, and provides the data needed by the UI and transfer logic.
7. TransactionLogger is a distinct persistence/logging subsystem. The repo contains transactions_logs/ with per-transaction text files, which implies completed transactions are written out as individual records rather than to a database.
8. The application uses flat-file storage for state. users.txt and wallets.txt store the main account data, while transactions_logs/*.txt stores transaction history. There is no evidence of an external DB or network service; persistence is local and file-based.
9. The runtime flow is likely: UI action in ImGui -> UserManager/TransferProcessor domain call -> balance and transaction objects updated -> TransactionLogger writes a record -> the text files represent the current persisted state. This separation is the clearest architectural boundary in the repo.
10. The repository also contains a separate test project plus Visual Studio and MinGW build scripts. That indicates the codebase is structured for local desktop builds and validation, not for deployment to a remote environment.
11. The many Debug/ and .obj/.tlog/.pdb files are build artifacts, not architectural components. They show the project is developed and built in Visual Studio, with an additional build_mingw.bat path for an alternate toolchain.
12. If you are drawing an architecture diagram, the key boxes are: GUI shell, domain model, transfer processing, user management, transaction logging, and file storage. The main arrows are UI-to-domain commands and domain-to-text-file persistence; there are no obvious external services or distributed boundaries.
Main entry points: main.cpp main.cpp · Transaction.h Transaction · UserManager.h UserManager · TransferProcessor.h TransferProcessor
Components 20
UI Shell
Win32/OpenGL/ImGui front end and app entrypoint
- main.cpp · Application entrypoint and runtime loop
main.cpp - Win32 app · Desktop GUI project definition
example_win32_opengl3.vcxproj - ImGui core · Immediate-mode UI framework
imgui.h - Win32 bridge · Windowing and input integration
imgui_impl_win32.h - OpenGL bridge · OpenGL renderer integration
imgui_impl_opengl3.h
Domain Model
Users, balances, and transaction entities
- User · Account holder domain object
User.h - Admin · Privileged user role
Admin.h - Wallet · Wallet balance and funds state
WalletBalance.h - Transaction · Base money-movement abstraction
Transaction.h - Incoming · Incoming funds transaction
incomingTransaction.h - Outgoing · Outgoing funds transaction
outgoingTransaction.h - Internal xfer · Transfer within the system
internalTransfer.h - External withdraw · Withdrawal to an external destination
externalWithdrawal.h
Processing
Orchestration and management services
- UserManager · User registry and account operations
UserManager.h - TransferProcessor · Validates and executes transfers
TransferProcessor.h
Persistence
Flat-file state and transaction records
- TransactionLogger · Writes transaction records
TransactionLogger.h - users.txt · Persisted user records
users.txt - wallets.txt · Persisted wallet state
wallets.txt - transactions_logs · Per-transaction text records
transactions_logs
Connections 21
- Win32 app → main.cpp: builds · Desktop executable is assembled from the app entrypoint and supporting code
- main.cpp → ImGui core: uses · Main loop drives the immediate-mode UI
- main.cpp → Win32 bridge: uses · Window and input plumbing
- main.cpp → OpenGL bridge: uses · Rendering backend hookup
- main.cpp → UserManager: commands · UI actions are routed into user/account operations
- main.cpp → TransferProcessor: commands · UI actions trigger transfer execution
- UserManager → User: manages · Registry operates on user entities
- User → Admin: specializes · Admin is a privileged user variant
- User → Wallet: owns · Users are associated with wallet state
- TransferProcessor → Transaction: coordinates · Processor works through the transaction abstraction
- Transaction → Incoming: subtype · Incoming money case
- Transaction → Outgoing: subtype · Outgoing money case
- Transaction → Internal xfer: subtype · Internal transfer case
- Transaction → External withdraw: subtype · External withdrawal case
- TransferProcessor → Wallet: updates · Balances are adjusted when transfers are accepted
- TransferProcessor → TransactionLogger: logs · Accepted transfers are recorded
- TransactionLogger → transactions_logs: writes · Transaction history is stored as text files
- UserManager → users.txt: persists · User registry state is serialized to flat files
- UserManager → wallets.txt: persists · Wallet data is stored separately
- test.vcxproj → UserManager: covers · Test build includes core domain and processing code
- test.vcxproj → TransferProcessor: covers · Test build exercises transfer logic