# kangmeaselectricity-stack/flutter_application architecture

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

- Interactive diagram: https://gitdiagram.com/kangmeaselectricity-stack/flutter_application
- Repository: https://github.com/kangmeaselectricity-stack/flutter_application

## Overview

This repository contains a Flutter power-meter and utility-data application, plus a separate Windows synchronization automation script. The apparent user workflow is to open the app, capture or enter meter readings, review power and battery information, then back up or synchronize data. Screen and service names indicate additional camera/OCR, location, voice, BLE, and cloud-storage capabilities. Dart sources were not excerpted and the README documents no behavior, so app-level relationships below are dashed and unverified; native runner edges are supported by the sampled entrypoints.

Main entry points: [`lib/screens/home_screen.dart`](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/screens/home_screen.dart) (Home screen), [`lib/screens/power_data_screen.dart`](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/screens/power_data_screen.dart) (Power data), [`lib/services/sync_service.dart`](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/sync_service.dart) (Sync service), [`lib/screens/google_lens_screen.dart`](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/screens/google_lens_screen.dart) (Google Lens)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Flutter application"]
  node_app_entry["App entry<br/>[main.dart]"]
  node_home["Home screen<br/>[home_screen.dart]"]
  node_power["Power data"]
  node_battery["Battery analysis"]
  node_backup["Backup sync"]
  node_lens["Google Lens"]
  node_drawer["App navigation<br/>[app_drawer.dart]"]
  node_customer["Customer card<br/>[customer_card.dart]"]
  node_filter["Area filter<br/>[filter_area.dart]"]
end

subgraph group_services["Data and integrations"]
  node_database[("Local database")]
  node_meter_ble["Meter BLE"]
  node_ocr["OCR service<br/>[ocr_service.dart]"]
  node_camera["Camera service"]
  node_location["Location service"]
  node_voice["Voice service<br/>[voice_service.dart]"]
  node_watermark["Watermark service"]
  node_sync["Sync service<br/>[sync_service.dart]"]
  node_drive["Google Drive"]
  node_webdav["WebDAV service"]
  node_vpn["VPN helper"]
end

subgraph group_automation["Desktop automation"]
  node_automation_script["Sync automation"]
  node_automation_log[("Automation log<br/>[auto_input_log.db]")]
end

node_user(("User"))
node_windows_entry["Windows runner<br/>[main.cpp]"]
node_windows_flutter["Flutter window<br/>[flutter_window.h]"]
node_linux_entry["Linux runner<br/>[main.cc]"]
node_linux_app["Linux application<br/>[my_application.h]"]

node_user -.->|"opens app"| node_app_entry
node_app_entry -.->|"shows"| node_home
node_home -.->|"opens"| node_power
node_home -.->|"opens"| node_battery
node_home -.->|"opens"| node_backup
node_home -.->|"opens"| node_lens
node_power -.->|"reads or writes"| node_database
node_power -.->|"reads meter"| node_meter_ble
node_battery -.->|"reads data"| node_database
node_lens -.->|"captures image"| node_camera
node_lens -.->|"extracts text"| node_ocr
node_backup -.->|"starts sync"| node_sync
node_sync -.->|"backs up"| node_drive
node_sync -.->|"syncs remotely"| node_webdav
node_home -.->|"uses location"| node_location
node_home -.->|"uses voice"| node_voice
node_power -.->|"watermarks output"| node_watermark
node_sync -.->|"uses helper"| node_vpn
node_automation_script -.->|"uses log"| node_automation_log
node_windows_entry -->|"creates window"| node_windows_flutter
node_linux_entry -->|"runs application"| node_linux_app

click node_app_entry "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/main.dart"
click node_home "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/screens/home_screen.dart"
click node_power "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/screens/power_data_screen.dart"
click node_battery "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/screens/battery_analysis_screen.dart"
click node_backup "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/screens/backup_sync_screen.dart"
click node_lens "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/screens/google_lens_screen.dart"
click node_drawer "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/widgets/app_drawer.dart"
click node_customer "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/widgets/customer_card.dart"
click node_filter "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/widgets/filter_area.dart"
click node_database "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/database_service.dart"
click node_meter_ble "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/meter_ble_service.dart"
click node_ocr "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/ocr_service.dart"
click node_camera "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/camera_service.dart"
click node_location "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/location_service.dart"
click node_voice "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/voice_service.dart"
click node_watermark "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/watermark_service.dart"
click node_sync "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/sync_service.dart"
click node_drive "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/google_drive_service.dart"
click node_webdav "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/webdav_service.dart"
click node_vpn "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/vpn_helper_service.dart"
click node_automation_script "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/automation/epower_auto_sync.py"
click node_automation_log "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/auto_input_log.db"
click node_windows_entry "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/windows/runner/main.cpp"
click node_windows_flutter "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/windows/runner/flutter_window.h"
click node_linux_entry "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/linux/runner/main.cc"
click node_linux_app "https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/linux/runner/my_application.h"

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_app_entry,node_home,node_power,node_battery,node_backup,node_lens,node_drawer,node_customer,node_filter,node_user toneBlue
class node_database,node_meter_ble,node_ocr,node_camera,node_location,node_voice,node_watermark,node_sync,node_drive,node_webdav,node_vpn toneAmber
class node_automation_script,node_automation_log toneMint
class node_windows_entry,node_windows_flutter,node_linux_entry,node_linux_app toneTeal
```

## Components

### Flutter application

- [App entry](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/main.dart): `lib/main.dart`
- [Home screen](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/screens/home_screen.dart): `lib/screens/home_screen.dart`
- [Power data](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/screens/power_data_screen.dart): `lib/screens/power_data_screen.dart`
- [Battery analysis](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/screens/battery_analysis_screen.dart): `lib/screens/battery_analysis_screen.dart`
- [Backup sync](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/screens/backup_sync_screen.dart): `lib/screens/backup_sync_screen.dart`
- [Google Lens](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/screens/google_lens_screen.dart): `lib/screens/google_lens_screen.dart`
- [App navigation](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/widgets/app_drawer.dart): `lib/widgets/app_drawer.dart`
- [Customer card](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/widgets/customer_card.dart): `lib/widgets/customer_card.dart`
- [Area filter](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/widgets/filter_area.dart): `lib/widgets/filter_area.dart`

### Data and integrations

- [Local database](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/database_service.dart): `lib/database_service.dart`
- [Meter BLE](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/meter_ble_service.dart): `lib/services/meter_ble_service.dart`
- [OCR service](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/ocr_service.dart): `lib/services/ocr_service.dart`
- [Camera service](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/camera_service.dart): `lib/services/camera_service.dart`
- [Location service](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/location_service.dart): `lib/services/location_service.dart`
- [Voice service](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/voice_service.dart): `lib/services/voice_service.dart`
- [Watermark service](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/watermark_service.dart): `lib/services/watermark_service.dart`
- [Sync service](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/sync_service.dart): `lib/services/sync_service.dart`
- [Google Drive](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/google_drive_service.dart): `lib/services/google_drive_service.dart`
- [WebDAV service](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/webdav_service.dart): `lib/services/webdav_service.dart`
- [VPN helper](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/lib/services/vpn_helper_service.dart): `lib/services/vpn_helper_service.dart`

### Desktop automation

- [Sync automation](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/automation/epower_auto_sync.py): `automation/epower_auto_sync.py`
- [Automation log](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/auto_input_log.db): `auto_input_log.db`

### Other components

- **User**
- [Windows runner](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Flutter window](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/windows/runner/flutter_window.h): `windows/runner/flutter_window.h`
- [Linux runner](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/linux/runner/main.cc): `linux/runner/main.cc`
- [Linux application](https://github.com/kangmeaselectricity-stack/flutter_application/blob/main/linux/runner/my_application.h): `linux/runner/my_application.h`

## Connections

- User → App entry: opens app
- App entry → Home screen: shows
- Home screen → Power data: opens
- Home screen → Battery analysis: opens
- Home screen → Backup sync: opens
- Home screen → Google Lens: opens
- Power data → Local database: reads or writes
- Power data → Meter BLE: reads meter
- Battery analysis → Local database: reads data
- Google Lens → Camera service: captures image
- Google Lens → OCR service: extracts text
- Backup sync → Sync service: starts sync
- Sync service → Google Drive: backs up
- Sync service → WebDAV service: syncs remotely
- Home screen → Location service: uses location
- Home screen → Voice service: uses voice
- Power data → Watermark service: watermarks output
- Sync service → VPN helper: uses helper
- Sync automation → Automation log: uses log
- Windows runner → Flutter window: creates window (evidence: `windows/runner/main.cpp`)
- Linux runner → Linux application: runs application (evidence: `linux/runner/main.cc`)
