# abdalla-ham/datadito architecture

> Architecture diagram of the GitHub repository abdalla-ham/datadito, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abdalla-ham/datadito
- Repository: https://github.com/abdalla-ham/datadito

## Overview

##### Main Components
- Frontend / Client Applications:
– Mobile: DataDito-iOS (an iOS application with Swift code for user interface, models, and view models).
– Web: web-application and Web.NetDataDito serve as the web-based clients (using Java-based controllers and view HTML pages).
– Desktop: DesktopApp (Java) and DotNetDesktopApp (.NET), offering a desktop client experience.
- Backend / Service Layer:
– Multiple service modules (for instance, ABMF, CGF, CHF, aom, TGF, NF) that likely handle different aspects such as authentication, transactions, and business logic.
– Each module typically contains classes like ConfigLoader, DataSourceConfig, controller classes, and business logic operations (e.g., OracleOperations, OracleCRUD in multiple modules).
- Integration / Middleware:
– Kafka module: Contains classes to produce and consume messages (producers, consumers, serializers, deserializers, topic managers) that facilitate message-driven communication between services.
– Hazelcast: Likely used as an in-memory data grid or caching service; its modules include manager classes and configurations.
- Data Stores:
– The project references Oracle operations, VoltDB (modules for testing DB operations) and possibly other external databases. Configuration files and SQL scripts (e.g., PROCEDURES.sql, TABLE-CREATING.sql) indicate planned persistent stores.
- Infrastructure & Deployment:
– Dockerfiles in several modules (for ABMF, CGF, aom, web-application, etc.) indicate containerized deployment.
– Maven build scripts (pom.xml) are used across projects.
– There are configuration files (application.properties, kafka-config.properties, log4j2.xml) which allude to centralized configuration management.
- Test & Utility Components:
– tracerBullet contains test cases in C# for UI testing and/or automation.
– Other directories (such as NF and TrendyolLogInTest) suggest additional test or integration setups.

##### Relationships and Interactions
- How backend services interact with the messaging layer (Kafka) to decouple communication.
- If extra integration components (like email via JakartaMail or external API calls) are present, include directional flows for those interactions.

##### Architectural Patterns and Design Principles
- Microservices / Modularization: Each backend module (ABMF, CGF, CHF, aom, etc.) can be shown as a separate service component that encapsulates specific business functionality.
- Layered Architecture: At one level you have presentation (mobile, web, desktop) and at another, the business logic layer (the service modules), and then the data layer (databases, caching).
- Event-Driven / Messaging: Emphasize the Kafka messaging service, with clear roles for producers and consumers, which decouples some services.
- Containerization: Note the Dockerfiles and Maven wrapper usage to highlight deployment practices.
- Use of Configuration and Externalized Properties: Several projects include properties files indicating the reliance on external configuration.

##### Relevant Technologies and Frameworks
- Java (with Maven for dependency management) is a core component of many backend services.
- .NET is used (in DotNetDesktopApp) for desktop client development.
- Swift is used for the iOS application.
- Kafka is integrated for messaging (with custom serializers/deserializers).
- Hazelcast is used for caching or distributed messaging.
- Docker is used for deployment containerization.
- Logging is handled via log4j2, and there are configuration properties for databases and mailing (JavaMailSender).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Applications
    subgraph "Client Applications"
        DataDito_iOS["DataDito-iOS"]:::mobile
        web_app["web-application"]:::web
        Web_NetDataDito["Web.NetDataDito"]:::web
        DesktopApp["DesktopApp"]:::desktop
        DotNetDesktopApp["DotNetDesktopApp"]:::desktop
    end

    %% Backend Services Aggregator
    BG["Backend Services"]:::backend

    %% Connections from Clients to Backend Services
    DataDito_iOS --> BG
    web_app --> BG
    Web_NetDataDito --> BG
    DesktopApp --> BG
    DotNetDesktopApp --> BG

    %% Backend Modules
    subgraph "Backend Modules"
        ABMF["ABMF Module"]:::backendModule
        CGF["CGF Module"]:::backendModule
        CHF["CHF Module"]:::backendModule
        aom["aom Module"]:::backendModule
        TGF["TGF Module"]:::backendModule
        NF["NF Module"]:::backendModule
    end

    %% Connections from Backend Services aggregator to individual modules
    BG --> ABMF
    BG --> CGF
    BG --> CHF
    BG --> aom
    BG --> TGF
    BG --> NF

    %% Integration and Middleware
    subgraph "Integration & Middleware"
        Kafka["Kafka Messaging"]:::middleware
        Hazelcast["Hazelcast Cache"]:::middleware
    end

    %% Backend Modules sending messages to Kafka
    ABMF --> Kafka
    CGF --> Kafka
    CHF --> Kafka
    aom --> Kafka
    TGF --> Kafka
    NF --> Kafka

    %% Backend Services interacting with Hazelcast for caching/distributed processing
    BG --> Hazelcast

    %% Data Store
    subgraph "Data Stores"
        VoltDB["VoltDB"]:::datastore
    end

    %% Backend Services performing DB operations
    BG --> VoltDB

    %% Test & Utility Components
    subgraph "Test & Utility"
        tracerBullet["tracerBullet"]:::test
        TrendyolLogInTest["TrendyolLogInTest"]:::test
    end

    %% Test components interacting with Backend Services for integration/UI testing
    tracerBullet --> BG
    TrendyolLogInTest --> BG

    %% Styles
    classDef mobile fill:#FFD700,stroke:#000,stroke-width:1px;
    classDef web fill:#ADD8E6,stroke:#000,stroke-width:1px;
    classDef desktop fill:#90EE90,stroke:#000,stroke-width:1px;
    classDef backend fill:#FF6347,stroke:#000,stroke-width:1px;
    classDef backendModule fill:#FF8C00,stroke:#000,stroke-width:1px;
    classDef middleware fill:#8A2BE2,stroke:#000,stroke-width:1px;
    classDef datastore fill:#90EE90,stroke:#000,stroke-width:1px;
    classDef test fill:#D3D3D3,stroke:#000,stroke-width:1px;

    %% Click Events
    click DataDito_iOS "https://github.com/abdalla-ham/datadito/tree/main/DataDito-iOS"
    click web_app "https://github.com/abdalla-ham/datadito/tree/main/web-application"
    click Web_NetDataDito "https://github.com/abdalla-ham/datadito/blob/main/Web.NetDataDito"
    click DesktopApp "https://github.com/abdalla-ham/datadito/tree/main/DesktopApp"
    click DotNetDesktopApp "https://github.com/abdalla-ham/datadito/tree/main/DotNetDesktopApp"
    click ABMF "https://github.com/abdalla-ham/datadito/tree/main/ABMF"
    click CGF "https://github.com/abdalla-ham/datadito/tree/main/CGF"
    click CHF "https://github.com/abdalla-ham/datadito/tree/main/CHF"
    click aom "https://github.com/abdalla-ham/datadito/tree/main/aom"
    click TGF "https://github.com/abdalla-ham/datadito/tree/main/TGF"
    click NF "https://github.com/abdalla-ham/datadito/tree/main/NF/nf/nf"
    click VoltDB "https://github.com/abdalla-ham/datadito/tree/main/VoltDB"
    click Kafka "https://github.com/abdalla-ham/datadito/tree/main/Kafka"
    click Hazelcast "https://github.com/abdalla-ham/datadito/tree/main/Hazelcast"
    click tracerBullet "https://github.com/abdalla-ham/datadito/tree/main/tracerBullet"
    click TrendyolLogInTest "https://github.com/abdalla-ham/datadito/tree/main/TrendyolLogInTest"
```
