# hugomf/floorplan3d architecture

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

- Interactive diagram: https://gitdiagram.com/hugomf/floorplan3d
- Repository: https://github.com/hugomf/floorplan3d

## Overview

Floorplan 3D is a Flutter wall-drawing application: users sketch and edit a 2D floorplan, then inspect its synchronized 3D view. The README documents editing, precision, measurement, history, toolbar persistence, accessibility, and 3D capabilities, but the Dart implementation was not sampled, so its internal feature relationships are documented rather than verified in source. Native runner nodes reflect the sampled platform host code and SOURCE INDEX references; they launch or host Flutter rather than implement floorplan behavior.

Main entry points: [`lib/milestones`](https://github.com/hugomf/floorplan3d/tree/main/lib/milestones) (Wall drawing), [`lib/main.dart`](https://github.com/hugomf/floorplan3d/blob/main/lib/main.dart) (Flutter application), [`windows/runner/main.cpp`](https://github.com/hugomf/floorplan3d/blob/main/windows/runner/main.cpp) (Windows entry point), [`linux/my_application.cc`](https://github.com/hugomf/floorplan3d/blob/main/linux/my_application.cc) (Linux Flutter host)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_product["Floorplan workflow"]
  node_flutter_app["Flutter application<br/>[main.dart]"]
end

subgraph group_editing["Drawing and editing"]
  node_wall_drawing["Wall drawing"]
  node_wall_selection["Wall selection"]
  node_wall_manipulation["Move and resize"]
  node_snap_controls["Snapping controls"]
  node_wall_deletion["Delete and clear"]
  node_undo_redo["Undo and redo"]
  node_toolbar["Floating toolbar"]
  node_toolbar_preferences[("Toolbar preferences")]
  node_accessibility["Accessible controls<br/>[main.dart]"]
end

subgraph group_visualization["Views and guidance"]
  node_measurements["Measurement guides"]
  node_wall_patterns["Wall patterns"]
  node_view_2d["2D floorplan view"]
  node_view_3d["Interactive 3D view"]
  node_ground_grid["3D ground grid"]
end

subgraph group_platforms["Platform hosts"]
  node_windows_entry["Windows entry point<br/>[main.cpp]"]
  node_windows_flutter["Windows Flutter host<br/>[flutter_window.h]"]
  node_windows_window["Windows window shell<br/>[win32_window.cpp]"]
  node_linux_entry["Linux entry point<br/>[main.cc]"]
  node_linux_app["Linux Flutter host<br/>[my_application.cc]"]
  node_linux_app_api["Linux application API<br/>[my_application.h]"]
  node_linux_plugins["Linux plugin registration"]
  node_ios_app["iOS app delegate<br/>[AppDelegate.swift]"]
  node_macos_plugins["macOS plugin registration"]
  node_windows_win32_api["Windows window API<br/>[win32_window.h]"]
  node_windows_utils["Windows runner utilities<br/>[utils.h]"]
  node_windows_plugins["Windows plugin registration"]
end

node_designer(("Floorplan user"))

node_designer -->|"uses"| node_flutter_app
node_flutter_app -->|"offers drawing"| node_wall_drawing
node_wall_drawing -->|"renders walls"| node_view_2d
node_wall_drawing -->|"updates lengths"| node_measurements
node_wall_drawing -->|"shows patterns"| node_wall_patterns
node_wall_drawing -->|"supports snapping"| node_snap_controls
node_wall_selection -->|"enables editing"| node_wall_manipulation
node_wall_selection -->|"shows lengths"| node_measurements
node_wall_deletion -->|"removes selected"| node_wall_selection
node_undo_redo -->|"reverts edits"| node_wall_drawing
node_toolbar -->|"exposes controls"| node_snap_controls
node_toolbar -->|"persists position"| node_toolbar_preferences
node_flutter_app -->|"provides labels"| node_accessibility
node_view_2d -->|"toggles view"| node_view_3d
node_view_3d -->|"shows grid"| node_ground_grid
node_wall_drawing -->|"updates in real time"| node_view_3d
node_windows_entry -->|"creates host"| node_windows_flutter
node_windows_flutter -->|"extends window"| node_windows_window
node_windows_window -->|"uses window API"| node_windows_win32_api
node_windows_entry -->|"gets arguments"| node_windows_utils
node_linux_entry -->|"creates application"| node_linux_app_api
node_linux_app -->|"implements API"| node_linux_app_api
node_linux_app -->|"registers plugins"| node_linux_plugins
node_ios_app -->|"registers plugins"| node_macos_plugins

click node_flutter_app "https://github.com/hugomf/floorplan3d/blob/main/lib/main.dart"
click node_wall_drawing "https://github.com/hugomf/floorplan3d/tree/main/lib/milestones"
click node_wall_selection "https://github.com/hugomf/floorplan3d/tree/main/lib/milestones"
click node_wall_manipulation "https://github.com/hugomf/floorplan3d/tree/main/lib/milestones"
click node_snap_controls "https://github.com/hugomf/floorplan3d/tree/main/lib/milestones"
click node_wall_deletion "https://github.com/hugomf/floorplan3d/tree/main/lib/milestones"
click node_undo_redo "https://github.com/hugomf/floorplan3d/tree/main/lib/milestones"
click node_measurements "https://github.com/hugomf/floorplan3d/tree/main/lib/milestones"
click node_wall_patterns "https://github.com/hugomf/floorplan3d/tree/main/lib/milestones"
click node_toolbar "https://github.com/hugomf/floorplan3d/tree/main/lib/milestones"
click node_toolbar_preferences "https://github.com/hugomf/floorplan3d/tree/main/lib/milestones"
click node_accessibility "https://github.com/hugomf/floorplan3d/blob/main/lib/main.dart"
click node_view_2d "https://github.com/hugomf/floorplan3d/tree/main/lib/milestones"
click node_view_3d "https://github.com/hugomf/floorplan3d/tree/main/lib/milestones"
click node_ground_grid "https://github.com/hugomf/floorplan3d/tree/main/lib/milestones"
click node_windows_entry "https://github.com/hugomf/floorplan3d/blob/main/windows/runner/main.cpp"
click node_windows_flutter "https://github.com/hugomf/floorplan3d/blob/main/windows/runner/flutter_window.h"
click node_windows_window "https://github.com/hugomf/floorplan3d/blob/main/windows/runner/win32_window.cpp"
click node_linux_entry "https://github.com/hugomf/floorplan3d/blob/main/linux/main.cc"
click node_linux_app "https://github.com/hugomf/floorplan3d/blob/main/linux/my_application.cc"
click node_linux_app_api "https://github.com/hugomf/floorplan3d/blob/main/linux/my_application.h"
click node_linux_plugins "https://github.com/hugomf/floorplan3d/blob/main/linux/flutter/generated_plugin_registrant.h"
click node_ios_app "https://github.com/hugomf/floorplan3d/blob/main/ios/Runner/AppDelegate.swift"
click node_macos_plugins "https://github.com/hugomf/floorplan3d/blob/main/macos/Flutter/GeneratedPluginRegistrant.swift"
click node_windows_win32_api "https://github.com/hugomf/floorplan3d/blob/main/windows/runner/win32_window.h"
click node_windows_utils "https://github.com/hugomf/floorplan3d/blob/main/windows/runner/utils.h"
click node_windows_plugins "https://github.com/hugomf/floorplan3d/blob/main/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_flutter_app,node_designer toneBlue
class node_wall_drawing,node_wall_selection,node_wall_manipulation,node_snap_controls,node_wall_deletion,node_undo_redo,node_toolbar,node_toolbar_preferences,node_accessibility toneAmber
class node_measurements,node_wall_patterns,node_view_2d,node_view_3d,node_ground_grid toneMint
class node_windows_entry,node_windows_flutter,node_windows_window,node_linux_entry,node_linux_app,node_linux_app_api,node_linux_plugins,node_ios_app,node_macos_plugins,node_windows_win32_api,node_windows_utils,node_windows_plugins toneRose
```

## Components

### Floorplan workflow

- [Flutter application](https://github.com/hugomf/floorplan3d/blob/main/lib/main.dart): `lib/main.dart`

### Drawing and editing

- [Wall drawing](https://github.com/hugomf/floorplan3d/tree/main/lib/milestones): `lib/milestones`
- [Wall selection](https://github.com/hugomf/floorplan3d/tree/main/lib/milestones): `lib/milestones`
- [Move and resize](https://github.com/hugomf/floorplan3d/tree/main/lib/milestones): `lib/milestones`
- [Snapping controls](https://github.com/hugomf/floorplan3d/tree/main/lib/milestones): `lib/milestones`
- [Delete and clear](https://github.com/hugomf/floorplan3d/tree/main/lib/milestones): `lib/milestones`
- [Undo and redo](https://github.com/hugomf/floorplan3d/tree/main/lib/milestones): `lib/milestones`
- [Floating toolbar](https://github.com/hugomf/floorplan3d/tree/main/lib/milestones): `lib/milestones`
- [Toolbar preferences](https://github.com/hugomf/floorplan3d/tree/main/lib/milestones): `lib/milestones`
- [Accessible controls](https://github.com/hugomf/floorplan3d/blob/main/lib/main.dart): `lib/main.dart`

### Views and guidance

- [Measurement guides](https://github.com/hugomf/floorplan3d/tree/main/lib/milestones): `lib/milestones`
- [Wall patterns](https://github.com/hugomf/floorplan3d/tree/main/lib/milestones): `lib/milestones`
- [2D floorplan view](https://github.com/hugomf/floorplan3d/tree/main/lib/milestones): `lib/milestones`
- [Interactive 3D view](https://github.com/hugomf/floorplan3d/tree/main/lib/milestones): `lib/milestones`
- [3D ground grid](https://github.com/hugomf/floorplan3d/tree/main/lib/milestones): `lib/milestones`

### Platform hosts

- [Windows entry point](https://github.com/hugomf/floorplan3d/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Windows Flutter host](https://github.com/hugomf/floorplan3d/blob/main/windows/runner/flutter_window.h): `windows/runner/flutter_window.h`
- [Windows window shell](https://github.com/hugomf/floorplan3d/blob/main/windows/runner/win32_window.cpp): `windows/runner/win32_window.cpp`
- [Linux entry point](https://github.com/hugomf/floorplan3d/blob/main/linux/main.cc): `linux/main.cc`
- [Linux Flutter host](https://github.com/hugomf/floorplan3d/blob/main/linux/my_application.cc): `linux/my_application.cc`
- [Linux application API](https://github.com/hugomf/floorplan3d/blob/main/linux/my_application.h): `linux/my_application.h`
- [Linux plugin registration](https://github.com/hugomf/floorplan3d/blob/main/linux/flutter/generated_plugin_registrant.h): `linux/flutter/generated_plugin_registrant.h`
- [iOS app delegate](https://github.com/hugomf/floorplan3d/blob/main/ios/Runner/AppDelegate.swift): `ios/Runner/AppDelegate.swift`
- [macOS plugin registration](https://github.com/hugomf/floorplan3d/blob/main/macos/Flutter/GeneratedPluginRegistrant.swift): `macos/Flutter/GeneratedPluginRegistrant.swift`
- [Windows window API](https://github.com/hugomf/floorplan3d/blob/main/windows/runner/win32_window.h): `windows/runner/win32_window.h`
- [Windows runner utilities](https://github.com/hugomf/floorplan3d/blob/main/windows/runner/utils.h): `windows/runner/utils.h`
- [Windows plugin registration](https://github.com/hugomf/floorplan3d/blob/main/windows/flutter/generated_plugin_registrant.h): `windows/flutter/generated_plugin_registrant.h`

### Other components

- **Floorplan user**

## Connections

- Floorplan user → Flutter application: uses (evidence: `README.md`)
- Flutter application → Wall drawing: offers drawing (evidence: `README.md`)
- Wall drawing → 2D floorplan view: renders walls (evidence: `README.md`)
- Wall drawing → Measurement guides: updates lengths (evidence: `README.md`)
- Wall drawing → Wall patterns: shows patterns (evidence: `README.md`)
- Wall drawing → Snapping controls: supports snapping (evidence: `README.md`)
- Wall selection → Move and resize: enables editing (evidence: `README.md`)
- Wall selection → Measurement guides: shows lengths (evidence: `README.md`)
- Delete and clear → Wall selection: removes selected (evidence: `README.md`)
- Undo and redo → Wall drawing: reverts edits (evidence: `README.md`)
- Floating toolbar → Snapping controls: exposes controls (evidence: `README.md`)
- Floating toolbar → Toolbar preferences: persists position (evidence: `README.md`)
- Flutter application → Accessible controls: provides labels (evidence: `README.md`)
- 2D floorplan view → Interactive 3D view: toggles view (evidence: `README.md`)
- Interactive 3D view → 3D ground grid: shows grid (evidence: `README.md`)
- Wall drawing → Interactive 3D view: updates in real time (evidence: `README.md`)
- Windows entry point → Windows Flutter host: creates host (evidence: `windows/runner/main.cpp`)
- Windows Flutter host → Windows window shell: extends window (evidence: `windows/runner/flutter_window.h`)
- Windows window shell → Windows window API: uses window API (evidence: `windows/runner/win32_window.cpp`)
- Windows entry point → Windows runner utilities: gets arguments (evidence: `windows/runner/main.cpp`)
- Linux entry point → Linux application API: creates application (evidence: `linux/main.cc`)
- Linux Flutter host → Linux application API: implements API (evidence: `linux/my_application.cc`)
- Linux Flutter host → Linux plugin registration: registers plugins (evidence: `linux/my_application.cc`)
- iOS app delegate → macOS plugin registration: registers plugins (evidence: `ios/Runner/AppDelegate.swift`)
