# lcc-atmane/hellopics architecture

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

- Interactive diagram: https://gitdiagram.com/lcc-atmane/hellopics
- Repository: https://github.com/lcc-atmane/hellopics

## Overview

##### Project type and purpose
- This is a native Android full-stack photo-editing mobile application (“HelloPics”) written in Java.
- Its purpose: let users pick images (from device or Unsplash), apply edits (crop, rotate, filters, text, gradient, hidden-secrets), save/share results, and maintain edit history.

##### File structure
- Top-level “app” module with AndroidManifest, Gradle scripts, resource folders, and Java code under com/phantomhive/exil/hellopics.
- Java code is organized by feature:
- Create_Art_Classes – gallery picker, adapters, image-selection flows
- Img_Editor – editor Activities for each tool (crop, clone, rotate, text, free-crop, etc.), adapters, utility classes, gestures, scale/image-view helpers
- ui_Home – main home Activity/Fragments, Unsplash API client (ApiUnsplash, ApiUtils, SharedViewModel), display of edited images and account panel
- FirstActivities – splash and entry point
- EdgetoEdgeFix – window insets fixes for full-screen
- HistorySettings – SQLite history DB for undo/history features
- Build scripts: Gradle, ProGuard rules, version catalog.

##### README for additional insights
- Confirms 15+ editing tools, hidden-secrets feature, Unsplash integration.
- No custom server—only external public API (Unsplash) and local storage/DB.

##### Essential architectural elements to capture
- Presentation vs. Domain vs. Data separation
- Local vs. Remote data sources
- Image processing pipeline per tool
- Navigation graph (single-Activity + Fragments)
- Security flow for HiddenSecrets
- History persistence and undo
- Resource management (assets, drawables)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Devices
    Device["Android Device"]:::device

    %% Presentation Layer
    subgraph "Presentation Layer"
        direction TB
        HomeActivity["HomeActivity"]:::presentation
        HomeFragment["HomeFragment"]:::presentation
        AccountFragment["AccountFragment"]:::presentation
        ChooseImageArtActivity["ChooseImageArtActivity"]:::presentation
        NavigationGraph["Navigation Graph"]:::presentation
    end

    %% Domain / Editor Engine
    subgraph "Domain / Editor Engine"
        direction TB
        EditorActivities["EditorActivities (Tools Entry)"]:::domain
        HiddenSecrets["HiddenSecrets Module"]:::domain
        GestureDetectors["Gesture Detectors"]:::domain
        CustomViews["Custom Views"]:::domain
    end

    %% Data Layer
    subgraph "Data Layer"
        direction TB
        FileSystem["Local File System"]:::data
        HistoryDB["History SQLite DB"]:::data
        PasswordSettings["HiddenSecrets Password Settings"]:::data
    end

    %% Network Layer
    subgraph "Network / API"
        direction TB
        SharedViewModel["SharedViewModel"]:::network
        ApiUnsplash["ApiUnsplash"]:::network
        ApiUtils["ApiUtils"]:::network
        ImagesModel["ImagesModel"]:::network
        UnsplashAPICloud["Unsplash API"]:::external
    end

    %% Assets & Resources
    subgraph "Assets & Resources"
        direction TB
        Fonts["Fonts"]:::assets
        Layouts["Layouts"]:::assets
        Drawables["Tool Icons (Drawables)"]:::assets
        EdgeToEdgeFix["EdgeToEdgeFix"]:::assets
    end

    %% Connections
    Device --> HomeActivity
    HomeActivity --> HomeFragment
    HomeActivity --> AccountFragment
    HomeActivity --> ChooseImageArtActivity
    HomeActivity --> NavigationGraph

    HomeFragment -->|"uses"| SharedViewModel
    HomeFragment -->|"loadLocalImages()"| FileSystem
    HomeFragment -->|"loadRemoteImages()"| SharedViewModel

    SharedViewModel --> ApiUnsplash
    ApiUnsplash -->|"GET /photos"| UnsplashAPICloud
    ApiUnsplash --> ImagesModel
    ImagesModel --> SharedViewModel
    SharedViewModel --> HomeFragment

    ChooseImageArtActivity --> EditorActivities
    EditorActivities --> CustomViews
    EditorActivities --> GestureDetectors
    EditorActivities --> FileSystem
    EditorActivities --> HistoryDB
    EditorActivities --> HiddenSecrets

    HiddenSecrets --> PasswordSettings

    %% Resources usage
    HomeActivity --> Layouts
    HomeFragment --> Layouts
    ChooseImageArtActivity --> Layouts
    EditorActivities --> Layouts
    EditorActivities --> Drawables
    EditorActivities --> Fonts
    AccountFragment --> Layouts

    EdgeToEdgeFix --> HomeActivity
    EdgeToEdgeFix --> EditorActivities

    %% Click Events
    click HomeActivity "https://github.com/lcc-atmane/hellopics/blob/master/app/src/main/java/com/phantomhive/exil/hellopics/ui_Home/HomeActivity/HomeActivity.java"
    click HomeFragment "https://github.com/lcc-atmane/hellopics/blob/master/app/src/main/java/com/phantomhive/exil/hellopics/ui_Home/home/HomeFragment.java"
    click AccountFragment "https://github.com/lcc-atmane/hellopics/blob/master/app/src/main/java/com/phantomhive/exil/hellopics/ui_Home/EditedImages/AccountFragment.java"
    click ChooseImageArtActivity "https://github.com/lcc-atmane/hellopics/blob/master/app/src/main/java/com/phantomhive/exil/hellopics/Create_Art_Classes/ChooseImageArtActivity.java"
    click NavigationGraph "https://github.com/lcc-atmane/hellopics/blob/master/app/src/main/res/navigation/mobile_navigation.xml"
    click EditorActivities "https://github.com/lcc-atmane/hellopics/tree/master/app/src/main/java/com/phantomhive/exil/hellopics/Img_Editor/EditorActivities/ViewsActivities/"
    click HiddenSecrets "https://github.com/lcc-atmane/hellopics/tree/master/app/src/main/java/com/phantomhive/exil/hellopics/Img_Editor/EditorActivities/HiddenSecrets"
    click GestureDetectors "https://github.com/lcc-atmane/hellopics/tree/master/app/src/main/java/com/phantomhive/exil/hellopics/Img_Editor/Views/gestures"
    click CustomViews "https://github.com/lcc-atmane/hellopics/tree/master/app/src/main/java/com/phantomhive/exil/hellopics/Img_Editor/Views"
    click HistoryDB "https://github.com/lcc-atmane/hellopics/blob/master/app/src/main/java/com/phantomhive/exil/hellopics/Img_Editor/EditorActivities/mainActivity/HistorySettings/HistorySqliteDataBase.java"
    click PasswordSettings "https://github.com/lcc-atmane/hellopics/blob/master/app/src/main/java/com/phantomhive/exil/hellopics/Img_Editor/EditorActivities/HiddenSecrets/HiddenSecretsSettings/PasswordSettings.java"
    click ApiUnsplash "https://github.com/lcc-atmane/hellopics/blob/master/app/src/main/java/com/phantomhive/exil/hellopics/ui_Home/unsplashApi/ApiUnsplash.java"
    click ApiUtils "https://github.com/lcc-atmane/hellopics/blob/master/app/src/main/java/com/phantomhive/exil/hellopics/ui_Home/unsplashApi/ApiUtils.java"
    click SharedViewModel "https://github.com/lcc-atmane/hellopics/blob/master/app/src/main/java/com/phantomhive/exil/hellopics/ui_Home/unsplashApi/SharedViewModel.java"
    click ImagesModel "https://github.com/lcc-atmane/hellopics/blob/master/app/src/main/java/com/phantomhive/exil/hellopics/ui_Home/unsplashApi/imagesData/ImagesModel.java"
    click EdgeToEdgeFix "https://github.com/lcc-atmane/hellopics/blob/master/app/src/main/java/com/phantomhive/exil/hellopics/EdgetoEdgeFix/EdgeToEdgeFix.java"
    click Fonts "https://github.com/lcc-atmane/hellopics/tree/master/app/src/main/assets/font"
    click Layouts "https://github.com/lcc-atmane/hellopics/tree/master/app/src/main/res/layout"
    click Drawables "https://github.com/lcc-atmane/hellopics/tree/master/app/src/main/res/drawable"

    %% Styles
    classDef device fill:#CCCCCC,stroke:#333,stroke-width:1px
    classDef presentation fill:#a2d2ff,stroke:#333,stroke-width:1px
    classDef domain fill:#caffbf,stroke:#333,stroke-width:1px
    classDef data fill:#ffd6a5,stroke:#333,stroke-width:1px
    classDef network fill:#bdb2ff,stroke:#333,stroke-width:1px
    classDef external fill:#ffafcc,stroke:#333,stroke-width:1px
    classDef assets fill:#e0fbfc,stroke:#333,stroke-width:1px
```
