# tiesol/proyectomoviles architecture

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

- Interactive diagram: https://gitdiagram.com/tiesol/proyectomoviles
- Repository: https://github.com/tiesol/proyectomoviles

## Overview

##### Project type and purpose
- Both ChambaPofabo and FixealoPofabo are Android mobile applications built with Kotlin. They follow a single-activity/MVVM pattern, consume a remote RESTful API, and present lists of categories, workers, appointments, chats, reviews, etc.
- The README simply labels this “proyectomoviles,” indicating a mobile-client portfolio rather than a backend or multi-service system.

##### File structure
- Top level: two sibling projects, each with
- an app module containing Android source, resources, tests, and Gradle config
- standard Gradle wrappers and settings files.
- Under app/src/main/java/com/ami/...:
- api: Retrofit interfaces (e.g. AppointmentApi, ChatApi)
- model: data classes for requests/responses
- repository: high-level data access abstractions
- retrofit: a RetrofitRepository factory for HTTP client setup
- ui: MainActivity, fragments, adapters, and navigation
- viewmodel: ViewModel classes exposing LiveData to UI
- Res: layouts, drawables, navigation graph, themes; no local DB layer (no Room).
- Patterns: MVVM + Repository + Retrofit network layer + Jetpack Navigation.

##### Detail and essential elements
- Retrofit API interface is represented or grouped under the Network layer.
- Single-activity coordinating all fragments via the Navigation Component.

## Diagram (Mermaid)

```mermaid
graph TB
    %% UI Layer
    subgraph "UI Layer"
        CP_MainActivity["MainActivity"]:::ui
        CP_Fragments["Fragments (ui/fragments)"]:::ui
        CP_Adapters["Adapters (ui/adapter)"]:::ui
        CP_NavGraph["Navigation Graph"]:::ui

        FP_MainActivity["MainActivity"]:::ui
        FP_Fragments["Fragments (ui/fragments)"]:::ui
        FP_Adapters["Adapters (ui/adapter)"]:::ui
        FP_NavGraph["Navigation Graph"]:::ui
    end

    %% ViewModel Layer
    subgraph "ViewModel Layer"
        CP_ViewModels["ViewModels"]:::vm
        FP_ViewModels["ViewModels"]:::vm
    end

    %% Repository Layer
    subgraph "Repository Layer"
        CP_Repo["Repository (repository)"]:::repo
        FP_Repo["Repository (repository)"]:::repo
    end

    %% Network Layer
    subgraph "Network Layer"
        CP_Retrofit["RetrofitRepository"]:::net
        CP_APIs["API Interfaces"]:::net

        FP_Retrofit["RetrofitRepository"]:::net
        FP_APIs["API Interfaces"]:::net
    end

    %% External Service
    ExternalService["Remote RESTful API"]:::ext

    %% Connections - ChambaPofabo
    CP_MainActivity -->|"interacts with"| CP_ViewModels
    CP_Fragments -->|"observes/uses"| CP_ViewModels
    CP_Adapters -->|"binds data from"| CP_ViewModels
    CP_NavGraph -->|"drives navigation in"| CP_MainActivity
    CP_ViewModels -->|"calls"| CP_Repo
    CP_Repo -->|"uses"| CP_Retrofit
    CP_Retrofit -->|"provides instance to"| CP_APIs
    CP_APIs -->|"HTTP/JSON"| ExternalService

    %% Connections - FixealoPofabo
    FP_MainActivity -->|"interacts with"| FP_ViewModels
    FP_Fragments -->|"observes/uses"| FP_ViewModels
    FP_Adapters -->|"binds data from"| FP_ViewModels
    FP_NavGraph -->|"drives navigation in"| FP_MainActivity
    FP_ViewModels -->|"calls"| FP_Repo
    FP_Repo -->|"uses"| FP_Retrofit
    FP_Retrofit -->|"provides instance to"| FP_APIs
    FP_APIs -->|"HTTP/JSON"| ExternalService

    %% Click Events
    click CP_MainActivity "https://github.com/tiesol/proyectomoviles/blob/main/ChambaPofabo/app/src/main/java/com/ami/chamba_pofabo/ui/MainActivity.kt"
    click CP_Fragments "https://github.com/tiesol/proyectomoviles/tree/main/ChambaPofabo/app/src/main/java/com/ami/chamba_pofabo/ui/fragments/"
    click CP_Adapters "https://github.com/tiesol/proyectomoviles/tree/main/ChambaPofabo/app/src/main/java/com/ami/chamba_pofabo/ui/adapter/"
    click CP_NavGraph "https://github.com/tiesol/proyectomoviles/blob/main/ChambaPofabo/app/src/main/res/navigation/nav_graph.xml"
    click FP_MainActivity "https://github.com/tiesol/proyectomoviles/blob/main/FixealoPofabo/app/src/main/java/com/ami/fixealopofabo/ui/MainActivity.kt"
    click FP_Fragments "https://github.com/tiesol/proyectomoviles/tree/main/FixealoPofabo/app/src/main/java/com/ami/fixealopofabo/ui/fragments/"
    click FP_Adapters "https://github.com/tiesol/proyectomoviles/tree/main/FixealoPofabo/app/src/main/java/com/ami/fixealopofabo/ui/adapter/"
    click FP_NavGraph "https://github.com/tiesol/proyectomoviles/blob/main/FixealoPofabo/app/src/main/res/navigation/nav_graph.xml"
    click CP_Repo "https://github.com/tiesol/proyectomoviles/tree/main/ChambaPofabo/app/src/main/java/com/ami/chamba_pofabo/repository/"
    click FP_Repo "https://github.com/tiesol/proyectomoviles/tree/main/FixealoPofabo/app/src/main/java/com/ami/fixealopofabo/repository/"
    click CP_Retrofit "https://github.com/tiesol/proyectomoviles/blob/main/ChambaPofabo/app/src/main/java/com/ami/chamba_pofabo/retrofit/RetrofitRepository.kt"
    click FP_Retrofit "https://github.com/tiesol/proyectomoviles/blob/main/FixealoPofabo/app/src/main/java/com/ami/fixealopofabo/retrofit/RetrofitRepository.kt"
    click CP_APIs "https://github.com/tiesol/proyectomoviles/tree/main/ChambaPofabo/app/src/main/java/com/ami/chamba_pofabo/api/"
    click FP_APIs "https://github.com/tiesol/proyectomoviles/tree/main/FixealoPofabo/app/src/main/java/com/ami/fixealopofabo/api/"

    %% Styles
    classDef ui fill:#ADD8E6,stroke:#000
    classDef vm fill:#90EE90,stroke:#000
    classDef repo fill:#FFA500,stroke:#000
    classDef net fill:#FF6347,stroke:#000
    classDef ext fill:#D3D3D3,stroke:#000
```
