# leteinta/repondeur architecture

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

- Interactive diagram: https://gitdiagram.com/leteinta/repondeur
- Repository: https://github.com/leteinta/repondeur

## Overview

1. **Project shape**
   - This is a single-module Android app named **`repondeur`**, built with **Gradle Kotlin DSL** and implemented in **Java**.
   - There is no backend, API layer, or multi-module split visible in the repository; the architecture is centered entirely on the Android client.

2. **Top-level UI architecture**
   - The app follows a classic **single-activity / multi-fragment** structure.
   - **`MainActivity`** is the shell that hosts a **tabbed interface**.
   - **`ViewPagerAdapter`** is the glue that supplies the three main sections to the pager/tab UI.

3. **Primary feature boundaries**
   - The product is divided into three user-facing subsystems matching the tabs in the README:
     - **Contacts**
     - **Auto-reply messages**
     - **Spam / response delivery**
   - Each subsystem is isolated in its own fragment:
     - **`ContactsFragment`**
     - **`MessagesFragment`**
     - **`SpamFragment`**

4. **Contacts subsystem**
   - The contacts tab is meant to display phone contacts and phone numbers, with per-contact selection via checkbox/tickbox.
   - This part sits at the boundary with Android’s **contacts data / permissions model**.
   - In the visible tree, this logic is encapsulated in `ContactsFragment`; no separate repository, database, or domain layer is exposed.

5. **Message template subsystem**
   - The messages tab manages a list of auto-reply texts and allows the user to add custom replies.
   - The README specifies that added replies must survive app closure, so this subsystem is responsible for **persistence of user-defined templates**.
   - The tree does not show a dedicated storage component, so persistence is likely handled inside the fragment or via lightweight Android storage APIs.

6. **Spam / automation subsystem**
   - The last tab is the control point for applying the selected spam/auto-reply behavior to selected contacts.
   - The README indicates two mutually exclusive modes per message: **spam** or **automatic reply**.
   - That exclusivity is an important business-rule boundary that should be enforced in the UI/state logic of `SpamFragment` and `MessagesFragment`.

7. **Background behavior boundary**
   - The README requires automatic SMS responses even after the app is closed, which implies a **background execution boundary**.
   - In a typical Android design, this would be handled by a **Service** or similar long-lived component.
   - However, no Service class appears in the visible file tree, so the current repository snapshot does not expose the background-processing implementation directly.

8. **Android framework integration**
   - The app is an Android UI application, so the main integration points are:
     - `AndroidManifest.xml` for app registration and component declarations
     - runtime permissions for contacts/SMS access
     - fragment lifecycle management through the activity
   - The architecture is therefore constrained by Android component lifecycles rather than by a custom server/client protocol.

9. **Resources and presentation layer**
   - UI structure is defined with XML layouts:
     - `activity_main.xml`
     - `fragment_contacts.xml`
     - `fragment_messages.xml`
     - `fragment_spam.xml`
   - App-wide look and feel is controlled through `themes.xml`, `colors.xml`, and launcher drawable resources.
   - This separation means the visual tree is mostly declarative, with behavior living in the Java fragments/activity.

10. **Persistence and state**
   - The README implies the app needs to retain:
     - custom reply text
     - selected spam/reply mode
     - selected contacts
   - The visible repository does not show a database layer, ViewModel layer, or repository pattern, so state management appears to be handled in a relatively direct Android style rather than a layered architecture.

11. **Testing boundary**
   - There are both:
     - **instrumented Android tests** under `androidTest`
     - **local JVM unit tests** under `test`
   - This suggests the app is set up for standard Android testing, but the test surface in the tree is still minimal and generic.

12. **What an architecture diagram should emphasize**
   - The central diagram should show:
     - **MainActivity** as the host
     - a **pager/tab adapter** feeding three fragments
     - the three feature fragments as the main functional blocks
     - a boundary to **Android contacts/SMS/permission services**
     - a separate **background execution path** for automatic replies, even though the implementation is not visible here
   - There is no visible external service or network dependency; the app is primarily an on-device Android workflow.

Main entry points: [`app/src/main/java/com/example/repondeur/MainActivity.java`](https://github.com/leteinta/repondeur/blob/master/app/src/main/java/com/example/repondeur/MainActivity.java) (MainActivity), [`app/src/main/java/com/example/repondeur/MessagesFragment.java`](https://github.com/leteinta/repondeur/blob/master/app/src/main/java/com/example/repondeur/MessagesFragment.java) (Messages), [`app/src/main/java/com/example/repondeur/SpamFragment.java`](https://github.com/leteinta/repondeur/blob/master/app/src/main/java/com/example/repondeur/SpamFragment.java) (Spam), [`app/src/main/java/com/example/repondeur/ViewPagerAdapter.java`](https://github.com/leteinta/repondeur/blob/master/app/src/main/java/com/example/repondeur/ViewPagerAdapter.java) (PagerAdapter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_app["Android app"]
  node_node_main_activity["MainActivity<br/>activity shell<br/>[MainActivity.java]"]
  node_node_pager_adapter["PagerAdapter<br/>tab adapter"]
  node_node_contacts_fragment["Contacts<br/>fragment"]
  node_node_messages_fragment["Messages<br/>fragment"]
  node_node_spam_fragment["Spam<br/>fragment<br/>[SpamFragment.java]"]
end

subgraph group_group_platform["Android platform"]
  node_node_manifest["Manifest"]
  node_node_contacts_api(("Contacts API<br/>android contacts/permissions"))
  node_node_sms_api(("SMS API<br/>android sms/permissions"))
  node_node_storage[("Local storage<br/>app persistence")]
  node_node_background{{"Background reply<br/>background execution"}}
end

subgraph group_group_resources["Resources"]
  node_node_activity_layout["Main layout<br/>xml layout<br/>[activity_main.xml]"]
  node_node_contacts_layout["Contacts UI<br/>xml layout"]
  node_node_messages_layout["Messages UI<br/>xml layout"]
  node_node_spam_layout["Spam UI<br/>xml layout<br/>[fragment_spam.xml]"]
  node_node_theme["Theme<br/>[themes.xml]"]
  node_node_strings["Strings<br/>resources<br/>[strings.xml]"]
end

subgraph group_group_build["Build"]
  node_node_build["Gradle build<br/>build config<br/>[build.gradle.kts]"]
end

node_node_manifest -->|"declares"| node_node_main_activity
node_node_main_activity -->|"uses"| node_node_pager_adapter
node_node_pager_adapter -->|"supplies"| node_node_contacts_fragment
node_node_pager_adapter -->|"supplies"| node_node_messages_fragment
node_node_pager_adapter -->|"supplies"| node_node_spam_fragment
node_node_main_activity -->|"inflates"| node_node_activity_layout
node_node_contacts_fragment -->|"inflates"| node_node_contacts_layout
node_node_messages_fragment -->|"inflates"| node_node_messages_layout
node_node_spam_fragment -->|"inflates"| node_node_spam_layout
node_node_main_activity -->|"hosts"| node_node_contacts_fragment
node_node_main_activity -->|"hosts"| node_node_messages_fragment
node_node_main_activity -->|"hosts"| node_node_spam_fragment
node_node_contacts_fragment -->|"reads"| node_node_contacts_api
node_node_messages_fragment -->|"persists"| node_node_storage
node_node_messages_fragment -.->|"enables"| node_node_background
node_node_spam_fragment -->|"triggers"| node_node_sms_api
node_node_spam_fragment -->|"coordinates"| node_node_messages_fragment
node_node_theme -->|"styles"| node_node_activity_layout
node_node_strings -->|"labels"| node_node_main_activity
node_node_build -->|"configures"| node_node_manifest

click node_node_manifest "https://github.com/leteinta/repondeur/blob/master/app/src/main/AndroidManifest.xml"
click node_node_main_activity "https://github.com/leteinta/repondeur/blob/master/app/src/main/java/com/example/repondeur/MainActivity.java"
click node_node_pager_adapter "https://github.com/leteinta/repondeur/blob/master/app/src/main/java/com/example/repondeur/ViewPagerAdapter.java"
click node_node_contacts_fragment "https://github.com/leteinta/repondeur/blob/master/app/src/main/java/com/example/repondeur/ContactsFragment.java"
click node_node_messages_fragment "https://github.com/leteinta/repondeur/blob/master/app/src/main/java/com/example/repondeur/MessagesFragment.java"
click node_node_spam_fragment "https://github.com/leteinta/repondeur/blob/master/app/src/main/java/com/example/repondeur/SpamFragment.java"
click node_node_activity_layout "https://github.com/leteinta/repondeur/blob/master/app/src/main/res/layout/activity_main.xml"
click node_node_contacts_layout "https://github.com/leteinta/repondeur/blob/master/app/src/main/res/layout/fragment_contacts.xml"
click node_node_messages_layout "https://github.com/leteinta/repondeur/blob/master/app/src/main/res/layout/fragment_messages.xml"
click node_node_spam_layout "https://github.com/leteinta/repondeur/blob/master/app/src/main/res/layout/fragment_spam.xml"
click node_node_theme "https://github.com/leteinta/repondeur/blob/master/app/src/main/res/values/themes.xml"
click node_node_strings "https://github.com/leteinta/repondeur/blob/master/app/src/main/res/values/strings.xml"
click node_node_build "https://github.com/leteinta/repondeur/blob/master/app/build.gradle.kts"

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_node_main_activity,node_node_pager_adapter,node_node_contacts_fragment,node_node_messages_fragment,node_node_spam_fragment toneBlue
class node_node_manifest,node_node_contacts_api,node_node_sms_api,node_node_storage,node_node_background toneAmber
class node_node_activity_layout,node_node_contacts_layout,node_node_messages_layout,node_node_spam_layout,node_node_theme,node_node_strings toneMint
class node_node_build toneRose
```

## Components

### Android app

Core client code and feature fragments

- [MainActivity](https://github.com/leteinta/repondeur/blob/master/app/src/main/java/com/example/repondeur/MainActivity.java): activity shell · Single activity hosting the tabbed UI · `app/src/main/java/com/example/repondeur/MainActivity.java`
- [PagerAdapter](https://github.com/leteinta/repondeur/blob/master/app/src/main/java/com/example/repondeur/ViewPagerAdapter.java): tab adapter · Supplies the main sections to the pager and tabs · `app/src/main/java/com/example/repondeur/ViewPagerAdapter.java`
- [Contacts](https://github.com/leteinta/repondeur/blob/master/app/src/main/java/com/example/repondeur/ContactsFragment.java): fragment · Shows contacts and selection state · `app/src/main/java/com/example/repondeur/ContactsFragment.java`
- [Messages](https://github.com/leteinta/repondeur/blob/master/app/src/main/java/com/example/repondeur/MessagesFragment.java): fragment · Manages auto-reply templates and persistence · `app/src/main/java/com/example/repondeur/MessagesFragment.java`
- [Spam](https://github.com/leteinta/repondeur/blob/master/app/src/main/java/com/example/repondeur/SpamFragment.java): fragment · Controls delivery mode and applies actions to contacts · `app/src/main/java/com/example/repondeur/SpamFragment.java`

### Android platform

Manifest, permissions, contacts, SMS, and lifecycle boundaries

- [Manifest](https://github.com/leteinta/repondeur/blob/master/app/src/main/AndroidManifest.xml): android manifest · Declares app components and Android integration points · `app/src/main/AndroidManifest.xml`
- **Contacts API**: android contacts/permissions · System contacts access and runtime permission boundary
- **SMS API**: android sms/permissions · System SMS access and runtime permission boundary
- **Local storage**: app persistence · Retains user-defined replies and selected state on device
- **Background reply**: background execution · Long-lived automation path for responses after app close

### Resources

Layouts and app presentation assets

- [Main layout](https://github.com/leteinta/repondeur/blob/master/app/src/main/res/layout/activity_main.xml): xml layout · Hosts the activity shell UI · `app/src/main/res/layout/activity_main.xml`
- [Contacts UI](https://github.com/leteinta/repondeur/blob/master/app/src/main/res/layout/fragment_contacts.xml): xml layout · Layout for the contacts tab · `app/src/main/res/layout/fragment_contacts.xml`
- [Messages UI](https://github.com/leteinta/repondeur/blob/master/app/src/main/res/layout/fragment_messages.xml): xml layout · Layout for the messages tab · `app/src/main/res/layout/fragment_messages.xml`
- [Spam UI](https://github.com/leteinta/repondeur/blob/master/app/src/main/res/layout/fragment_spam.xml): xml layout · Layout for the spam tab · `app/src/main/res/layout/fragment_spam.xml`
- [Theme](https://github.com/leteinta/repondeur/blob/master/app/src/main/res/values/themes.xml): app theme · Colors and theme definitions for the app · `app/src/main/res/values/themes.xml`
- [Strings](https://github.com/leteinta/repondeur/blob/master/app/src/main/res/values/strings.xml): resources · App text and labels · `app/src/main/res/values/strings.xml`

### Build

Gradle and project configuration

- [Gradle build](https://github.com/leteinta/repondeur/blob/master/app/build.gradle.kts): build config · Module build configuration and Android setup · `app/build.gradle.kts`

## Connections

- Manifest → MainActivity: declares · Registers the main UI entry point
- MainActivity → PagerAdapter: uses · Creates the adapter for the tabbed shell
- PagerAdapter → Contacts: supplies · Provides the contacts tab
- PagerAdapter → Messages: supplies · Provides the messages tab
- PagerAdapter → Spam: supplies · Provides the spam tab
- MainActivity → Main layout: inflates · Binds the activity shell to its XML layout
- Contacts → Contacts UI: inflates · Uses the contacts fragment layout
- Messages → Messages UI: inflates · Uses the messages fragment layout
- Spam → Spam UI: inflates · Uses the spam fragment layout
- MainActivity → Contacts: hosts · Single-activity host for the contacts section
- MainActivity → Messages: hosts · Single-activity host for the messages section
- MainActivity → Spam: hosts · Single-activity host for the spam section
- Contacts → Contacts API: reads · Contacts tab boundary with Android contacts and permissions
- Messages → Local storage: persists · Stores custom reply templates and state
- Messages → Background reply: enables · Supports reply behavior that should continue after app close
- Spam → SMS API: triggers · Applies spam or auto-reply actions through SMS access
- Spam → Messages: coordinates · Shares the mutually exclusive spam vs auto-reply mode
- Theme → Main layout: styles · Controls the app shell presentation
- Strings → MainActivity: labels · Supplies app text used by the shell and tabs
- Gradle build → Manifest: configures · Build setup for the Android app module
