# alihadid96/customerregister architecture

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

- Interactive diagram: https://gitdiagram.com/alihadid96/customerregister
- Repository: https://github.com/alihadid96/customerregister

## Overview

CustomerRegister is an offline Android subscription-management app. Users manage customer records, calculate subscription dates and renewals, review expiry status, and receive scheduled reminders; they can also contact customers through WhatsApp and export or back up local data. The graph follows the documented UI-to-data workflow and preserves the reminder, export, backup, and settings capabilities. Several screen and ViewModel implementations were not excerpted, so their links to data operations are shown only where documented; unsampled internal calls are not inferred.

Main entry points: [`app/src/main/java/com/customerregister/app/ui/ViewModels.kt`](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/ui/ViewModels.kt) (View models), [`app/src/main/java/com/customerregister/app/ui/AppRoot.kt`](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/ui/AppRoot.kt) (Navigation root), [`app/src/main/java/com/customerregister/app/notifications/Reminders.kt`](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/notifications/Reminders.kt) (Work scheduling), [`app/src/main/java/com/customerregister/app/CustomerRegisterApp.kt`](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/CustomerRegisterApp.kt) (Application container)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry and navigation"]
  node_activity["Main activity<br/>[MainActivity.kt]"]
  node_navigation["Navigation root<br/>[AppRoot.kt]"]
  node_app_container["Application container"]
end

subgraph group_customer["Customer workflows"]
  node_viewmodels["View models<br/>[ViewModels.kt]"]
  node_customer_screens["Customer screens"]
  node_dashboard["Dashboard screen<br/>[DashboardScreen.kt]"]
  node_notification_screen["Notification history"]
  node_settings_screen["Settings screen<br/>[SettingsScreen.kt]"]
  node_components["Shared UI components<br/>[Components.kt]"]
end

subgraph group_domain["Subscription domain"]
  node_subscription_math["Subscription calculations"]
  node_message_templates["Message templates<br/>[MessageTemplate.kt]"]
  node_exporters["CSV and XLSX export<br/>[Exporters.kt]"]
end

subgraph group_storage["Local data and backup"]
  node_customer_repository["Customer repository"]
  node_database[("Room database<br/>[AppDatabase.kt]")]
  node_settings_repository["Settings repository"]
  node_backup["Backup and restore<br/>[BackupManager.kt]"]
end

subgraph group_reminders["Reminder delivery"]
  node_reminder_planner["Reminder planning<br/>[ReminderPlanner.kt]"]
  node_reminder_scheduler["Work scheduling<br/>[Reminders.kt]"]
  node_notification_helper["Notification delivery"]
end

node_user(("App user"))
node_whatsapp["WhatsApp or browser"]

node_user -->|"opens"| node_activity
node_activity -->|"hosts"| node_navigation
node_navigation -->|"routes to"| node_customer_screens
node_navigation -->|"routes to"| node_dashboard
node_navigation -->|"routes to"| node_notification_screen
node_navigation -->|"routes to"| node_settings_screen
node_customer_screens -->|"uses"| node_viewmodels
node_dashboard -.->|"uses"| node_viewmodels
node_notification_screen -.->|"uses"| node_viewmodels
node_settings_screen -.->|"uses"| node_viewmodels
node_components -.->|"renders in"| node_customer_screens
node_viewmodels -.->|"manages records"| node_customer_repository
node_viewmodels -.->|"reads settings"| node_settings_repository
node_viewmodels -->|"uses"| node_subscription_math
node_viewmodels -.->|"exports data"| node_exporters
node_viewmodels -.->|"backs up data"| node_backup
node_customer_repository -->|"reads and writes"| node_database
node_customer_repository -->|"reschedules jobs"| node_reminder_scheduler
node_backup -->|"reads and restores"| node_database
node_backup -->|"exports settings"| node_settings_repository
node_app_container -->|"creates"| node_database
node_app_container -->|"creates"| node_customer_repository
node_app_container -->|"creates"| node_settings_repository
node_app_container -->|"creates"| node_backup
node_activity -->|"reschedules jobs"| node_reminder_scheduler
node_reminder_scheduler -->|"plans reminders"| node_reminder_planner
node_reminder_planner -->|"calculates days"| node_subscription_math
node_reminder_scheduler -->|"checks and logs"| node_database
node_reminder_scheduler -->|"posts reminders"| node_notification_helper
node_notification_helper -->|"shows alerts"| node_user
node_message_templates -->|"prepares messages"| node_whatsapp
node_notification_helper -->|"offers contact action"| node_whatsapp
node_exporters -->|"provides files"| node_user

click node_activity "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/MainActivity.kt"
click node_navigation "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/ui/AppRoot.kt"
click node_viewmodels "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/ui/ViewModels.kt"
click node_customer_screens "https://github.com/alihadid96/customerregister/tree/main/app/src/main/java/com/customerregister/app/ui/screens"
click node_dashboard "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/ui/screens/DashboardScreen.kt"
click node_notification_screen "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/ui/screens/NotificationsScreen.kt"
click node_settings_screen "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/ui/screens/SettingsScreen.kt"
click node_components "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/ui/components/Components.kt"
click node_subscription_math "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/domain/SubscriptionMath.kt"
click node_message_templates "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/domain/MessageTemplate.kt"
click node_exporters "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/domain/Exporters.kt"
click node_customer_repository "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/data/CustomerRepository.kt"
click node_database "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/data/db/AppDatabase.kt"
click node_settings_repository "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/data/SettingsRepository.kt"
click node_backup "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/data/BackupManager.kt"
click node_reminder_planner "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/domain/ReminderPlanner.kt"
click node_reminder_scheduler "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/notifications/Reminders.kt"
click node_notification_helper "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/notifications/NotificationHelper.kt"
click node_app_container "https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/CustomerRegisterApp.kt"

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_activity,node_navigation,node_app_container,node_user,node_whatsapp toneBlue
class node_viewmodels,node_customer_screens,node_dashboard,node_notification_screen,node_settings_screen,node_components toneAmber
class node_subscription_math,node_message_templates,node_exporters toneMint
class node_customer_repository,node_database,node_settings_repository,node_backup toneRose
class node_reminder_planner,node_reminder_scheduler,node_notification_helper toneIndigo
```

## Components

### App entry and navigation

- [Main activity](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/MainActivity.kt): `app/src/main/java/com/customerregister/app/MainActivity.kt`
- [Navigation root](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/ui/AppRoot.kt): `app/src/main/java/com/customerregister/app/ui/AppRoot.kt`
- [Application container](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/CustomerRegisterApp.kt): `app/src/main/java/com/customerregister/app/CustomerRegisterApp.kt`

### Customer workflows

- [View models](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/ui/ViewModels.kt): `app/src/main/java/com/customerregister/app/ui/ViewModels.kt`
- [Customer screens](https://github.com/alihadid96/customerregister/tree/main/app/src/main/java/com/customerregister/app/ui/screens): `app/src/main/java/com/customerregister/app/ui/screens`
- [Dashboard screen](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/ui/screens/DashboardScreen.kt): `app/src/main/java/com/customerregister/app/ui/screens/DashboardScreen.kt`
- [Notification history](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/ui/screens/NotificationsScreen.kt): `app/src/main/java/com/customerregister/app/ui/screens/NotificationsScreen.kt`
- [Settings screen](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/ui/screens/SettingsScreen.kt): `app/src/main/java/com/customerregister/app/ui/screens/SettingsScreen.kt`
- [Shared UI components](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/ui/components/Components.kt): `app/src/main/java/com/customerregister/app/ui/components/Components.kt`

### Subscription domain

- [Subscription calculations](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/domain/SubscriptionMath.kt): `app/src/main/java/com/customerregister/app/domain/SubscriptionMath.kt`
- [Message templates](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/domain/MessageTemplate.kt): `app/src/main/java/com/customerregister/app/domain/MessageTemplate.kt`
- [CSV and XLSX export](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/domain/Exporters.kt): `app/src/main/java/com/customerregister/app/domain/Exporters.kt`

### Local data and backup

- [Customer repository](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/data/CustomerRepository.kt): `app/src/main/java/com/customerregister/app/data/CustomerRepository.kt`
- [Room database](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/data/db/AppDatabase.kt): `app/src/main/java/com/customerregister/app/data/db/AppDatabase.kt`
- [Settings repository](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/data/SettingsRepository.kt): `app/src/main/java/com/customerregister/app/data/SettingsRepository.kt`
- [Backup and restore](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/data/BackupManager.kt): `app/src/main/java/com/customerregister/app/data/BackupManager.kt`

### Reminder delivery

- [Reminder planning](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/domain/ReminderPlanner.kt): `app/src/main/java/com/customerregister/app/domain/ReminderPlanner.kt`
- [Work scheduling](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/notifications/Reminders.kt): `app/src/main/java/com/customerregister/app/notifications/Reminders.kt`
- [Notification delivery](https://github.com/alihadid96/customerregister/blob/main/app/src/main/java/com/customerregister/app/notifications/NotificationHelper.kt): `app/src/main/java/com/customerregister/app/notifications/NotificationHelper.kt`

### Other components

- **App user**
- **WhatsApp or browser**

## Connections

- App user → Main activity: opens (evidence: `README.md`)
- Main activity → Navigation root: hosts (evidence: `app/src/main/java/com/customerregister/app/MainActivity.kt`)
- Navigation root → Customer screens: routes to (evidence: `app/src/main/java/com/customerregister/app/ui/AppRoot.kt`)
- Navigation root → Dashboard screen: routes to (evidence: `app/src/main/java/com/customerregister/app/ui/AppRoot.kt`)
- Navigation root → Notification history: routes to (evidence: `app/src/main/java/com/customerregister/app/ui/AppRoot.kt`)
- Navigation root → Settings screen: routes to (evidence: `app/src/main/java/com/customerregister/app/ui/AppRoot.kt`)
- Customer screens → View models: uses (evidence: `app/src/main/java/com/customerregister/app/ui/ViewModels.kt`)
- Dashboard screen → View models: uses
- Notification history → View models: uses
- Settings screen → View models: uses
- Shared UI components → Customer screens: renders in
- View models → Customer repository: manages records
- View models → Settings repository: reads settings
- View models → Subscription calculations: uses (evidence: `app/src/main/java/com/customerregister/app/ui/ViewModels.kt`)
- View models → CSV and XLSX export: exports data (evidence: `README.md`)
- View models → Backup and restore: backs up data (evidence: `README.md`)
- Customer repository → Room database: reads and writes (evidence: `app/src/main/java/com/customerregister/app/data/CustomerRepository.kt`)
- Customer repository → Work scheduling: reschedules jobs (evidence: `app/src/main/java/com/customerregister/app/data/CustomerRepository.kt`)
- Backup and restore → Room database: reads and restores (evidence: `app/src/main/java/com/customerregister/app/data/BackupManager.kt`)
- Backup and restore → Settings repository: exports settings (evidence: `app/src/main/java/com/customerregister/app/data/BackupManager.kt`)
- Application container → Room database: creates (evidence: `app/src/main/java/com/customerregister/app/CustomerRegisterApp.kt`)
- Application container → Customer repository: creates (evidence: `app/src/main/java/com/customerregister/app/CustomerRegisterApp.kt`)
- Application container → Settings repository: creates (evidence: `app/src/main/java/com/customerregister/app/CustomerRegisterApp.kt`)
- Application container → Backup and restore: creates (evidence: `app/src/main/java/com/customerregister/app/CustomerRegisterApp.kt`)
- Main activity → Work scheduling: reschedules jobs (evidence: `app/src/main/java/com/customerregister/app/MainActivity.kt`)
- Work scheduling → Reminder planning: plans reminders (evidence: `app/src/main/java/com/customerregister/app/notifications/Reminders.kt`)
- Reminder planning → Subscription calculations: calculates days (evidence: `app/src/main/java/com/customerregister/app/domain/ReminderPlanner.kt`)
- Work scheduling → Room database: checks and logs (evidence: `README.md`)
- Work scheduling → Notification delivery: posts reminders (evidence: `app/src/main/java/com/customerregister/app/notifications/Reminders.kt`)
- Notification delivery → App user: shows alerts (evidence: `app/src/main/java/com/customerregister/app/notifications/NotificationHelper.kt`)
- Message templates → WhatsApp or browser: prepares messages (evidence: `README.md`)
- Notification delivery → WhatsApp or browser: offers contact action (evidence: `README.md`)
- CSV and XLSX export → App user: provides files (evidence: `README.md`)
