How f1nal3/juniorgram works
Project Type & Purpose
• It’s a full-stack C++ client–server messenger application.
• The README states it’s a “C++ messenger for learning purposes,” and the file tree reinforces this with distinct client, server, and common Base libraries.
• Key goals include practicing modular design (with separate modules for logging, cryptography, network handling, and data access) and tooling integration (CMake, CI/CD via GitHub Actions, testing frameworks).
Key Components to Highlight
• Client Subsystem:
– Contains a CLI application (Client.CLI) as the user-facing front end.
– Organized into core functionalities (Client.Core) and supporting test objects (Client.TestObject).
• Server Subsystem:
– Divided into Server.Core (the backbone with components like argument parser, server builder, settings management) and an executable (Server.Exec).
– Numerous tests in Server.Test to validate functionality.
• Network Module:
– Provides core networking capabilities (Connection, EncryptionHandler, CompressionHandler, Serialization via YasSerializer).
– Acts as the communication layer between client and server.
• Data Access Layer:
– Implemented with multiple adaptations, including Debug, Mock, and Postgre versions.
– Contains repositories and adapters for managing database interactions.
• Base Library:
– Includes crucial cross-cutting concerns such as Logger, Crypto, and Models.
– Logger: Offers both static and public versions for logging strategies.
– Crypto: Handles cryptographic functions to secure messaging.
– Models: Defines data structures and primitives (likely utilized by both client and server).
• Utility Modules:
– Contains SQL utilities, exception handling, and other generic helpers supporting the overall system.
• Test & Documentation:
– Several dedicated testing modules (under Test, DataAccess.Test, Server.Test, etc.) indicating a strong emphasis on quality.
– Documentation and style guides provide insight into coding standards and usage.
Relationships & Interactions
• The Client communicates with the Server over the Network layer using the provided APIs (from the Network/Public module).
• Both client and server leverage shared components from the Base library (Logger, Crypto, Models) for logging and data integrity.
• The Server uses the Data Access layer to interact with persistent storage (via different adapters: FileDB, Postgre, etc.).
• Utility modules supplement these components with additional functionality like SQL schema management and validation.
• Test directories confirm module interactions and independent unit tests for key components.
Architectural Patterns & Principles
• The project exhibits modularity; all features (crypto, logging, models, network) are clearly separated into modules with their own CMake build scripts.
• There’s an implicit layered architecture:
– Presentation layer: Client application (CLI)
– Business logic layer: Server.Core and Client.Core
– Data access layer: DataAccess modules
– Cross-cutting concerns: Base modules and Utility
• Testing is pervasive, indicating a design that encourages verification and separation of responsibilities.
• Use of CMake for managing builds suggests that dependency management & module isolation are key architectural principles.