# pass-with-high-score/quickmem-app architecture

> Architecture diagram of the GitHub repository pass-with-high-score/quickmem-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-02-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pass-with-high-score/quickmem-app
- Repository: https://github.com/pass-with-high-score/quickmem-app

## Overview

##### High-Level Architecture Components

a) Client-Side (Mobile App):
- Presentation Layer (UI)
- Domain Layer
- Data Layer
- Core Components

b) External Services:
- Backend Server
- Firebase Services
- Third-party Services (Google OAuth, OneSignal, RevenueCat)
- Advertisement Services

##### Detailed Component Breakdown

Create sub-sections for each major component:

A. Presentation Layer:
- Separate sections for:
- Authentication flows (auth/, login/, signup/)
- Main app features (app/)
- Study features (flashcard/, study_set/)
- Settings and profile management

B. Domain Layer:
- Repository interfaces
- Use cases
- Domain models
- Business logic components

C. Data Layer:
- Local storage (Room Database)
- Remote data sources
- Data mappers
- DTOs (Data Transfer Objects)

##### Integration Points

Connections between:
- API Service connections (using Retrofit)
- Firebase integration
- Authentication flows
- Data synchronization paths
- Local-Remote data flow

##### Key Technical Components

Specialized components:
- Dependency injection (Dagger Hilt)
- Image loading system (Coil)
- Notification system
- AI-powered features
- Study tracking system
- Multi-language support

##### Data Flow Patterns

- User authentication flow
- Flashcard creation and synchronization
- Study session data flow
- Progress tracking flow
- Notification handling

##### Specific Implementation Details

Technical annotations for:
- Jetpack Compose UI components
- Kotlin Coroutines flow
- Repository patterns
- MVVM architecture
- Caching strategies

##### Security Layer

Security implementations:
- Authentication mechanisms
- Data encryption
- Token management
- Secure storage

##### External Services (side)

Remember to emphasize the core flashcard learning features while showing how supporting systems (notifications, AI, analytics) integrate into the main functionality.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and Classes
    classDef ui fill:#3498db,stroke:#2980b9,color:white
    classDef domain fill:#2ecc71,stroke:#27ae60,color:white
    classDef data fill:#f1c40f,stroke:#f39c12,color:black
    classDef external fill:#9b59b6,stroke:#8e44ad,color:white
    classDef security fill:#e74c3c,stroke:#c0392b,color:white
    classDef core fill:#34495e,stroke:#2c3e50,color:white

    %% Main Components
    UI[Presentation Layer]:::ui
    Domain[Domain Layer]:::domain
    Data[Data Layer]:::data
    Core[Core Components]:::core
    External[External Services]:::external

    %% Presentation Layer Components
    subgraph PresentationLayer
        UI --> AuthUI[Authentication UI]:::ui
        UI --> MainUI[Main App UI]:::ui
        UI --> CommonComp[Common Components]:::ui
        
        MainUI --> FlashCard[Flashcard Management]:::ui
        MainUI --> StudySet[Study Features]:::ui
        MainUI --> Settings[Settings]:::ui
        MainUI --> Profile[Profile]:::ui
        MainUI --> AIFeatures[AI Features]:::ui
        MainUI --> Notifications[Notifications]:::ui
    end

    %% Domain Layer Components
    subgraph DomainLayer
        Domain --> Models[Domain Models]:::domain
        Domain --> Repos[Repositories]:::domain
        Domain --> DataSources[Data Sources]:::domain
    end

    %% Data Layer Components
    subgraph DataLayer
        Data --> DTOs[DTOs]:::data
        Data --> Remote[Remote Data]:::data
        Data --> Local[Local Storage]:::data
        Data --> Mappers[Data Mappers]:::data
        Local --> RoomDB[Room Database]:::data
        Local --> DAOs[DAOs]:::data
    end

    %% Core Components
    subgraph CoreComponents
        Core --> DI[Dependency Injection]:::core
        Core --> DataStore[Data Store]:::core
        Core --> Utils[Utilities]:::core
        Core --> TokenMgmt[Token Management]:::security
    end

    %% External Services
    subgraph ExternalServices
        External --> Firebase[Firebase]:::external
        External --> OAuth[Google OAuth]:::external
        External --> OneSignal[OneSignal]:::external
        External --> RevenueCat[RevenueCat]:::external
    end

    %% Relationships
    UI --> Domain
    Domain --> Data
    Data --> External
    Core --> UI
    Core --> Domain
    Core --> Data

    %% Click Events
    click UI "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/presentation/"
    click AuthUI "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/presentation/auth/"
    click MainUI "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/presentation/app/"
    click CommonComp "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/presentation/components/"
    click Domain "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/domain/"
    click Models "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/domain/model/"
    click Repos "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/domain/repository/"
    click DataSources "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/domain/datasource/"
    click Data "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/data/"
    click DTOs "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/data/dto/"
    click Remote "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/data/remote/"
    click Local "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/data/local/"
    click Mappers "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/data/mapper/"
    click Core "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/core/"
    click DI "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/core/di/"
    click DataStore "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/core/datastore/"
    click Utils "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/core/utils/"
    click FlashCard "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/presentation/app/flashcard/"
    click StudySet "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/presentation/app/study_set/"
    click Settings "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/presentation/app/settings/"
    click Profile "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/presentation/app/profile/"
    click AIFeatures "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/presentation/app/ai_generative/"
    click Firebase "https://github.com/pass-with-high-score/quickmem-app/blob/main/app/src/main/java/com/pwhs/quickmem/core/service/AppFirebaseMessagingService.kt"
    click Notifications "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/presentation/app/home/notification/"
    click RoomDB "https://github.com/pass-with-high-score/quickmem-app/blob/main/app/src/main/java/com/pwhs/quickmem/data/local/AppDatabase.kt"
    click DAOs "https://github.com/pass-with-high-score/quickmem-app/tree/main/app/src/main/java/com/pwhs/quickmem/data/local/dao/"
    click TokenMgmt "https://github.com/pass-with-high-score/quickmem-app/blob/main/app/src/main/java/com/pwhs/quickmem/core/datastore/TokenManager.kt"
```
