# mouqiandi0/irisnote architecture

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

- Interactive diagram: https://gitdiagram.com/mouqiandi0/irisnote
- Repository: https://github.com/mouqiandi0/irisnote

## Overview

IRisNote is a local-first cross-platform notes app. The main workflow is creating or editing a note, saving it locally for offline use, and synchronizing it to the cloud when the user is signed in and has enabled cloud storage. The README also documents categories, drafts and revision recovery, reading tools, export, authentication, profile, todos, excerpts, and in-app updates. The tree and README establish these product areas; sampled source is limited, so links between unsampled feature internals are omitted where call ownership is uncertain.

Main entry points: [`src/app/(tabs)/_layout.tsx`](https://github.com/mouqiandi0/irisnote/blob/master/src/app/(tabs)/_layout.tsx) (App routes), [`src/features/notes/screens/NotesScreen.tsx`](https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/screens/NotesScreen.tsx) (Note screens), [`src/features/notes/screens/CreateNoteScreen.tsx`](https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/screens/CreateNoteScreen.tsx) (Note editing), [`src/features/notes/services/note-save.service.ts`](https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/services/note-save.service.ts) (Note save and sync)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App experience"]
  node_routes["App routes<br/>[_layout.tsx]"]
end

subgraph group_notes["Notes and reading"]
  node_noteui["Note screens<br/>[NotesScreen.tsx]"]
  node_noteedit["Note editing"]
  node_notesvc["Note save and sync"]
  node_drafts["Draft recovery"]
  node_categories["Note categories<br/>[categories.api.ts]"]
  node_reading["Reading progress"]
  node_sharing["Note exports"]
end

subgraph group_data["Local data and sync"]
  node_db[("SQLite database")]
  node_uploadqueue["Upload queue"]
  node_syncui["Sync task management"]
end

subgraph group_account["Account and cloud"]
  node_auth["Authentication<br/>[AuthProvider.tsx]"]
  node_authapi["Auth API<br/>[auth.api.ts]"]
  node_profile["User profile<br/>[ProfileScreen.tsx]"]
  node_cloudsettings["Cloud consent settings"]
  node_cloudpolicy["Cloud access policy"]
end

subgraph group_extras["Other capabilities"]
  node_todos["Todos and reminders<br/>[TodosScreen.tsx]"]
  node_todoalarm["Android todo alarms"]
  node_excerpts["Clipboard excerpts<br/>[ExcerptsScreen.tsx]"]
  node_clipboard["Clipboard service"]
  node_settings["Settings and storage"]
  node_storagefiles["Storage cleanup<br/>[storage-files.ts]"]
  node_updates["In-app updates<br/>[UpdateDialog.tsx]"]
  node_updater["Native patch support"]
end

node_user(("App user"))
node_backend["irisapi backend"]

node_user -->|"opens"| node_routes
node_routes -->|"navigates"| node_noteui
node_routes -->|"navigates"| node_auth
node_routes -->|"navigates"| node_todos
node_routes -->|"navigates"| node_excerpts
node_routes -->|"navigates"| node_profile
node_noteui -->|"creates or edits"| node_noteedit
node_noteedit -->|"saves"| node_notesvc
node_notesvc -->|"stores locally"| node_db
node_notesvc -->|"queues uploads"| node_uploadqueue
node_uploadqueue -.->|"synchronizes"| node_backend
node_noteui -->|"filters by"| node_categories
node_noteedit -->|"recovers drafts"| node_drafts
node_noteui -->|"tracks reading"| node_reading
node_noteui -->|"exports notes"| node_sharing
node_auth -->|"authenticates"| node_authapi
node_authapi -->|"sends requests"| node_backend
node_cloudsettings -->|"sets consent"| node_cloudpolicy
node_cloudpolicy -->|"gates cloud access"| node_uploadqueue
node_profile -->|"loads profile"| node_backend
node_todos -.->|"schedules reminders"| node_todoalarm
node_excerpts -->|"uses clipboard"| node_clipboard
node_settings -->|"scans and cleans"| node_storagefiles
node_settings -->|"measures note data"| node_db
node_user -->|"checks for updates"| node_updates
node_updates -.->|"applies patch"| node_updater

click node_routes "https://github.com/mouqiandi0/irisnote/blob/master/src/app/(tabs)/_layout.tsx"
click node_noteui "https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/screens/NotesScreen.tsx"
click node_noteedit "https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/screens/CreateNoteScreen.tsx"
click node_notesvc "https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/services/note-save.service.ts"
click node_drafts "https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/data/note-draft.repository.ts"
click node_categories "https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/categories/api/categories.api.ts"
click node_reading "https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/reading/reading-progress-store.ts"
click node_sharing "https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/components/NoteShare/NoteShareManager.tsx"
click node_db "https://github.com/mouqiandi0/irisnote/blob/master/src/core/database/ApplicationDatabaseProvider.tsx"
click node_uploadqueue "https://github.com/mouqiandi0/irisnote/blob/master/src/core/sync/upload-queue-coordinator.ts"
click node_syncui "https://github.com/mouqiandi0/irisnote/blob/master/src/features/sync/screens/SyncQueueScreen.tsx"
click node_auth "https://github.com/mouqiandi0/irisnote/blob/master/src/features/auth/providers/AuthProvider.tsx"
click node_authapi "https://github.com/mouqiandi0/irisnote/blob/master/src/features/auth/api/auth.api.ts"
click node_profile "https://github.com/mouqiandi0/irisnote/blob/master/src/features/profile/screens/ProfileScreen.tsx"
click node_cloudsettings "https://github.com/mouqiandi0/irisnote/blob/master/src/features/settings/screens/CloudStorageSettingsScreen.tsx"
click node_cloudpolicy "https://github.com/mouqiandi0/irisnote/blob/master/src/core/cloud-storage/cloud-storage-policy.ts"
click node_todos "https://github.com/mouqiandi0/irisnote/blob/master/src/features/todos/screens/TodosScreen.tsx"
click node_todoalarm "https://github.com/mouqiandi0/irisnote/blob/master/modules/irisnote-system/android/src/main/java/expo/modules/irisnotesystem/live/LiveTodoScheduler.kt"
click node_excerpts "https://github.com/mouqiandi0/irisnote/blob/master/src/features/excerpts/screens/ExcerptsScreen.tsx"
click node_clipboard "https://github.com/mouqiandi0/irisnote/blob/master/src/features/excerpts/services/clipboard.service.ts"
click node_settings "https://github.com/mouqiandi0/irisnote/blob/master/src/features/settings/screens/DataStorageSettingsScreen.tsx"
click node_storagefiles "https://github.com/mouqiandi0/irisnote/blob/master/src/core/storage/storage-files.ts"
click node_updates "https://github.com/mouqiandi0/irisnote/blob/master/src/features/updates/UpdateDialog.tsx"
click node_updater "https://github.com/mouqiandi0/irisnote/blob/master/modules/irisnote-updater/android/src/main/java/expo/modules/irisnoteupdater/IrisNoteUpdaterModule.kt"

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_routes,node_user toneBlue
class node_noteui,node_noteedit,node_notesvc,node_drafts,node_categories,node_reading,node_sharing toneAmber
class node_db,node_uploadqueue,node_syncui,node_backend toneMint
class node_auth,node_authapi,node_profile,node_cloudsettings,node_cloudpolicy toneRose
class node_todos,node_todoalarm,node_excerpts,node_clipboard,node_settings,node_storagefiles,node_updates,node_updater toneIndigo
```

## Components

### App experience

- [App routes](https://github.com/mouqiandi0/irisnote/blob/master/src/app/(tabs)/_layout.tsx): `src/app/(tabs)/_layout.tsx`

### Notes and reading

- [Note screens](https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/screens/NotesScreen.tsx): `src/features/notes/screens/NotesScreen.tsx`
- [Note editing](https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/screens/CreateNoteScreen.tsx): `src/features/notes/screens/CreateNoteScreen.tsx`
- [Note save and sync](https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/services/note-save.service.ts): `src/features/notes/services/note-save.service.ts`
- [Draft recovery](https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/data/note-draft.repository.ts): `src/features/notes/data/note-draft.repository.ts`
- [Note categories](https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/categories/api/categories.api.ts): `src/features/notes/categories/api/categories.api.ts`
- [Reading progress](https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/reading/reading-progress-store.ts): `src/features/notes/reading/reading-progress-store.ts`
- [Note exports](https://github.com/mouqiandi0/irisnote/blob/master/src/features/notes/components/NoteShare/NoteShareManager.tsx): `src/features/notes/components/NoteShare/NoteShareManager.tsx`

### Local data and sync

- [SQLite database](https://github.com/mouqiandi0/irisnote/blob/master/src/core/database/ApplicationDatabaseProvider.tsx): `src/core/database/ApplicationDatabaseProvider.tsx`
- [Upload queue](https://github.com/mouqiandi0/irisnote/blob/master/src/core/sync/upload-queue-coordinator.ts): `src/core/sync/upload-queue-coordinator.ts`
- [Sync task management](https://github.com/mouqiandi0/irisnote/blob/master/src/features/sync/screens/SyncQueueScreen.tsx): `src/features/sync/screens/SyncQueueScreen.tsx`

### Account and cloud

- [Authentication](https://github.com/mouqiandi0/irisnote/blob/master/src/features/auth/providers/AuthProvider.tsx): `src/features/auth/providers/AuthProvider.tsx`
- [Auth API](https://github.com/mouqiandi0/irisnote/blob/master/src/features/auth/api/auth.api.ts): `src/features/auth/api/auth.api.ts`
- [User profile](https://github.com/mouqiandi0/irisnote/blob/master/src/features/profile/screens/ProfileScreen.tsx): `src/features/profile/screens/ProfileScreen.tsx`
- [Cloud consent settings](https://github.com/mouqiandi0/irisnote/blob/master/src/features/settings/screens/CloudStorageSettingsScreen.tsx): `src/features/settings/screens/CloudStorageSettingsScreen.tsx`
- [Cloud access policy](https://github.com/mouqiandi0/irisnote/blob/master/src/core/cloud-storage/cloud-storage-policy.ts): `src/core/cloud-storage/cloud-storage-policy.ts`

### Other capabilities

- [Todos and reminders](https://github.com/mouqiandi0/irisnote/blob/master/src/features/todos/screens/TodosScreen.tsx): `src/features/todos/screens/TodosScreen.tsx`
- [Android todo alarms](https://github.com/mouqiandi0/irisnote/blob/master/modules/irisnote-system/android/src/main/java/expo/modules/irisnotesystem/live/LiveTodoScheduler.kt): `modules/irisnote-system/android/src/main/java/expo/modules/irisnotesystem/live/LiveTodoScheduler.kt`
- [Clipboard excerpts](https://github.com/mouqiandi0/irisnote/blob/master/src/features/excerpts/screens/ExcerptsScreen.tsx): `src/features/excerpts/screens/ExcerptsScreen.tsx`
- [Clipboard service](https://github.com/mouqiandi0/irisnote/blob/master/src/features/excerpts/services/clipboard.service.ts): `src/features/excerpts/services/clipboard.service.ts`
- [Settings and storage](https://github.com/mouqiandi0/irisnote/blob/master/src/features/settings/screens/DataStorageSettingsScreen.tsx): `src/features/settings/screens/DataStorageSettingsScreen.tsx`
- [Storage cleanup](https://github.com/mouqiandi0/irisnote/blob/master/src/core/storage/storage-files.ts): `src/core/storage/storage-files.ts`
- [In-app updates](https://github.com/mouqiandi0/irisnote/blob/master/src/features/updates/UpdateDialog.tsx): `src/features/updates/UpdateDialog.tsx`
- [Native patch support](https://github.com/mouqiandi0/irisnote/blob/master/modules/irisnote-updater/android/src/main/java/expo/modules/irisnoteupdater/IrisNoteUpdaterModule.kt): `modules/irisnote-updater/android/src/main/java/expo/modules/irisnoteupdater/IrisNoteUpdaterModule.kt`

### Other components

- **App user**
- **irisapi backend**

## Connections

- App user → App routes: opens
- App routes → Note screens: navigates
- App routes → Authentication: navigates
- App routes → Todos and reminders: navigates
- App routes → Clipboard excerpts: navigates
- App routes → User profile: navigates
- Note screens → Note editing: creates or edits
- Note editing → Note save and sync: saves
- Note save and sync → SQLite database: stores locally
- Note save and sync → Upload queue: queues uploads
- Upload queue → irisapi backend: synchronizes
- Note screens → Note categories: filters by
- Note editing → Draft recovery: recovers drafts
- Note screens → Reading progress: tracks reading
- Note screens → Note exports: exports notes
- Authentication → Auth API: authenticates
- Auth API → irisapi backend: sends requests
- Cloud consent settings → Cloud access policy: sets consent
- Cloud access policy → Upload queue: gates cloud access
- User profile → irisapi backend: loads profile
- Todos and reminders → Android todo alarms: schedules reminders
- Clipboard excerpts → Clipboard service: uses clipboard
- Settings and storage → Storage cleanup: scans and cleans
- Settings and storage → SQLite database: measures note data
- App user → In-app updates: checks for updates
- In-app updates → Native patch support: applies patch
