# pess0a/android-certification-study architecture

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

- Interactive diagram: https://gitdiagram.com/pess0a/android-certification-study
- Repository: https://github.com/pess0a/android-certification-study

## Overview

##### Project type and purpose
- This is a native Android mobile application whose sole purpose is to help developers prepare for the Google Associate Android Developer Certification.
- It covers five study topics (Android core, UI, data management, debugging, testing) by grouping content, sample code, and interactive exercises into topic-specific screens.

##### File structure
- Provided file tree only shows `.gitignore` and `README.md`, which implies a standard Android Studio project layout underneath (an `app/` module with `src/main/java`, `src/main/res`, plus `src/androidTest` and `src/test`).
- Expect Gradle build files (`build.gradle`), Android manifest, resource folders, and default configuration files.
- No microservices or external back-ends—this is a single APK.

##### README for additional insights
- The README lists the five major certification topics (A–E) with sub-bullets describing required knowledge and features.
- There’s no mention of external APIs, cloud services, or server components— everything runs locally on the device.

##### Main components
a. Presentation Layer
– Activities or Fragments per topic (A, B, C, D, E)
– Custom Views (e.g., ConstraintLayout screens, RecyclerViews with Paging)
– Navigation components (menu, drawer navigation)
b. Domain / ViewModel Layer
– ViewModels exposing LiveData to the UI
– Use-case or controller classes handling business logic (e.g., schedule a JobScheduler task)
c. Data Layer
– Room database (Entities + DAOs)
– Repository that mediates between DAOs and ViewModels
– SharedPreferences or DataStore for user preferences
– Raw resources/assets parser for static study content
d. Android OS & Services
– JobScheduler / WorkManager for background tasks (e.g., reminders)
– NotificationManager for outside-UI messages
– System Log for debugging output
e. Testing Modules
– Local unit tests (`src/test/java`) using JUnit
– Instrumentation tests (`src/androidTest/java`) using Espresso

##### Relationships and interactions
- UI components observe LiveData from ViewModels → ViewModels call Repository APIs → Repository interacts with Room DAOs or assets
- When the user schedules a background task, ViewModel triggers JobScheduler → Android OS invokes a Worker → Worker posts a notification via NotificationManager
- Debug flow: developers drop breakpoints in Activities/ViewModels/DAOs → use System Log for trace statements
- Testing: unit tests target ViewModels and Repository logic; Espresso tests simulate UI flows through Activities/RecyclerViews

##### Architectural patterns and design principles
- MVVM (Model-View-ViewModel) with a clear separation of concerns
- Repository pattern to abstract data sources (Room, assets, preferences)
- Single-Activity or multi-Activity navigation using the Android Jetpack Navigation components
- Use of LiveData and Paging library for reactive UI updates
- Dependency Injection (optional) to decouple ViewModels from Repositories (e.g., Dagger/Hilt)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Documentation
    README["README.md"]:::docs
    GITIGNORE[".gitignore"]:::docs

    %% App Container
    subgraph "Android App" 
        direction TB

        %% Presentation Layer
        subgraph "Presentation Layer" 
            direction TB
            TopicAActivity["TopicAActivity"]:::presentation
            TopicBActivity["TopicBActivity"]:::presentation
            TopicCActivity["TopicCActivity"]:::presentation
            TopicDActivity["TopicDActivity"]:::presentation
            TopicEActivity["TopicEActivity"]:::presentation
            CustomViews["Custom Views\n(RecyclerView, ConstraintLayout)"]:::presentation
            Navigation["Navigation Components"]:::presentation
        end

        %% Domain / ViewModel Layer
        subgraph "Domain / ViewModel Layer"
            direction TB
            ViewModels["ViewModels\n(LiveData)"]:::domain
            UseCases["Use-Case Controllers"]:::domain
            DIContainer["Dependency Injection\n(Hilt/Dagger)"]:::domain
        end

        %% Data Layer
        subgraph "Data Layer"
            direction TB
            Repository["Repository"]:::data
            DAOs["DAOs"]:::data
            RoomDB["RoomDatabase"]:::data
            Prefs["SharedPreferences/DataStore"]:::data
            AssetsParser["Raw Resources Parser"]:::data
        end
    end

    %% OS & Services
    subgraph "Android OS & Services"
        direction TB
        JobScheduler["JobScheduler/\nWorkManager"]:::os
        Worker["Worker"]:::os
        Notifications["NotificationManager"]:::os
        SystemLog["System Log"]:::os
    end

    %% Testing Modules
    subgraph "Testing"
        direction TB
        UnitTests["Local Unit Tests\n(JUnit)"]:::testing
        InstrumentationTests["Instrumentation Tests\n(Espresso)"]:::testing
    end

    %% Relationships
    TopicAActivity -->|observes| ViewModels
    TopicBActivity -->|observes| ViewModels
    TopicCActivity -->|observes| ViewModels
    TopicDActivity -->|observes| ViewModels
    TopicEActivity -->|observes| ViewModels
    CustomViews -->|renders| TopicAActivity
    Navigation -->|navigates to| TopicAActivity

    ViewModels -->|calls| Repository
    UseCases -->|uses| Repository
    DIContainer -->|provides| ViewModels
    DIContainer -->|provides| Repository

    Repository -->|queries| DAOs
    Repository -->|stores in| Prefs
    Repository -->|reads| AssetsParser
    DAOs -->|persist| RoomDB

    TopicAActivity -->|schedules task| JobScheduler
    JobScheduler -->|runs| Worker
    Worker -->|posts| Notifications
    ViewModels -->|logs| SystemLog

    %% Testing relations
    UnitTests -->|test| ViewModels
    UnitTests -->|test| Repository
    InstrumentationTests -->|simulate UI| TopicAActivity
    InstrumentationTests -->|simulate UI| CustomViews

    %% Documentation clicks
    click README "https://github.com/pess0a/android-certification-study/blob/master/README.md"
    click GITIGNORE "https://github.com/pess0a/android-certification-study/blob/master/.gitignore"

    %% Styles
    classDef presentation fill:#B3CDE3,stroke:#036;stroke-width:1px
    classDef domain fill:#C7E9B4,stroke:#080;stroke-width:1px
    classDef data fill:#FDD0A2,stroke:#F60;stroke-width:1px
    classDef os fill:#D9D9D9,stroke:#666;stroke-width:1px
    classDef testing fill:#DECBE4,stroke:#609;stroke-width:1px
    classDef docs fill:#EEEEEE,stroke:#999;stroke-width:1px,stroke-dasharray: 5 5
```
