# malves4018/droidmentor architecture

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

- Interactive diagram: https://gitdiagram.com/malves4018/droidmentor
- Repository: https://github.com/malves4018/droidmentor

## Overview

DroidMentor is currently an Android Compose UI scaffold for a planned BYOK Gemini mentoring app. The present user-facing flow opens a mentor screen with a message input; sending is explicitly not implemented. A separate history drawer renders supplied conversation groups and emits open, delete, and new-conversation actions, but it is not wired into navigation or persistence. The README documents Gemini REST, Room conversation storage, and DataStore API-key storage as product capabilities; their implementation is not present in the supplied tree, so these are shown as documented, unverified subsystem boundaries.

Main entry points: [`app/src/main/kotlin/ui/historyChat/ChatHistoryScreen.kt`](https://github.com/malves4018/droidmentor/blob/main/app/src/main/kotlin/ui/historyChat/ChatHistoryScreen.kt) (History drawer), [`app/src/main/kotlin/ui/title/TitleScreen.kt`](https://github.com/malves4018/droidmentor/blob/main/app/src/main/kotlin/ui/title/TitleScreen.kt) (Mentor screen), [`app/src/main/kotlin/ui/historyChat/components/ConversationList.kt`](https://github.com/malves4018/droidmentor/blob/main/app/src/main/kotlin/ui/historyChat/components/ConversationList.kt) (Conversation list), [`app/src/main/kotlin/ui/historyChat/ChatHistoryAction.kt`](https://github.com/malves4018/droidmentor/blob/main/app/src/main/kotlin/ui/historyChat/ChatHistoryAction.kt) (History actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App entry"]
  node_main["Main activity<br/>[MainActivity.kt]"]
end

subgraph group_mentor["Mentor interface"]
  node_title["Mentor screen<br/>[TitleScreen.kt]"]
  node_common["Shared UI"]
end

subgraph group_history["Chat history"]
  node_history_screen["History drawer"]
  node_history_action["History actions"]
  node_conversation_list["Conversation list"]
  node_conversation_item["Conversation row"]
end

subgraph group_services["Documented services"]
  node_gemini{{"Gemini REST"}}
  node_conversation_store[("Room storage")]
  node_key_store[("API key storage")]
end

node_user(("User"))

node_user -->|"opens app"| node_main
node_main -->|"shows"| node_title
node_title -->|"uses"| node_common
node_history_screen -->|"renders"| node_conversation_list
node_conversation_list -->|"renders"| node_conversation_item
node_history_screen -->|"emits"| node_history_action
node_conversation_list -->|"emits"| node_history_action
node_conversation_item -->|"requests delete"| node_history_action
node_title -.->|"sends prompts"| node_gemini
node_history_screen -.->|"loads conversations"| node_conversation_store
node_history_screen -.->|"persists changes"| node_conversation_store
node_key_store -.->|"provides API key"| node_gemini

click node_main "https://github.com/malves4018/droidmentor/blob/main/app/src/main/kotlin/MainActivity.kt"
click node_title "https://github.com/malves4018/droidmentor/blob/main/app/src/main/kotlin/ui/title/TitleScreen.kt"
click node_common "https://github.com/malves4018/droidmentor/tree/main/app/src/main/kotlin/ui/common"
click node_history_screen "https://github.com/malves4018/droidmentor/blob/main/app/src/main/kotlin/ui/historyChat/ChatHistoryScreen.kt"
click node_history_action "https://github.com/malves4018/droidmentor/blob/main/app/src/main/kotlin/ui/historyChat/ChatHistoryAction.kt"
click node_conversation_list "https://github.com/malves4018/droidmentor/blob/main/app/src/main/kotlin/ui/historyChat/components/ConversationList.kt"
click node_conversation_item "https://github.com/malves4018/droidmentor/blob/main/app/src/main/kotlin/ui/historyChat/components/ConversationItem.kt"
click node_conversation_store "https://github.com/malves4018/droidmentor/tree/main/app/src/main/kotlin/data"
click node_key_store "https://github.com/malves4018/droidmentor/tree/main/app/src/main/kotlin/platform"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_user toneBlue
class node_title,node_common toneAmber
class node_history_screen,node_history_action,node_conversation_list,node_conversation_item toneMint
class node_gemini,node_conversation_store,node_key_store toneRose
```

## Components

### App entry

- [Main activity](https://github.com/malves4018/droidmentor/blob/main/app/src/main/kotlin/MainActivity.kt): `app/src/main/kotlin/MainActivity.kt`

### Mentor interface

- [Mentor screen](https://github.com/malves4018/droidmentor/blob/main/app/src/main/kotlin/ui/title/TitleScreen.kt): `app/src/main/kotlin/ui/title/TitleScreen.kt`
- [Shared UI](https://github.com/malves4018/droidmentor/tree/main/app/src/main/kotlin/ui/common): `app/src/main/kotlin/ui/common`

### Chat history

- [History drawer](https://github.com/malves4018/droidmentor/blob/main/app/src/main/kotlin/ui/historyChat/ChatHistoryScreen.kt): `app/src/main/kotlin/ui/historyChat/ChatHistoryScreen.kt`
- [History actions](https://github.com/malves4018/droidmentor/blob/main/app/src/main/kotlin/ui/historyChat/ChatHistoryAction.kt): `app/src/main/kotlin/ui/historyChat/ChatHistoryAction.kt`
- [Conversation list](https://github.com/malves4018/droidmentor/blob/main/app/src/main/kotlin/ui/historyChat/components/ConversationList.kt): `app/src/main/kotlin/ui/historyChat/components/ConversationList.kt`
- [Conversation row](https://github.com/malves4018/droidmentor/blob/main/app/src/main/kotlin/ui/historyChat/components/ConversationItem.kt): `app/src/main/kotlin/ui/historyChat/components/ConversationItem.kt`

### Documented services

- **Gemini REST**
- [Room storage](https://github.com/malves4018/droidmentor/tree/main/app/src/main/kotlin/data): `app/src/main/kotlin/data`
- [API key storage](https://github.com/malves4018/droidmentor/tree/main/app/src/main/kotlin/platform): `app/src/main/kotlin/platform`

### Other components

- **User**

## Connections

- User → Main activity: opens app
- Main activity → Mentor screen: shows (evidence: `app/src/main/kotlin/MainActivity.kt`)
- Mentor screen → Shared UI: uses (evidence: `app/src/main/kotlin/ui/title/TitleScreen.kt`)
- History drawer → Conversation list: renders (evidence: `app/src/main/kotlin/ui/historyChat/ChatHistoryScreen.kt`)
- Conversation list → Conversation row: renders (evidence: `app/src/main/kotlin/ui/historyChat/components/ConversationList.kt`)
- History drawer → History actions: emits (evidence: `app/src/main/kotlin/ui/historyChat/ChatHistoryScreen.kt`)
- Conversation list → History actions: emits (evidence: `app/src/main/kotlin/ui/historyChat/components/ConversationList.kt`)
- Conversation row → History actions: requests delete (evidence: `app/src/main/kotlin/ui/historyChat/components/ConversationItem.kt`)
- Mentor screen → Gemini REST: sends prompts (evidence: `README.md`)
- History drawer → Room storage: loads conversations (evidence: `README.md`)
- History drawer → Room storage: persists changes (evidence: `README.md`)
- API key storage → Gemini REST: provides API key (evidence: `README.md`)
