# euanscott/project-tweety architecture

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

- Interactive diagram: https://gitdiagram.com/euanscott/project-tweety
- Repository: https://github.com/euanscott/project-tweety

## Overview

Project Tweety is a Flutter playground app whose visible product areas include Google sign-in, log entries, preferences, navigation, and a shared adaptive design system. The likely user flow enters through the app and routed pages, then uses sign-in and log or preference features backed by data and platform services. The source excerpts cover only native text-settings channel handlers, so most Dart relationships below are dashed and unverified; paths for unsampled areas identify exact directories from the tree.

Main entry points: [`lib/presentation/navigation`](https://github.com/euanscott/project-tweety/tree/main/lib/presentation/navigation) (Routes and guards), [`lib/presentation/pages/app_preferences`](https://github.com/euanscott/project-tweety/tree/main/lib/presentation/pages/app_preferences) (App preferences), [`lib/data/repositories`](https://github.com/euanscott/project-tweety/tree/main/lib/data/repositories) (Repositories), [`lib/presentation/pages/sign_in`](https://github.com/euanscott/project-tweety/tree/main/lib/presentation/pages/sign_in) (Google sign-in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_entry["Flutter entry<br/>[main.dart]"]
  node_routing["Routes and guards"]
end

subgraph group_features["User features"]
  node_signin["Google sign-in"]
  node_home["Home"]
  node_logs["Log entries"]
  node_preferences["App preferences"]
end

subgraph group_data["Domain and data"]
  node_domain["Domain entities"]
  node_repositories["Repositories"]
  node_log_sources["Log data sources"]
end

subgraph group_platform["Platform services"]
  node_sqlite[("SQLite storage")]
  node_firebase["Firebase services"]
  node_native_channel["Text settings channel<br/>[MainActivity.kt]"]
  node_ios_channel["iOS text settings"]
end

subgraph group_design["Design system"]
  node_design_system["Adaptive design system"]
  node_theme["Theme presets"]
end

node_user(("App user"))

node_user -.->|"opens"| node_entry
node_entry -.->|"starts"| node_routing
node_routing -.->|"routes"| node_signin
node_routing -.->|"routes"| node_home
node_routing -.->|"routes"| node_logs
node_routing -.->|"routes"| node_preferences
node_signin -.->|"authenticates"| node_firebase
node_logs -.->|"requests data"| node_repositories
node_repositories -.->|"uses models"| node_domain
node_repositories -.->|"delegates"| node_log_sources
node_log_sources -.->|"persists locally"| node_sqlite
node_log_sources -.->|"syncs remotely"| node_firebase
node_preferences -.->|"loads and saves"| node_repositories
node_preferences -.->|"opens settings"| node_native_channel
node_preferences -.->|"opens settings"| node_ios_channel
node_signin -.->|"uses controls"| node_design_system
node_logs -.->|"uses controls"| node_design_system
node_preferences -.->|"selects presets"| node_theme
node_native_channel -->|"opens system settings"| node_user
node_ios_channel -->|"opens system settings"| node_user

click node_entry "https://github.com/euanscott/project-tweety/blob/main/lib/main.dart"
click node_routing "https://github.com/euanscott/project-tweety/tree/main/lib/presentation/navigation"
click node_signin "https://github.com/euanscott/project-tweety/tree/main/lib/presentation/pages/sign_in"
click node_home "https://github.com/euanscott/project-tweety/tree/main/lib/presentation/pages/home"
click node_logs "https://github.com/euanscott/project-tweety/tree/main/lib/presentation/pages/logs"
click node_preferences "https://github.com/euanscott/project-tweety/tree/main/lib/presentation/pages/app_preferences"
click node_domain "https://github.com/euanscott/project-tweety/tree/main/lib/domain"
click node_repositories "https://github.com/euanscott/project-tweety/tree/main/lib/data/repositories"
click node_log_sources "https://github.com/euanscott/project-tweety/tree/main/lib/data/datasources/log_entry"
click node_sqlite "https://github.com/euanscott/project-tweety/tree/main/lib/core/storage"
click node_firebase "https://github.com/euanscott/project-tweety/tree/main/lib/core/firebase"
click node_native_channel "https://github.com/euanscott/project-tweety/blob/main/android/app/src/main/kotlin/dev/euanscott/projecttweety/MainActivity.kt"
click node_ios_channel "https://github.com/euanscott/project-tweety/blob/main/ios/Runner/SceneDelegate.swift"
click node_design_system "https://github.com/euanscott/project-tweety/tree/main/packages/design_system/lib/src/adaptive"
click node_theme "https://github.com/euanscott/project-tweety/tree/main/packages/design_system/lib/src/theme"

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_signin,node_home,node_logs,node_preferences toneAmber
class node_domain,node_repositories,node_log_sources toneMint
class node_sqlite,node_firebase,node_native_channel,node_ios_channel toneRose
class node_design_system,node_theme toneIndigo
```

## Components

### App and navigation

- [Flutter entry](https://github.com/euanscott/project-tweety/blob/main/lib/main.dart): `lib/main.dart`
- [Routes and guards](https://github.com/euanscott/project-tweety/tree/main/lib/presentation/navigation): `lib/presentation/navigation`

### User features

- [Google sign-in](https://github.com/euanscott/project-tweety/tree/main/lib/presentation/pages/sign_in): `lib/presentation/pages/sign_in`
- [Home](https://github.com/euanscott/project-tweety/tree/main/lib/presentation/pages/home): `lib/presentation/pages/home`
- [Log entries](https://github.com/euanscott/project-tweety/tree/main/lib/presentation/pages/logs): `lib/presentation/pages/logs`
- [App preferences](https://github.com/euanscott/project-tweety/tree/main/lib/presentation/pages/app_preferences): `lib/presentation/pages/app_preferences`

### Domain and data

- [Domain entities](https://github.com/euanscott/project-tweety/tree/main/lib/domain): `lib/domain`
- [Repositories](https://github.com/euanscott/project-tweety/tree/main/lib/data/repositories): `lib/data/repositories`
- [Log data sources](https://github.com/euanscott/project-tweety/tree/main/lib/data/datasources/log_entry): `lib/data/datasources/log_entry`

### Platform services

- [SQLite storage](https://github.com/euanscott/project-tweety/tree/main/lib/core/storage): `lib/core/storage`
- [Firebase services](https://github.com/euanscott/project-tweety/tree/main/lib/core/firebase): `lib/core/firebase`
- [Text settings channel](https://github.com/euanscott/project-tweety/blob/main/android/app/src/main/kotlin/dev/euanscott/projecttweety/MainActivity.kt): `android/app/src/main/kotlin/dev/euanscott/projecttweety/MainActivity.kt`
- [iOS text settings](https://github.com/euanscott/project-tweety/blob/main/ios/Runner/SceneDelegate.swift): `ios/Runner/SceneDelegate.swift`

### Design system

- [Adaptive design system](https://github.com/euanscott/project-tweety/tree/main/packages/design_system/lib/src/adaptive): `packages/design_system/lib/src/adaptive`
- [Theme presets](https://github.com/euanscott/project-tweety/tree/main/packages/design_system/lib/src/theme): `packages/design_system/lib/src/theme`

### Other components

- **App user**

## Connections

- App user → Flutter entry: opens
- Flutter entry → Routes and guards: starts
- Routes and guards → Google sign-in: routes
- Routes and guards → Home: routes
- Routes and guards → Log entries: routes
- Routes and guards → App preferences: routes
- Google sign-in → Firebase services: authenticates
- Log entries → Repositories: requests data
- Repositories → Domain entities: uses models
- Repositories → Log data sources: delegates
- Log data sources → SQLite storage: persists locally
- Log data sources → Firebase services: syncs remotely
- App preferences → Repositories: loads and saves
- App preferences → Text settings channel: opens settings
- App preferences → iOS text settings: opens settings
- Google sign-in → Adaptive design system: uses controls
- Log entries → Adaptive design system: uses controls
- App preferences → Theme presets: selects presets
- Text settings channel → App user: opens system settings (evidence: `android/app/src/main/kotlin/dev/euanscott/projecttweety/MainActivity.kt`)
- iOS text settings → App user: opens system settings (evidence: `ios/Runner/SceneDelegate.swift`)
