# alhosainy/writey architecture

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

- Interactive diagram: https://gitdiagram.com/alhosainy/writey
- Repository: https://github.com/alhosainy/writey

## Overview

Writey is a cross-platform Flutter whiteboard app. The principal user workflow is opening the app and working in its whiteboard interface; the README explicitly says session sharing across devices is not implemented, and documents Web, Android, and Windows support. The tree identifies the app entry point, whiteboard screen, and controller bar, but Dart source was not sampled, so their internal wiring and any drawing or persistence behavior cannot be confirmed. Platform host details are included only where supported by the tree and sampled runner source.

Main entry points: [`windows/runner/main.cpp`](https://github.com/alhosainy/writey/blob/master/windows/runner/main.cpp) (Windows runner), [`windows/runner/flutter_window.cpp`](https://github.com/alhosainy/writey/blob/master/windows/runner/flutter_window.cpp) (Flutter window), [`lib/main.dart`](https://github.com/alhosainy/writey/blob/master/lib/main.dart) (App entry), [`android/app/src/main/kotlin/com/blackbear/writey/MainActivity.kt`](https://github.com/alhosainy/writey/blob/master/android/app/src/main/kotlin/com/blackbear/writey/MainActivity.kt) (Android host)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Whiteboard app"]
  node_main["App entry<br/>[main.dart]"]
  node_whiteboard["Whiteboard screen"]
  node_controls["Controller bar"]
end

subgraph group_platforms["Platform hosts"]
  node_android["Android host<br/>[MainActivity.kt]"]
  node_windows["Windows runner<br/>[main.cpp]"]
  node_flutterwindow["Flutter window<br/>[flutter_window.cpp]"]
  node_web["Web entry<br/>[index.html]"]
end

node_user(("User"))

node_user -->|"opens app"| node_android
node_user -->|"opens app"| node_windows
node_user -->|"opens app"| node_web
node_windows -->|"creates window"| node_flutterwindow
node_flutterwindow -->|"starts Dart app"| node_main

click node_main "https://github.com/alhosainy/writey/blob/master/lib/main.dart"
click node_whiteboard "https://github.com/alhosainy/writey/blob/master/lib/screens/whiteboard_screen.dart"
click node_controls "https://github.com/alhosainy/writey/blob/master/lib/screens/controller_bar_widget.dart"
click node_android "https://github.com/alhosainy/writey/blob/master/android/app/src/main/kotlin/com/blackbear/writey/MainActivity.kt"
click node_windows "https://github.com/alhosainy/writey/blob/master/windows/runner/main.cpp"
click node_flutterwindow "https://github.com/alhosainy/writey/blob/master/windows/runner/flutter_window.cpp"
click node_web "https://github.com/alhosainy/writey/blob/master/web/index.html"

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_main,node_whiteboard,node_controls,node_user toneBlue
class node_android,node_windows,node_flutterwindow,node_web toneAmber
```

## Components

### Whiteboard app

- [App entry](https://github.com/alhosainy/writey/blob/master/lib/main.dart): `lib/main.dart`
- [Whiteboard screen](https://github.com/alhosainy/writey/blob/master/lib/screens/whiteboard_screen.dart): `lib/screens/whiteboard_screen.dart`
- [Controller bar](https://github.com/alhosainy/writey/blob/master/lib/screens/controller_bar_widget.dart): `lib/screens/controller_bar_widget.dart`

### Platform hosts

- [Android host](https://github.com/alhosainy/writey/blob/master/android/app/src/main/kotlin/com/blackbear/writey/MainActivity.kt): `android/app/src/main/kotlin/com/blackbear/writey/MainActivity.kt`
- [Windows runner](https://github.com/alhosainy/writey/blob/master/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Flutter window](https://github.com/alhosainy/writey/blob/master/windows/runner/flutter_window.cpp): `windows/runner/flutter_window.cpp`
- [Web entry](https://github.com/alhosainy/writey/blob/master/web/index.html): `web/index.html`

### Other components

- **User**

## Connections

- User → Android host: opens app
- User → Windows runner: opens app
- User → Web entry: opens app
- Windows runner → Flutter window: creates window
- Flutter window → App entry: starts Dart app
