# octoshrimpy/quik architecture

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

- Interactive diagram: https://gitdiagram.com/octoshrimpy/quik
- Repository: https://github.com/octoshrimpy/quik

## Overview

Based on your project’s file tree and README, QUIK is an Android messaging application that follows a modular, layered architecture. It is essentially a full-fledged, feature‐rich replacement for the stock messaging app – a continuation of QKSMS – and integrates functionalities for SMS/MMS handling, scheduling, backups, speech integration, attachments, blocking, and more.

##### Main Architectural Layers/Components
- Data Layer: Represented by the “data” module. Here, repository implementations, content provider interfaces, migration scripts, and integrations with native Android telephony APIs are present. This layer handles persistence, local storage, and interaction with external data sources (such as SMS/MMS data).
- Common/Shared Utilities: The “common” module contains shared code, helpers, and extensions that are used across the application (e.g., utility functions, extensions, compatibility classes).
- External Messaging Integration: The “android-smsmms” module appears to be either an integrated library or a fork of an official messaging codebase that handles the lower-level SMS and MMS telecommunications logic. This is a major external dependency that is tightly integrated with the rest of the application.

##### Messaging-specific and Platform Integration Components
- Blocking, Backup, and Scheduling: Highlight components related to message blocking (e.g., packages under “blocking”), backup (e.g., BackupRepository implementations and related interactors), and scheduling (e.g., ScheduledMessageRepository, AlarmManager, and related use cases).

- From Presentation Layer to Domain Layer: Show that the UI (activities, fragments) sends user actions (like sending a message, deleting, or blocking a contact) to the domain’s use cases.
- From Domain Layer to Data Layer: Represent that use cases rely on repository interfaces to read and write data (messages, contacts, configurations).
- Integration with Android-smsmms Module: Treat it as an external library or service layer that provides core SMS/MMS functionality which is invoked by the Data module or even by parts of Domain.

##### Additional System Elements
- CI/CD & Build Infrastructure: Although not part of the runtime system, mark that configuration files (like those under .circleci, GitHub workflows, Gradle build files) are used to automate builds, tests, and releases.
- External Interfaces: For example, integration with speech-to-text, text-to-speech, and external services for obtaining updates (Obtainium, F-Droid, GitHub Releases) can be indicated.

## Diagram (Mermaid)

```mermaid
flowchart TD
    U["User Interactions"]:::ui

    subgraph "Presentation Layer"
        P["UI Activities, Fragments, ViewModels, DI"]:::presentation
    end

    subgraph "Domain Layer"
        D["Business Logic / Use Cases"]:::domain
    end

    subgraph "Data Layer"
        DT["Repositories, Content Providers, Telephony Integration"]:::data
    end

    subgraph "External Messaging Integration"
        E["android-smsmms Module"]:::external
    end

    subgraph "Common Utilities"
        C["Helpers, Extensions, Utilities"]:::common
    end

    subgraph "Infrastructure"
        I["Dependency Injection (Dagger/Hilt)"]:::injection
        CI["CI/CD & Build Infrastructure"]:::cicd
    end

    U -->|"taps/swipes"| P
    P -->|"dispatches-events"| D
    D -->|"executes-usecases"| DT
    DT -->|"calls-telephony"| E
    E -->|"updates-events"| DT
    D -->|"notifies"| P
    I -->|"injects"| P
    I -->|"injects"| D
    C -.-> P
    C -.-> D
    C -.-> DT

    click P "https://github.com/octoshrimpy/quik/tree/master/presentation/"
    click D "https://github.com/octoshrimpy/quik/tree/master/domain/"
    click DT "https://github.com/octoshrimpy/quik/tree/master/data/"
    click C "https://github.com/octoshrimpy/quik/tree/master/common/"
    click E "https://github.com/octoshrimpy/quik/tree/master/android-smsmms/"

    classDef presentation fill:#e0f7fa,stroke:#006064,stroke-width:2px;
    classDef domain fill:#ffe0b2,stroke:#e65100,stroke-width:2px;
    classDef data fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px;
    classDef external fill:#ffebee,stroke:#c62828,stroke-width:2px;
    classDef common fill:#ede7f6,stroke:#512da8,stroke-width:2px;
    classDef injection fill:#f3e5f5,stroke:#8e24aa,stroke-width:2px;
    classDef cicd fill:#fff9c4,stroke:#fbc02d,stroke-width:2px;
    classDef ui fill:#dcedc8,stroke:#558b2f,stroke-width:2px;
```
