# neoapplications/neo-store architecture

> Architecture diagram of the GitHub repository neoapplications/neo-store, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/neoapplications/neo-store
- Repository: https://github.com/neoapplications/neo-store

## Overview

##### Main Components

a. Core Application Layer:
- Main Application (MainApplication.kt)
- Activity Container (NeoActivity.kt)
- Navigation System (ui/navigation/)

b. Feature Modules (arrange in a circular pattern around core):
- Pages Module (pages/)
- Explore, Latest, Installed, Search pages
- Preferences pages
- App details page
- Database Module (database/)
- Room Database (DatabaseX)
- DAOs for different entities
- Repository Management (index/)
- Repository Updater
- Index Parsers (v0 and v1)
- Installation System (installer/)
- Multiple installer implementations
- Installation event handling

c. Supporting Services:
- Worker Management (service/worker/)
- Download Worker
- Sync Worker
- Install Worker
- Exodus Worker
- Network Layer (network/)
- Downloader
- CoilDownloader
- ExodusRepo

- Installation processes (thick lines)

##### Component Relationships

- ViewModels (viewmodels/) connecting UI to data
- Database interactions with repositories
- Service worker connections to network and storage
- Installation flow from UI to system

##### External Integrations

Connections to:
- F-Droid Repositories
- Exodus Privacy
- Android Package Manager
- File System

##### Architectural Patterns

MVVM pattern used:
- UI Layer (pages/, components/)
- ViewModel Layer (viewmodels/)
- Model Layer (database/, entity/)

##### Notes

Annotations for:
- Privacy features
- Multi-language support
- Theme system
- Permission handling

- Clean architecture separation
- Modern Android development patterns
- Privacy-focused features
- Efficient repository management
- Multiple installation methods

## Diagram (Mermaid)

```mermaid
graph TB
    %% Core Application Layer
    subgraph Core
        MainApp["Main Application"]:::core
        Activity["Activity Container"]:::core
        Navigation["Navigation System"]:::core
    end

    %% Feature Modules
    subgraph Features
        Pages["Pages Module"]:::ui
        Database["Database Module"]:::data
        RepoMgmt["Repository Management"]:::repo
        InstallSys["Installation System"]:::install
    end

    %% Supporting Services
    subgraph Services
        WorkerMgmt["Worker Management"]:::service
        NetworkLayer["Network Layer"]:::network
    end

    %% UI Architecture
    subgraph UI
        ViewModels["ViewModels"]:::ui
        UIComponents["UI Components"]:::ui
        ThemeSystem["Theme System"]:::ui
    end

    %% Data Layer
    subgraph Data
        Entities["Database Entities"]:::data
        DAOs["DAOs"]:::data
    end

    %% Utility Components
    subgraph Utils
        CommonUtils["Common Utilities"]:::util
        Extensions["Extensions"]:::util
    end

    %% Privacy Features
    subgraph Privacy
        PrivacyProc["Privacy Processor"]:::privacy
        PrivacyComp["Privacy Components"]:::privacy
    end

    %% Installation Components
    subgraph Installation
        BaseInstaller["Base Installer"]:::install
        InstallEvents["Installation Events"]:::install
    end

    %% External Systems
    FDroid["F-Droid Repos"]:::external
    ExodusPrivacy["Exodus Privacy"]:::external
    PackageManager["Android Package Manager"]:::external
    FileSystem["File System"]:::external

    %% Relationships
    MainApp --> Activity
    Activity --> Navigation
    Navigation --> Pages
    Pages --> ViewModels
    ViewModels --> Database
    Database --> Entities
    Database --> DAOs
    RepoMgmt --> NetworkLayer
    InstallSys --> PackageManager
    WorkerMgmt --> NetworkLayer
    NetworkLayer --> FDroid
    NetworkLayer --> ExodusPrivacy
    InstallSys --> FileSystem
    PrivacyProc --> ExodusPrivacy
    UIComponents --> ThemeSystem
    BaseInstaller --> InstallEvents

    %% Click Events
    click MainApp "https://github.com/NeoApplications/Neo-Store/blob/master/src/main/kotlin/com/machiav3lli/fdroid/MainApplication.kt"
    click Activity "https://github.com/NeoApplications/Neo-Store/blob/master/src/main/kotlin/com/machiav3lli/fdroid/NeoActivity.kt"
    click Navigation "https://github.com/NeoApplications/Neo-Store/tree/master/src/main/kotlin/com/machiav3lli/fdroid/ui/navigation/"
    click Pages "https://github.com/NeoApplications/Neo-Store/tree/master/src/main/kotlin/com/machiav3lli/fdroid/pages/"
    click Database "https://github.com/NeoApplications/Neo-Store/tree/master/src/main/kotlin/com/machiav3lli/fdroid/database/"
    click RepoMgmt "https://github.com/NeoApplications/Neo-Store/tree/master/src/main/kotlin/com/machiav3lli/fdroid/index/"
    click InstallSys "https://github.com/NeoApplications/Neo-Store/tree/master/src/main/kotlin/com/machiav3lli/fdroid/installer/"
    click WorkerMgmt "https://github.com/NeoApplications/Neo-Store/tree/master/src/main/kotlin/com/machiav3lli/fdroid/service/worker/"
    click NetworkLayer "https://github.com/NeoApplications/Neo-Store/tree/master/src/main/kotlin/com/machiav3lli/fdroid/network/"
    click ViewModels "https://github.com/NeoApplications/Neo-Store/tree/master/src/main/kotlin/com/machiav3lli/fdroid/viewmodels/"
    click UIComponents "https://github.com/NeoApplications/Neo-Store/tree/master/src/main/kotlin/com/machiav3lli/fdroid/ui/components/"
    click ThemeSystem "https://github.com/NeoApplications/Neo-Store/tree/master/src/main/kotlin/com/machiav3lli/fdroid/ui/compose/theme/"
    click Entities "https://github.com/NeoApplications/Neo-Store/tree/master/src/main/kotlin/com/machiav3lli/fdroid/database/entity/"
    click DAOs "https://github.com/NeoApplications/Neo-Store/tree/master/src/main/kotlin/com/machiav3lli/fdroid/database/dao/"
    click CommonUtils "https://github.com/NeoApplications/Neo-Store/tree/master/src/main/kotlin/com/machiav3lli/fdroid/utility/"
    click Extensions "https://github.com/NeoApplications/Neo-Store/tree/master/src/main/kotlin/com/machiav3lli/fdroid/utility/extension/"
    click PrivacyProc "https://github.com/NeoApplications/Neo-Store/blob/master/src/main/kotlin/com/machiav3lli/fdroid/utility/PrivacyProcessor.kt"
    click PrivacyComp "https://github.com/NeoApplications/Neo-Store/tree/master/src/main/kotlin/com/machiav3lli/fdroid/ui/components/privacy/"
    click BaseInstaller "https://github.com/NeoApplications/Neo-Store/blob/master/src/main/kotlin/com/machiav3lli/fdroid/installer/BaseInstaller.kt"
    click InstallEvents "https://github.com/NeoApplications/Neo-Store/blob/master/src/main/kotlin/com/machiav3lli/fdroid/installer/InstallationEvents.kt"

    %% Styles
    classDef core fill:#1e88e5,stroke:#13579e,color:white
    classDef ui fill:#42a5f5,stroke:#1976d2,color:white
    classDef data fill:#4caf50,stroke:#388e3c,color:white
    classDef network fill:#ff9800,stroke:#f57c00,color:white
    classDef service fill:#9c27b0,stroke:#7b1fa2,color:white
    classDef install fill:#f44336,stroke:#d32f2f,color:white
    classDef privacy fill:#795548,stroke:#5d4037,color:white
    classDef repo fill:#009688,stroke:#00796b,color:white
    classDef util fill:#607d8b,stroke:#455a64,color:white
    classDef external fill:#9e9e9e,stroke:#757575,color:white
```
