# ttthu-huong/smart-note-app-qa architecture

> Architecture diagram of the GitHub repository ttthu-huong/smart-note-app-qa, 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/ttthu-huong/smart-note-app-qa
- Repository: https://github.com/ttthu-huong/smart-note-app-qa

## Overview

Smart Note App is a Flutter offline-first notes product. Users create and organize rich-text, image, audio, checklist, and drawing notes; notes are stored locally and synchronized to Firebase when connectivity returns. The product also provides search, archive/trash and labels, Gemini-assisted note transformations, biometric privacy, reminders, and PDF export. The README documents the broad UI/state/service layering and major integrations, but source excerpts do not expose runtime call sites, so internal edges are limited to documented relationships.

Main entry points: [`lib/screens`](https://github.com/ttthu-huong/smart-note-app-qa/tree/main/lib/screens) (Note screens), [`lib/providers`](https://github.com/ttthu-huong/smart-note-app-qa/tree/main/lib/providers) (State providers), [`lib/repositories`](https://github.com/ttthu-huong/smart-note-app-qa/tree/main/lib/repositories) (Repositories), [`lib/features/editor`](https://github.com/ttthu-huong/smart-note-app-qa/tree/main/lib/features/editor) (Editor controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Notes experience"]
  node_screens["Note screens"]
  node_editor_widgets["Editor controls"]
  node_shared_widgets["Shared widgets"]
end

subgraph group_application["Application logic"]
  node_providers["State providers"]
  node_models["Note models"]
end

subgraph group_storage["Persistence and sync"]
  node_repositories["Repositories"]
  node_local_store[("SQLite storage")]
  node_cloud_store[("Cloud Firestore")]
  node_sync_service["Sync service"]
  node_firebase_auth["Firebase Auth"]
end

subgraph group_capabilities["Note capabilities"]
  node_search["Full-text search<br/>[search_screen.dart]"]
  node_ai["Gemini assistant"]
  node_media["Media attachments"]
  node_drawing["Drawing board"]
  node_privacy["Biometric lock"]
  node_pdf["PDF export"]
  node_reminders["Reminders"]
end

node_user(("Note taker"))

node_user -->|"creates notes"| node_screens
node_screens -->|"edits content"| node_editor_widgets
node_screens -->|"uses state"| node_providers
node_providers -->|"manages notes"| node_models
node_providers -.->|"delegates data"| node_repositories
node_repositories -.->|"stores offline"| node_local_store
node_repositories -.->|"coordinates sync"| node_sync_service
node_sync_service -.->|"syncs notes"| node_cloud_store
node_user -->|"authenticates"| node_firebase_auth
node_user -->|"searches notes"| node_search
node_user -->|"requests assistance"| node_ai
node_user -->|"adds images"| node_media
node_user -->|"draws notes"| node_drawing
node_user -->|"locks notes"| node_privacy
node_user -->|"exports notes"| node_pdf
node_user -.->|"sets reminders"| node_reminders

click node_screens "https://github.com/ttthu-huong/smart-note-app-qa/tree/main/lib/screens"
click node_editor_widgets "https://github.com/ttthu-huong/smart-note-app-qa/tree/main/lib/features/editor"
click node_shared_widgets "https://github.com/ttthu-huong/smart-note-app-qa/tree/main/lib/widgets"
click node_providers "https://github.com/ttthu-huong/smart-note-app-qa/tree/main/lib/providers"
click node_models "https://github.com/ttthu-huong/smart-note-app-qa/tree/main/lib/models"
click node_repositories "https://github.com/ttthu-huong/smart-note-app-qa/tree/main/lib/repositories"
click node_local_store "https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/services/local_note_service.dart"
click node_cloud_store "https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/services/firestore_note_service.dart"
click node_search "https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/screens/search_screen.dart"
click node_ai "https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/services/gemini_ai_service.dart"
click node_media "https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/services/cloudinary_service.dart"
click node_drawing "https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/screens/drawing_screen.dart"
click node_privacy "https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/services/biometric_service.dart"
click node_pdf "https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/services/pdf_export_service.dart"
click node_reminders "https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/services/reminder_service.dart"

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_screens,node_editor_widgets,node_shared_widgets toneBlue
class node_providers,node_models toneAmber
class node_repositories,node_local_store,node_cloud_store,node_sync_service,node_firebase_auth toneMint
class node_search,node_ai,node_media,node_drawing,node_privacy,node_pdf,node_reminders toneRose
class node_user toneIndigo
```

## Components

### Notes experience

- [Note screens](https://github.com/ttthu-huong/smart-note-app-qa/tree/main/lib/screens): `lib/screens`
- [Editor controls](https://github.com/ttthu-huong/smart-note-app-qa/tree/main/lib/features/editor): `lib/features/editor`
- [Shared widgets](https://github.com/ttthu-huong/smart-note-app-qa/tree/main/lib/widgets): `lib/widgets`

### Application logic

- [State providers](https://github.com/ttthu-huong/smart-note-app-qa/tree/main/lib/providers): `lib/providers`
- [Note models](https://github.com/ttthu-huong/smart-note-app-qa/tree/main/lib/models): `lib/models`

### Persistence and sync

- [Repositories](https://github.com/ttthu-huong/smart-note-app-qa/tree/main/lib/repositories): `lib/repositories`
- [SQLite storage](https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/services/local_note_service.dart): `lib/services/local_note_service.dart`
- [Cloud Firestore](https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/services/firestore_note_service.dart): `lib/services/firestore_note_service.dart`
- **Sync service**
- **Firebase Auth**

### Note capabilities

- [Full-text search](https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/screens/search_screen.dart): `lib/screens/search_screen.dart`
- [Gemini assistant](https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/services/gemini_ai_service.dart): `lib/services/gemini_ai_service.dart`
- [Media attachments](https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/services/cloudinary_service.dart): `lib/services/cloudinary_service.dart`
- [Drawing board](https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/screens/drawing_screen.dart): `lib/screens/drawing_screen.dart`
- [Biometric lock](https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/services/biometric_service.dart): `lib/services/biometric_service.dart`
- [PDF export](https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/services/pdf_export_service.dart): `lib/services/pdf_export_service.dart`
- [Reminders](https://github.com/ttthu-huong/smart-note-app-qa/blob/main/lib/services/reminder_service.dart): `lib/services/reminder_service.dart`

### Other components

- **Note taker**

## Connections

- Note taker → Note screens: creates notes (evidence: `README.md`)
- Note screens → Editor controls: edits content (evidence: `README.md`)
- Note screens → State providers: uses state (evidence: `README.md`)
- State providers → Note models: manages notes (evidence: `README.md`)
- State providers → Repositories: delegates data
- Repositories → SQLite storage: stores offline
- Repositories → Sync service: coordinates sync
- Sync service → Cloud Firestore: syncs notes
- Note taker → Firebase Auth: authenticates (evidence: `README.md`)
- Note taker → Full-text search: searches notes (evidence: `README.md`)
- Note taker → Gemini assistant: requests assistance (evidence: `README.md`)
- Note taker → Media attachments: adds images (evidence: `README.md`)
- Note taker → Drawing board: draws notes (evidence: `README.md`)
- Note taker → Biometric lock: locks notes (evidence: `README.md`)
- Note taker → PDF export: exports notes (evidence: `README.md`)
- Note taker → Reminders: sets reminders
