QT-Banking-System-Server is the server-side implementation of a banking system, developed using the Qt 6/C++ framework. The server handles client requests, performs database operations using PostgreSQL with Supabase hosting, and ensures secure and efficient communication between clients and the database.
The server application is designed to be multi-threaded, enabling concurrent handling of multiple clients and requests. It includes features such as request handling, database operations, logging, and secure communication to provide a robust and reliable banking system.
Note
This project is part of a Banking System (TCP Client-Server) project, which includes the following repositories:
- QT-Banking-System-Client: The client-side implementation of the banking system.
- QT-Banking-System-Server: The server-side implementation of the banking system.
- Request Handling: Manages various client requests such as user management, transaction processing, and data retrieval.
- Database Operations: Performs CRUD operations on user accounts and transaction records.
- By using the Database Module, the server can connect to the database, execute queries, and handle results in a multi-threaded environment using Qt's
QThreadStorage
for thread-local storage.
- By using the Database Module, the server can connect to the database, execute queries, and handle results in a multi-threaded environment using Qt's
- Logging: Logs server activities and client requests for monitoring and debugging purposes in a multi-threaded fashion.
- For more details, see the LogByThread library used in the project.
- Secure Communication: Implements security measures to ensure secure communication with clients and database.
- For example, hashing and encryption techniques are used to protect sensitive data.
- Concurrency server: The server can handle multiple clients concurrently using Qt's
QTcpServer
andQTcpSocket
classes.- The server can process multiple requests simultaneously using a thread pool.
- C++/Qt 6: Core language and framework for building the server application.
- Qt Components: Core, Network and Sql modules.
- PostgreSQL with Supabase: Database management system for handling data operations.
- JSON: Data format for communication between client and server.
- CMake: Build system for managing the build process.
- GoogleTest: Framework for unit testing the application.
- GitHub Actions: Continuous integration for automated testing and documentation generation.
- Doxygen: Tool for generating documentation from source code.
- Qt 6.7.1 or later
- CMake
- MinGW or another compatible compiler
- PostgreSQL database
- Supabase account and configuration
- Clone the repository:
git clone https://github.com/7osssam/QT-Banking-System-Server.git
cd QT-Banking-System-Server
- Install dependencies:
make dependency
- Clean the project (optional):
make clean
- Build the project using the Makefile:
make build-debug
To run the server application, execute the following command:
make run
The server handles various requests through the RequestManager
and specific request classes located in the requestModule/Requests
directory. Each request class inherits from the base Request
class and implements the necessary logic for processing the request, including validation, database operations, and response generation.
for more details, see the Requests Documentation.
More detailed diagrams for each module can be found in the Modules Sequence Diagrams or
docs/diagrams/
directory.
Database operations are managed through the dbModule
(or DB
namespace), which includes classes for connecting to the database, executing queries, and handling results in a multi-threaded environment using Qt's QThreadStorage
for thread-local storage. This module is built as a separate library to ensure modularity and reusability across the server application.
- This sequence diagram illustrates the process of the initialization of the database connection:
- This sequence diagram illustrates the process of executing a query and handling the result:
More detailed diagrams for each module can be found in the Modules Sequence Diagrams or
docs/diagrams/
directory.
Unit tests are written using GoogleTest. To build and run the tests, execute the following command:
make test
Comprehensive documentation is available, detailing the purpose, design, and usage of each class and function within the project. The documentation is generated using Doxygen and can be viewed by opening the docs/html/index.html
file in a web browser or by visiting the GitHub Page site.
The project uses GitHub Actions for continuous integration. The build and test status can be monitored through the following badges:
Documentation | Pages Build Deployment | Ubuntu CI Test |
---|---|---|
Contributions are welcome! Please open an issue or submit a pull request for any changes or enhancements.
This project is licensed under the MIT License. See the LICENSE file for details.
Happy coding!