# sbezhuk/beebase-mobile architecture

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

- Interactive diagram: https://gitdiagram.com/sbezhuk/beebase-mobile
- Repository: https://github.com/sbezhuk/beebase-mobile

## Overview

BeeBase is a Flutter app for managing beekeeping operations. A beekeeper uses its screens and Cubits to manage apiaries, hives, inspections, and harvests; the app’s domain and data layers support these workflows with repository contracts, API data sources, and local storage. The README also identifies authentication, reminders, subscriptions, and related records as product capabilities. The graph follows the documented Clean Architecture; sampled source did not include Dart runtime wiring, so uncertain calls between individual features and services are not shown.

Main entry points: [`lib/application.dart`](https://github.com/sbezhuk/beebase-mobile/blob/main/lib/application.dart) (App setup), [`lib/domain/repositories`](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/domain/repositories) (Domain contracts), [`lib/presentation`](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/presentation) (Other records), [`lib/presentation/hive`](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/presentation/hive) (Hive management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and UI"]
  node_entry["App entry<br/>[main.dart]"]
  node_application["App setup<br/>[application.dart]"]
  node_apiary_ui["Apiary management"]
  node_hive_ui["Hive management"]
  node_inspection_ui["Inspections"]
  node_harvest_ui["Harvest records"]
  node_home_ui["Dashboard"]
  node_auth_ui["Authentication"]
  node_other_ui["Other records"]
end

subgraph group_domain["Domain"]
  node_contracts["Domain contracts"]
  node_business["Domain rules"]
end

subgraph group_data["Data access"]
  node_repositories["Repositories"]
  node_sources["Data sources"]
end

subgraph group_services["Shared capabilities"]
  node_local[("Local database")]
  node_network["HTTP networking<br/>[dio_client.dart]"]
  node_auth_service["Session and tokens"]
  node_media["Media handling"]
  node_notifications["Notifications"]
  node_location["Location"]
  node_scanner["QR scanning"]
  node_iap["In-app purchases<br/>[iap_service.dart]"]
end

node_beekeeper(("Beekeeper"))
node_remote{{"BeeBase API"}}

node_beekeeper -->|"opens app"| node_entry
node_entry -->|"starts"| node_application
node_application -->|"presents"| node_apiary_ui
node_application -->|"presents"| node_hive_ui
node_application -->|"presents"| node_inspection_ui
node_application -->|"presents"| node_harvest_ui
node_application -->|"presents"| node_home_ui
node_application -->|"presents"| node_auth_ui
node_application -->|"presents"| node_other_ui
node_apiary_ui -->|"uses"| node_contracts
node_hive_ui -->|"uses"| node_contracts
node_inspection_ui -->|"uses"| node_contracts
node_harvest_ui -->|"uses"| node_contracts
node_home_ui -->|"uses"| node_contracts
node_auth_ui -->|"uses"| node_contracts
node_other_ui -->|"uses"| node_contracts
node_contracts -->|"expresses rules"| node_business
node_repositories -->|"implements"| node_contracts
node_repositories -->|"uses"| node_sources
node_sources -->|"sends requests"| node_network
node_network -->|"HTTP requests"| node_remote
node_sources -->|"reads and writes"| node_local
node_auth_service -->|"supports requests"| node_network
node_other_ui -->|"media features"| node_media
node_other_ui -->|"reminder features"| node_notifications
node_hive_ui -->|"scan workflows"| node_scanner
node_other_ui -->|"location features"| node_location
node_other_ui -->|"subscription features"| node_iap

click node_entry "https://github.com/sbezhuk/beebase-mobile/blob/main/lib/main.dart"
click node_application "https://github.com/sbezhuk/beebase-mobile/blob/main/lib/application.dart"
click node_apiary_ui "https://github.com/sbezhuk/beebase-mobile/tree/main/lib/presentation/apiary"
click node_hive_ui "https://github.com/sbezhuk/beebase-mobile/tree/main/lib/presentation/hive"
click node_inspection_ui "https://github.com/sbezhuk/beebase-mobile/tree/main/lib/presentation/inspection"
click node_harvest_ui "https://github.com/sbezhuk/beebase-mobile/tree/main/lib/presentation/harvest"
click node_home_ui "https://github.com/sbezhuk/beebase-mobile/tree/main/lib/presentation/home"
click node_auth_ui "https://github.com/sbezhuk/beebase-mobile/tree/main/lib/presentation/authentication"
click node_other_ui "https://github.com/sbezhuk/beebase-mobile/tree/main/lib/presentation"
click node_contracts "https://github.com/sbezhuk/beebase-mobile/tree/main/lib/domain/repositories"
click node_business "https://github.com/sbezhuk/beebase-mobile/tree/main/lib/domain"
click node_repositories "https://github.com/sbezhuk/beebase-mobile/tree/main/lib/data/repositories"
click node_sources "https://github.com/sbezhuk/beebase-mobile/tree/main/lib/data/data_source"
click node_local "https://github.com/sbezhuk/beebase-mobile/blob/main/lib/core/storage/database/apiary_database.dart"
click node_network "https://github.com/sbezhuk/beebase-mobile/blob/main/lib/core/networking/http/dio_client.dart"
click node_auth_service "https://github.com/sbezhuk/beebase-mobile/blob/main/lib/core/services/session_service.dart"
click node_media "https://github.com/sbezhuk/beebase-mobile/tree/main/lib/core/media"
click node_notifications "https://github.com/sbezhuk/beebase-mobile/tree/main/lib/core/notifications"
click node_location "https://github.com/sbezhuk/beebase-mobile/tree/main/lib/core/location"
click node_scanner "https://github.com/sbezhuk/beebase-mobile/tree/main/lib/core/scanner"
click node_iap "https://github.com/sbezhuk/beebase-mobile/blob/main/lib/core/iap/iap_service.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_entry,node_application,node_apiary_ui,node_hive_ui,node_inspection_ui,node_harvest_ui,node_home_ui,node_auth_ui,node_other_ui toneBlue
class node_contracts,node_business toneAmber
class node_repositories,node_sources,node_remote toneMint
class node_local,node_network,node_auth_service,node_media,node_notifications,node_location,node_scanner,node_iap toneRose
class node_beekeeper toneIndigo
```

## Components

### App and UI

- [App entry](https://github.com/sbezhuk/beebase-mobile/blob/main/lib/main.dart): `lib/main.dart`
- [App setup](https://github.com/sbezhuk/beebase-mobile/blob/main/lib/application.dart): `lib/application.dart`
- [Apiary management](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/presentation/apiary): `lib/presentation/apiary`
- [Hive management](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/presentation/hive): `lib/presentation/hive`
- [Inspections](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/presentation/inspection): `lib/presentation/inspection`
- [Harvest records](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/presentation/harvest): `lib/presentation/harvest`
- [Dashboard](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/presentation/home): `lib/presentation/home`
- [Authentication](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/presentation/authentication): `lib/presentation/authentication`
- [Other records](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/presentation): `lib/presentation`

### Domain

- [Domain contracts](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/domain/repositories): `lib/domain/repositories`
- [Domain rules](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/domain): `lib/domain`

### Data access

- [Repositories](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/data/repositories): `lib/data/repositories`
- [Data sources](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/data/data_source): `lib/data/data_source`

### Shared capabilities

- [Local database](https://github.com/sbezhuk/beebase-mobile/blob/main/lib/core/storage/database/apiary_database.dart): `lib/core/storage/database/apiary_database.dart`
- [HTTP networking](https://github.com/sbezhuk/beebase-mobile/blob/main/lib/core/networking/http/dio_client.dart): `lib/core/networking/http/dio_client.dart`
- [Session and tokens](https://github.com/sbezhuk/beebase-mobile/blob/main/lib/core/services/session_service.dart): `lib/core/services/session_service.dart`
- [Media handling](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/core/media): `lib/core/media`
- [Notifications](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/core/notifications): `lib/core/notifications`
- [Location](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/core/location): `lib/core/location`
- [QR scanning](https://github.com/sbezhuk/beebase-mobile/tree/main/lib/core/scanner): `lib/core/scanner`
- [In-app purchases](https://github.com/sbezhuk/beebase-mobile/blob/main/lib/core/iap/iap_service.dart): `lib/core/iap/iap_service.dart`

### Other components

- **Beekeeper**
- **BeeBase API**

## Connections

- Beekeeper → App entry: opens app
- App entry → App setup: starts
- App setup → Apiary management: presents
- App setup → Hive management: presents
- App setup → Inspections: presents
- App setup → Harvest records: presents
- App setup → Dashboard: presents
- App setup → Authentication: presents
- App setup → Other records: presents
- Apiary management → Domain contracts: uses
- Hive management → Domain contracts: uses
- Inspections → Domain contracts: uses
- Harvest records → Domain contracts: uses
- Dashboard → Domain contracts: uses
- Authentication → Domain contracts: uses
- Other records → Domain contracts: uses
- Domain contracts → Domain rules: expresses rules
- Repositories → Domain contracts: implements
- Repositories → Data sources: uses
- Data sources → HTTP networking: sends requests
- HTTP networking → BeeBase API: HTTP requests
- Data sources → Local database: reads and writes
- Session and tokens → HTTP networking: supports requests
- Other records → Media handling: media features
- Other records → Notifications: reminder features
- Hive management → QR scanning: scan workflows
- Other records → Location: location features
- Other records → In-app purchases: subscription features
