# dob-dd/smart_drop_box architecture

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

- Interactive diagram: https://gitdiagram.com/dob-dd/smart_drop_box
- Repository: https://github.com/dob-dd/smart_drop_box

## Overview

Smart Drop Box is a Flutter app for monitoring a parcel box and remotely controlling its lock. The user workflow is to open the dashboard, inspect lock and sensor readings, request a lock change, and review delivery events; View All opens the full activity list. The README identifies a mock service as the hardware boundary and describes replacing it with BLE or TCP/WebSocket integration. Dart implementation excerpts were not provided, so links between screens, models, and service are shown as unverified rather than asserted as observed calls.

Main entry points: [`lib/screens/home_screen.dart`](https://github.com/dob-dd/smart_drop_box/blob/main/lib/screens/home_screen.dart) (Dashboard), [`lib/services/drop_box_service.dart`](https://github.com/dob-dd/smart_drop_box/blob/main/lib/services/drop_box_service.dart) (Drop box service), [`lib/navigation/app_navigator.dart`](https://github.com/dob-dd/smart_drop_box/blob/main/lib/navigation/app_navigator.dart) (App navigator), [`lib/screens/activity_log_screen.dart`](https://github.com/dob-dd/smart_drop_box/blob/main/lib/screens/activity_log_screen.dart) (Activity log)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["App interface"]
  node_dashboard["Dashboard<br/>[home_screen.dart]"]
  node_shell["Main shell<br/>[main_shell.dart]"]
  node_activity["Activity log"]
  node_lock_card["Lock status card"]
  node_sensor_cards["Sensor cards<br/>[sensor_cards.dart]"]
  node_activity_feed["Activity feed<br/>[activity_feed.dart]"]
end

subgraph group_domain["Box domain"]
  node_dropbox_service["Drop box service"]
  node_box_state["Box state"]
  node_activity_entry["Activity entry"]
end

subgraph group_navigation["Navigation"]
  node_navigator["App navigator<br/>[app_navigator.dart]"]
  node_screen_registry["Screen registry"]
  node_screens["Screen definitions<br/>[app_screens.dart]"]
  node_route_transition["Slide transition"]
end

node_user(("Box user"))
node_hardware{{"Box controller"}}

node_user -.->|"views status"| node_dashboard
node_user -.->|"requests lock change"| node_dropbox_service
node_dashboard -.->|"controls lock"| node_dropbox_service
node_dropbox_service -.->|"integrates over BLE or TCP"| node_hardware
node_dashboard -.->|"shows lock status"| node_lock_card
node_dashboard -.->|"shows sensor readings"| node_sensor_cards
node_dashboard -.->|"shows recent events"| node_activity_feed
node_user -.->|"opens full log"| node_activity
node_activity -.->|"displays events"| node_activity_entry
node_dashboard -.->|"displays box state"| node_box_state
node_shell -.->|"hosts screen"| node_dashboard
node_navigator -.->|"routes to screens"| node_screens
node_screen_registry -.->|"registers screens"| node_screens
node_navigator -.->|"uses transition"| node_route_transition

click node_dashboard "https://github.com/dob-dd/smart_drop_box/blob/main/lib/screens/home_screen.dart"
click node_shell "https://github.com/dob-dd/smart_drop_box/blob/main/lib/screens/main_shell.dart"
click node_activity "https://github.com/dob-dd/smart_drop_box/blob/main/lib/screens/activity_log_screen.dart"
click node_lock_card "https://github.com/dob-dd/smart_drop_box/blob/main/lib/widgets/lock_status_card.dart"
click node_sensor_cards "https://github.com/dob-dd/smart_drop_box/blob/main/lib/widgets/sensor_cards.dart"
click node_activity_feed "https://github.com/dob-dd/smart_drop_box/blob/main/lib/widgets/activity_feed.dart"
click node_dropbox_service "https://github.com/dob-dd/smart_drop_box/blob/main/lib/services/drop_box_service.dart"
click node_box_state "https://github.com/dob-dd/smart_drop_box/blob/main/lib/models/drop_box_state.dart"
click node_activity_entry "https://github.com/dob-dd/smart_drop_box/blob/main/lib/models/activity_log_entry.dart"
click node_navigator "https://github.com/dob-dd/smart_drop_box/blob/main/lib/navigation/app_navigator.dart"
click node_screen_registry "https://github.com/dob-dd/smart_drop_box/blob/main/lib/navigation/app_screen_registry.dart"
click node_screens "https://github.com/dob-dd/smart_drop_box/blob/main/lib/navigation/app_screens.dart"
click node_route_transition "https://github.com/dob-dd/smart_drop_box/blob/main/lib/navigation/slide_page_route.dart"

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_dashboard,node_shell,node_activity,node_lock_card,node_sensor_cards,node_activity_feed,node_user toneBlue
class node_dropbox_service,node_box_state,node_activity_entry toneAmber
class node_navigator,node_screen_registry,node_screens,node_route_transition toneMint
class node_hardware toneIndigo
```

## Components

### App interface

- [Dashboard](https://github.com/dob-dd/smart_drop_box/blob/main/lib/screens/home_screen.dart): `lib/screens/home_screen.dart`
- [Main shell](https://github.com/dob-dd/smart_drop_box/blob/main/lib/screens/main_shell.dart): `lib/screens/main_shell.dart`
- [Activity log](https://github.com/dob-dd/smart_drop_box/blob/main/lib/screens/activity_log_screen.dart): `lib/screens/activity_log_screen.dart`
- [Lock status card](https://github.com/dob-dd/smart_drop_box/blob/main/lib/widgets/lock_status_card.dart): `lib/widgets/lock_status_card.dart`
- [Sensor cards](https://github.com/dob-dd/smart_drop_box/blob/main/lib/widgets/sensor_cards.dart): `lib/widgets/sensor_cards.dart`
- [Activity feed](https://github.com/dob-dd/smart_drop_box/blob/main/lib/widgets/activity_feed.dart): `lib/widgets/activity_feed.dart`

### Box domain

- [Drop box service](https://github.com/dob-dd/smart_drop_box/blob/main/lib/services/drop_box_service.dart): `lib/services/drop_box_service.dart`
- [Box state](https://github.com/dob-dd/smart_drop_box/blob/main/lib/models/drop_box_state.dart): `lib/models/drop_box_state.dart`
- [Activity entry](https://github.com/dob-dd/smart_drop_box/blob/main/lib/models/activity_log_entry.dart): `lib/models/activity_log_entry.dart`

### Navigation

- [App navigator](https://github.com/dob-dd/smart_drop_box/blob/main/lib/navigation/app_navigator.dart): `lib/navigation/app_navigator.dart`
- [Screen registry](https://github.com/dob-dd/smart_drop_box/blob/main/lib/navigation/app_screen_registry.dart): `lib/navigation/app_screen_registry.dart`
- [Screen definitions](https://github.com/dob-dd/smart_drop_box/blob/main/lib/navigation/app_screens.dart): `lib/navigation/app_screens.dart`
- [Slide transition](https://github.com/dob-dd/smart_drop_box/blob/main/lib/navigation/slide_page_route.dart): `lib/navigation/slide_page_route.dart`

### Other components

- **Box user**
- **Box controller**

## Connections

- Box user → Dashboard: views status
- Box user → Drop box service: requests lock change
- Dashboard → Drop box service: controls lock
- Drop box service → Box controller: integrates over BLE or TCP (evidence: `README.md`)
- Dashboard → Lock status card: shows lock status
- Dashboard → Sensor cards: shows sensor readings
- Dashboard → Activity feed: shows recent events
- Box user → Activity log: opens full log (evidence: `README.md`)
- Activity log → Activity entry: displays events
- Dashboard → Box state: displays box state
- Main shell → Dashboard: hosts screen
- App navigator → Screen definitions: routes to screens
- Screen registry → Screen definitions: registers screens
- App navigator → Slide transition: uses transition
