# techapon/flexiback architecture

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

- Interactive diagram: https://gitdiagram.com/techapon/flexiback
- Repository: https://github.com/techapon/flexiback

## Overview

Flexiback is a Flutter application with native desktop/mobile launch scaffolding and feature areas for authentication, device/Bluetooth use, therapy sessions, trends, profiles, and user relations. The README is only the Flutter starter template, and no Dart feature source was excerpted, so the app’s detailed user-to-result flow and links between feature areas cannot be verified. The graph preserves the visible feature boundaries and shows only native relationships supported by the excerpts or source index.

Main entry points: [`windows/runner/main.cpp`](https://github.com/techapon/flexiback/blob/main/windows/runner/main.cpp) (Windows launcher), [`windows/runner/flutter_window.h`](https://github.com/techapon/flexiback/blob/main/windows/runner/flutter_window.h) (Flutter window host), [`linux/runner/main.cc`](https://github.com/techapon/flexiback/blob/main/linux/runner/main.cc) (Linux launcher), [`ios/Runner/AppDelegate.swift`](https://github.com/techapon/flexiback/blob/main/ios/Runner/AppDelegate.swift) (iOS app delegate)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Flutter application"]
  node_entry["Dart entry point<br/>[main.dart]"]
  node_routing["Route configuration<br/>[routes.dart]"]
end

subgraph group_care["Care features"]
  node_auth["Authentication"]
  node_device["Device and Bluetooth"]
  node_therapy["Therapy sessions"]
end

subgraph group_insights["Insights and relationships"]
  node_profile["Profile management"]
  node_trend["Progress trends"]
  node_relation["User relations and chat"]
end

subgraph group_native["Native runtime and Bluetooth"]
  node_windows_start["Windows launcher<br/>[main.cpp]"]
  node_flutter_window["Flutter window host<br/>[flutter_window.h]"]
  node_win32_window["Win32 window<br/>[win32_window.h]"]
  node_linux_start["Linux launcher<br/>[main.cc]"]
  node_linux_app["GTK application<br/>[my_application.h]"]
  node_linux_plugins["Linux plugin registration"]
  node_windows_plugins["Windows plugin registration"]
  node_macos_plugins["macOS plugin registration"]
  node_ios_start["iOS app delegate<br/>[AppDelegate.swift]"]
  node_bt_plugin["Bluetooth serial plugin"]
  node_bt_connection["Bluetooth connection"]
end

node_user(("App user"))

node_user -->|"launches"| node_windows_start
node_windows_start -->|"creates"| node_flutter_window
node_flutter_window -->|"extends"| node_win32_window
node_linux_start -->|"creates"| node_linux_app
node_bt_plugin -->|"uses"| node_bt_connection
node_ios_start -.->|"registers plugins"| node_macos_plugins

click node_entry "https://github.com/techapon/flexiback/blob/main/lib/main.dart"
click node_routing "https://github.com/techapon/flexiback/blob/main/lib/config/router/routes.dart"
click node_auth "https://github.com/techapon/flexiback/tree/main/lib/features/auth"
click node_device "https://github.com/techapon/flexiback/tree/main/lib/features/device"
click node_therapy "https://github.com/techapon/flexiback/tree/main/lib/features/therapy"
click node_profile "https://github.com/techapon/flexiback/tree/main/lib/features/profile"
click node_trend "https://github.com/techapon/flexiback/tree/main/lib/features/trend"
click node_relation "https://github.com/techapon/flexiback/tree/main/lib/features/relation"
click node_windows_start "https://github.com/techapon/flexiback/blob/main/windows/runner/main.cpp"
click node_flutter_window "https://github.com/techapon/flexiback/blob/main/windows/runner/flutter_window.h"
click node_win32_window "https://github.com/techapon/flexiback/blob/main/windows/runner/win32_window.h"
click node_linux_start "https://github.com/techapon/flexiback/blob/main/linux/runner/main.cc"
click node_linux_app "https://github.com/techapon/flexiback/blob/main/linux/runner/my_application.h"
click node_linux_plugins "https://github.com/techapon/flexiback/blob/main/linux/flutter/generated_plugin_registrant.cc"
click node_windows_plugins "https://github.com/techapon/flexiback/blob/main/windows/flutter/generated_plugin_registrant.cc"
click node_macos_plugins "https://github.com/techapon/flexiback/blob/main/macos/Flutter/GeneratedPluginRegistrant.swift"
click node_ios_start "https://github.com/techapon/flexiback/blob/main/ios/Runner/AppDelegate.swift"
click node_bt_plugin "https://github.com/techapon/flexiback/blob/main/packages/flutter_bluetooth_serial/android/src/main/java/io/github/edufolly/flutterbluetoothserial/FlutterBluetoothSerialPlugin.java"
click node_bt_connection "https://github.com/techapon/flexiback/blob/main/packages/flutter_bluetooth_serial/android/src/main/java/io/github/edufolly/flutterbluetoothserial/BluetoothConnection.java"

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_routing,node_user toneBlue
class node_auth,node_device,node_therapy toneAmber
class node_profile,node_trend,node_relation toneMint
class node_windows_start,node_flutter_window,node_win32_window,node_linux_start,node_linux_app,node_linux_plugins,node_windows_plugins,node_macos_plugins,node_ios_start,node_bt_plugin,node_bt_connection toneRose
```

## Components

### Flutter application

- [Dart entry point](https://github.com/techapon/flexiback/blob/main/lib/main.dart): `lib/main.dart`
- [Route configuration](https://github.com/techapon/flexiback/blob/main/lib/config/router/routes.dart): `lib/config/router/routes.dart`

### Care features

- [Authentication](https://github.com/techapon/flexiback/tree/main/lib/features/auth): `lib/features/auth`
- [Device and Bluetooth](https://github.com/techapon/flexiback/tree/main/lib/features/device): `lib/features/device`
- [Therapy sessions](https://github.com/techapon/flexiback/tree/main/lib/features/therapy): `lib/features/therapy`

### Insights and relationships

- [Profile management](https://github.com/techapon/flexiback/tree/main/lib/features/profile): `lib/features/profile`
- [Progress trends](https://github.com/techapon/flexiback/tree/main/lib/features/trend): `lib/features/trend`
- [User relations and chat](https://github.com/techapon/flexiback/tree/main/lib/features/relation): `lib/features/relation`

### Native runtime and Bluetooth

- [Windows launcher](https://github.com/techapon/flexiback/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Flutter window host](https://github.com/techapon/flexiback/blob/main/windows/runner/flutter_window.h): `windows/runner/flutter_window.h`
- [Win32 window](https://github.com/techapon/flexiback/blob/main/windows/runner/win32_window.h): `windows/runner/win32_window.h`
- [Linux launcher](https://github.com/techapon/flexiback/blob/main/linux/runner/main.cc): `linux/runner/main.cc`
- [GTK application](https://github.com/techapon/flexiback/blob/main/linux/runner/my_application.h): `linux/runner/my_application.h`
- [Linux plugin registration](https://github.com/techapon/flexiback/blob/main/linux/flutter/generated_plugin_registrant.cc): `linux/flutter/generated_plugin_registrant.cc`
- [Windows plugin registration](https://github.com/techapon/flexiback/blob/main/windows/flutter/generated_plugin_registrant.cc): `windows/flutter/generated_plugin_registrant.cc`
- [macOS plugin registration](https://github.com/techapon/flexiback/blob/main/macos/Flutter/GeneratedPluginRegistrant.swift): `macos/Flutter/GeneratedPluginRegistrant.swift`
- [iOS app delegate](https://github.com/techapon/flexiback/blob/main/ios/Runner/AppDelegate.swift): `ios/Runner/AppDelegate.swift`
- [Bluetooth serial plugin](https://github.com/techapon/flexiback/blob/main/packages/flutter_bluetooth_serial/android/src/main/java/io/github/edufolly/flutterbluetoothserial/FlutterBluetoothSerialPlugin.java): `packages/flutter_bluetooth_serial/android/src/main/java/io/github/edufolly/flutterbluetoothserial/FlutterBluetoothSerialPlugin.java`
- [Bluetooth connection](https://github.com/techapon/flexiback/blob/main/packages/flutter_bluetooth_serial/android/src/main/java/io/github/edufolly/flutterbluetoothserial/BluetoothConnection.java): `packages/flutter_bluetooth_serial/android/src/main/java/io/github/edufolly/flutterbluetoothserial/BluetoothConnection.java`

### Other components

- **App user**

## Connections

- App user → Windows launcher: launches (evidence: `windows/runner/main.cpp`)
- Windows launcher → Flutter window host: creates (evidence: `windows/runner/main.cpp`)
- Flutter window host → Win32 window: extends (evidence: `windows/runner/flutter_window.h`)
- Linux launcher → GTK application: creates (evidence: `linux/runner/main.cc`)
- Bluetooth serial plugin → Bluetooth connection: uses (evidence: `packages/flutter_bluetooth_serial/android/src/main/java/io/github/edufolly/flutterbluetoothserial/FlutterBluetoothSerialPlugin.java`)
- iOS app delegate → macOS plugin registration: registers plugins (evidence: `ios/Runner/AppDelegate.swift`)
