# madhav008/sms_gateway_flutter architecture

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

- Interactive diagram: https://gitdiagram.com/madhav008/sms_gateway_flutter
- Repository: https://github.com/madhav008/sms_gateway_flutter

## Overview

This is a Flutter SMS gateway with a documented REST surface for listing, sending, and deleting SMS records. Its principal user-to-result workflow is an HTTP client requesting an SMS operation and receiving a response from the API; the repository also contains Flutter app and platform-host code. The README documents the endpoint behavior, but the Dart implementation excerpts were not provided, so internal calls between UI, controller, task handler, and API modules cannot be verified. Platform nodes reflect sampled or indexed host files, not SMS business logic.

Main entry points: [`lib/Api/routes.dart`](https://github.com/madhav008/sms_gateway_flutter/blob/master/lib/Api/routes.dart) (SMS endpoints), [`windows/runner/flutter_window.cpp`](https://github.com/madhav008/sms_gateway_flutter/blob/master/windows/runner/flutter_window.cpp) (Flutter window), [`lib/main.dart`](https://github.com/madhav008/sms_gateway_flutter/blob/master/lib/main.dart) (App entry), [`windows/runner/main.cpp`](https://github.com/madhav008/sms_gateway_flutter/blob/master/windows/runner/main.cpp) (Windows entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["SMS API"]
  node_sms_api["SMS endpoints<br/>[routes.dart]"]
  node_api_server["API server<br/>[server.dart]"]
  node_sms_records[("SMS records")]
end

subgraph group_app["Flutter app"]
  node_app_entry["App entry<br/>[main.dart]"]
  node_sms_ui["SMS UI<br/>[section.dart]"]
  node_sms_controller["SMS controller"]
  node_task_handler["Task handler<br/>[TaskHandler.dart]"]
end

subgraph group_android["Android host"]
  node_android_entry["Android host<br/>[MainActivity.kt]"]
end

subgraph group_desktop["Desktop hosts"]
  node_ios_entry["iOS host<br/>[AppDelegate.swift]"]
  node_linux_entry["Linux entry<br/>[main.cc]"]
  node_linux_app["Linux app host<br/>[my_application.cc]"]
  node_linux_plugin_api["Linux plugin API"]
  node_macos_plugins["macOS plugins"]
  node_windows_entry["Windows entry<br/>[main.cpp]"]
  node_windows_flutter["Flutter window<br/>[flutter_window.cpp]"]
  node_windows_window["Win32 window<br/>[win32_window.cpp]"]
  node_windows_window_header["Window interface<br/>[win32_window.h]"]
  node_windows_flutter_header["Flutter interface<br/>[flutter_window.h]"]
  node_windows_plugin_api["Windows plugin API"]
end

node_client(("HTTP client"))

node_client -->|"requests SMS"| node_sms_api
node_sms_api -.->|"served by"| node_api_server
node_sms_api -->|"reads, writes, deletes"| node_sms_records
node_sms_api -->|"returns response"| node_client
node_app_entry -.->|"launches"| node_sms_ui
node_sms_ui -.->|"delegates to"| node_sms_controller
node_sms_controller -.->|"delegates to"| node_task_handler
node_android_entry -.->|"hosts"| node_app_entry
node_ios_entry -.->|"hosts"| node_app_entry
node_linux_entry -->|"starts"| node_linux_app
node_linux_app -->|"registers plugins"| node_linux_plugin_api
node_macos_plugins -.->|"registers plugins"| node_app_entry
node_windows_entry -->|"creates"| node_windows_flutter
node_windows_flutter -->|"extends"| node_windows_window_header
node_windows_flutter -->|"uses window"| node_windows_window
node_windows_entry -->|"creates"| node_windows_flutter_header
node_windows_plugin_api -.->|"plugin registration interface"| node_windows_flutter

click node_sms_api "https://github.com/madhav008/sms_gateway_flutter/blob/master/lib/Api/routes.dart"
click node_api_server "https://github.com/madhav008/sms_gateway_flutter/blob/master/lib/Api/server.dart"
click node_app_entry "https://github.com/madhav008/sms_gateway_flutter/blob/master/lib/main.dart"
click node_sms_ui "https://github.com/madhav008/sms_gateway_flutter/blob/master/lib/section.dart"
click node_sms_controller "https://github.com/madhav008/sms_gateway_flutter/blob/master/lib/controller/sms_controller.dart"
click node_task_handler "https://github.com/madhav008/sms_gateway_flutter/blob/master/lib/TaskHandler.dart"
click node_android_entry "https://github.com/madhav008/sms_gateway_flutter/blob/master/android/app/src/main/kotlin/com/example/my_sms/MainActivity.kt"
click node_ios_entry "https://github.com/madhav008/sms_gateway_flutter/blob/master/ios/Runner/AppDelegate.swift"
click node_linux_entry "https://github.com/madhav008/sms_gateway_flutter/blob/master/linux/runner/main.cc"
click node_linux_app "https://github.com/madhav008/sms_gateway_flutter/blob/master/linux/runner/my_application.cc"
click node_linux_plugin_api "https://github.com/madhav008/sms_gateway_flutter/blob/master/linux/flutter/generated_plugin_registrant.h"
click node_macos_plugins "https://github.com/madhav008/sms_gateway_flutter/blob/master/macos/Flutter/GeneratedPluginRegistrant.swift"
click node_windows_entry "https://github.com/madhav008/sms_gateway_flutter/blob/master/windows/runner/main.cpp"
click node_windows_flutter "https://github.com/madhav008/sms_gateway_flutter/blob/master/windows/runner/flutter_window.cpp"
click node_windows_window "https://github.com/madhav008/sms_gateway_flutter/blob/master/windows/runner/win32_window.cpp"
click node_windows_window_header "https://github.com/madhav008/sms_gateway_flutter/blob/master/windows/runner/win32_window.h"
click node_windows_flutter_header "https://github.com/madhav008/sms_gateway_flutter/blob/master/windows/runner/flutter_window.h"
click node_windows_plugin_api "https://github.com/madhav008/sms_gateway_flutter/blob/master/windows/flutter/generated_plugin_registrant.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_sms_api,node_api_server,node_sms_records,node_client toneBlue
class node_app_entry,node_sms_ui,node_sms_controller,node_task_handler toneAmber
class node_android_entry toneMint
class node_ios_entry,node_linux_entry,node_linux_app,node_linux_plugin_api,node_macos_plugins,node_windows_entry,node_windows_flutter,node_windows_window,node_windows_window_header,node_windows_flutter_header,node_windows_plugin_api toneRose
```

## Components

### SMS API

- [SMS endpoints](https://github.com/madhav008/sms_gateway_flutter/blob/master/lib/Api/routes.dart): `lib/Api/routes.dart`
- [API server](https://github.com/madhav008/sms_gateway_flutter/blob/master/lib/Api/server.dart): `lib/Api/server.dart`
- **SMS records**

### Flutter app

- [App entry](https://github.com/madhav008/sms_gateway_flutter/blob/master/lib/main.dart): `lib/main.dart`
- [SMS UI](https://github.com/madhav008/sms_gateway_flutter/blob/master/lib/section.dart): `lib/section.dart`
- [SMS controller](https://github.com/madhav008/sms_gateway_flutter/blob/master/lib/controller/sms_controller.dart): `lib/controller/sms_controller.dart`
- [Task handler](https://github.com/madhav008/sms_gateway_flutter/blob/master/lib/TaskHandler.dart): `lib/TaskHandler.dart`

### Android host

- [Android host](https://github.com/madhav008/sms_gateway_flutter/blob/master/android/app/src/main/kotlin/com/example/my_sms/MainActivity.kt): `android/app/src/main/kotlin/com/example/my_sms/MainActivity.kt`

### Desktop hosts

- [iOS host](https://github.com/madhav008/sms_gateway_flutter/blob/master/ios/Runner/AppDelegate.swift): `ios/Runner/AppDelegate.swift`
- [Linux entry](https://github.com/madhav008/sms_gateway_flutter/blob/master/linux/runner/main.cc): `linux/runner/main.cc`
- [Linux app host](https://github.com/madhav008/sms_gateway_flutter/blob/master/linux/runner/my_application.cc): `linux/runner/my_application.cc`
- [Linux plugin API](https://github.com/madhav008/sms_gateway_flutter/blob/master/linux/flutter/generated_plugin_registrant.h): `linux/flutter/generated_plugin_registrant.h`
- [macOS plugins](https://github.com/madhav008/sms_gateway_flutter/blob/master/macos/Flutter/GeneratedPluginRegistrant.swift): `macos/Flutter/GeneratedPluginRegistrant.swift`
- [Windows entry](https://github.com/madhav008/sms_gateway_flutter/blob/master/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Flutter window](https://github.com/madhav008/sms_gateway_flutter/blob/master/windows/runner/flutter_window.cpp): `windows/runner/flutter_window.cpp`
- [Win32 window](https://github.com/madhav008/sms_gateway_flutter/blob/master/windows/runner/win32_window.cpp): `windows/runner/win32_window.cpp`
- [Window interface](https://github.com/madhav008/sms_gateway_flutter/blob/master/windows/runner/win32_window.h): `windows/runner/win32_window.h`
- [Flutter interface](https://github.com/madhav008/sms_gateway_flutter/blob/master/windows/runner/flutter_window.h): `windows/runner/flutter_window.h`
- [Windows plugin API](https://github.com/madhav008/sms_gateway_flutter/blob/master/windows/flutter/generated_plugin_registrant.h): `windows/flutter/generated_plugin_registrant.h`

### Other components

- **HTTP client**

## Connections

- HTTP client → SMS endpoints: requests SMS (evidence: `README.md`)
- SMS endpoints → API server: served by
- SMS endpoints → SMS records: reads, writes, deletes (evidence: `README.md`)
- SMS endpoints → HTTP client: returns response (evidence: `README.md`)
- App entry → SMS UI: launches
- SMS UI → SMS controller: delegates to
- SMS controller → Task handler: delegates to
- Android host → App entry: hosts
- iOS host → App entry: hosts
- Linux entry → Linux app host: starts (evidence: `linux/runner/main.cc`)
- Linux app host → Linux plugin API: registers plugins (evidence: `linux/runner/my_application.cc`)
- macOS plugins → App entry: registers plugins
- Windows entry → Flutter window: creates (evidence: `windows/runner/main.cpp`)
- Flutter window → Window interface: extends
- Flutter window → Win32 window: uses window (evidence: `windows/runner/flutter_window.cpp`)
- Windows entry → Flutter interface: creates (evidence: `windows/runner/main.cpp`)
- Windows plugin API → Flutter window: plugin registration interface
