# soraou/smartdoor architecture

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

- Interactive diagram: https://gitdiagram.com/soraou/smartdoor
- Repository: https://github.com/soraou/smartdoor

## Overview

The tree identifies Smart Door as an Android app with home, camera, history, and user-registration screens, plus a repository, view model, background monitor, boot receiver, and notification helper. These are inferred from filenames; no product README or application-source excerpts were provided. Accordingly, the graph shows the recognizable components but omits relationships that cannot be verified from the available evidence.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app_ui["App interface"]
  node_main_activity["Main activity<br/>[MainActivity.kt]"]
  node_home_screen["Home screen<br/>[HomeFragment.kt]"]
  node_camera_screen["Camera screen<br/>[CameraFragment.kt]"]
  node_history_screen["History screen<br/>[HistoryFragment.kt]"]
  node_registration_screen["User registration"]
end

subgraph group_user_data["User data"]
  node_user_viewmodel["User view model<br/>[UserViewModel.kt]"]
  node_supabase_repository["Supabase repository<br/>[SupabaseRepo.kt]"]
  node_user_model["User model<br/>[User.kt]"]
  node_history_model["History entry<br/>[HistoryEntry.kt]"]
  node_user_adapter["User list adapter<br/>[UserAdapter.kt]"]
  node_history_adapter["History adapter<br/>[HistoryAdapter.kt]"]
end

subgraph group_door_monitoring["Door monitoring"]
  node_door_service["Door monitor service"]
end

subgraph group_platform["Platform support"]
  node_boot_receiver["Boot receiver<br/>[BootReceiver.kt]"]
  node_notification_helper["Notification helper"]
end

node_resident(("App user"))

click node_main_activity "https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/MainActivity.kt"
click node_home_screen "https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/fragments/HomeFragment.kt"
click node_camera_screen "https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/fragments/CameraFragment.kt"
click node_history_screen "https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/fragments/HistoryFragment.kt"
click node_registration_screen "https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/fragments/UserRegistrationFragment.kt"
click node_user_viewmodel "https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/viewmodel/UserViewModel.kt"
click node_supabase_repository "https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/data/repository/SupabaseRepo.kt"
click node_user_model "https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/data/model/User.kt"
click node_history_model "https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/data/model/HistoryEntry.kt"
click node_user_adapter "https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/adapter/UserAdapter.kt"
click node_history_adapter "https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/adapter/HistoryAdapter.kt"
click node_door_service "https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/service/DoorMonitorService.kt"
click node_boot_receiver "https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/receiver/BootReceiver.kt"
click node_notification_helper "https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/utils/NotificationHelper.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_main_activity,node_home_screen,node_camera_screen,node_history_screen,node_registration_screen,node_resident toneBlue
class node_user_viewmodel,node_supabase_repository,node_user_model,node_history_model,node_user_adapter,node_history_adapter toneAmber
class node_door_service toneMint
class node_boot_receiver,node_notification_helper toneRose
```

## Components

### App interface

- [Main activity](https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/MainActivity.kt): `app/src/main/java/com/example/smartdoor/MainActivity.kt`
- [Home screen](https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/fragments/HomeFragment.kt): `app/src/main/java/com/example/smartdoor/fragments/HomeFragment.kt`
- [Camera screen](https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/fragments/CameraFragment.kt): `app/src/main/java/com/example/smartdoor/fragments/CameraFragment.kt`
- [History screen](https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/fragments/HistoryFragment.kt): `app/src/main/java/com/example/smartdoor/fragments/HistoryFragment.kt`
- [User registration](https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/fragments/UserRegistrationFragment.kt): `app/src/main/java/com/example/smartdoor/fragments/UserRegistrationFragment.kt`

### User data

- [User view model](https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/viewmodel/UserViewModel.kt): `app/src/main/java/com/example/smartdoor/viewmodel/UserViewModel.kt`
- [Supabase repository](https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/data/repository/SupabaseRepo.kt): `app/src/main/java/com/example/smartdoor/data/repository/SupabaseRepo.kt`
- [User model](https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/data/model/User.kt): `app/src/main/java/com/example/smartdoor/data/model/User.kt`
- [History entry](https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/data/model/HistoryEntry.kt): `app/src/main/java/com/example/smartdoor/data/model/HistoryEntry.kt`
- [User list adapter](https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/adapter/UserAdapter.kt): `app/src/main/java/com/example/smartdoor/adapter/UserAdapter.kt`
- [History adapter](https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/adapter/HistoryAdapter.kt): `app/src/main/java/com/example/smartdoor/adapter/HistoryAdapter.kt`

### Door monitoring

- [Door monitor service](https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/service/DoorMonitorService.kt): `app/src/main/java/com/example/smartdoor/service/DoorMonitorService.kt`

### Platform support

- [Boot receiver](https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/receiver/BootReceiver.kt): `app/src/main/java/com/example/smartdoor/receiver/BootReceiver.kt`
- [Notification helper](https://github.com/soraou/smartdoor/blob/master/app/src/main/java/com/example/smartdoor/utils/NotificationHelper.kt): `app/src/main/java/com/example/smartdoor/utils/NotificationHelper.kt`

### Other components

- **App user**
