# jlayne246/ariascore architecture

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

- Interactive diagram: https://gitdiagram.com/jlayne246/ariascore
- Repository: https://github.com/jlayne246/ariascore

## Overview

AriaScore is a musician-focused PDF score library and reader. A musician imports or selects a score, organizes it with metadata and setlists, then opens it in a buffered page reader; local SQLite state supports the library, bookmarks, and reader preferences. The README also describes facial-gesture page turning, annotations, search, cloud backup, and higher-fidelity rendering. Those capabilities are represented where the tree supports a component, but their detailed runtime connections are not inferred from unsampled code.

Main entry points: [`ariascore/App.tsx`](https://github.com/jlayne246/ariascore/blob/main/ariascore/App.tsx) (App and routing), [`ariascore/utils/database.ts`](https://github.com/jlayne246/ariascore/blob/main/ariascore/utils/database.ts) (SQLite data store), [`ariascore/screens/DashboardScreen.tsx`](https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/DashboardScreen.tsx) (Dashboard), [`ariascore/screens/LibraryScreen.tsx`](https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/LibraryScreen.tsx) (Score library)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App navigation"]
  node_app["App and routing<br/>[App.tsx]"]
  node_dashboard["Dashboard"]
end

subgraph group_scores["Score library"]
  node_library["Score library<br/>[LibraryScreen.tsx]"]
  node_setlists["Setlist management<br/>[SetlistsScreen.tsx]"]
  node_setlist_detail["Setlist detail"]
  node_metadata["Score metadata<br/>[MetadataForm.tsx]"]
  node_file_utils["PDF file handling<br/>[fileUtils.ts]"]
end

subgraph group_reading["Score reading"]
  node_reader_screen["Reader screen<br/>[ReaderScreen.tsx]"]
  node_buffered_reader["Buffered page reader"]
  node_pdf_bridge["PDF renderer bridge"]
  node_android_renderer["Android renderer"]
  node_ios_renderer["iOS renderer"]
  node_music_settings["Music preferences"]
  node_setlist_settings["Setlist preferences"]
end

subgraph group_state["Local state"]
  node_resolver["Preference resolution<br/>[resolver.ts]"]
  node_settings_repo["Preference repository<br/>[repository.ts]"]
  node_database[("SQLite data store<br/>[database.ts]")]
  node_backups["Backups<br/>[BackupsScreen.tsx]"]
end

node_musician(("Musician"))

node_musician -->|"opens app"| node_app
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_library
node_app -->|"routes to"| node_reader_screen
node_app -->|"routes to"| node_setlists
node_app -->|"routes to"| node_setlist_detail
node_app -->|"initializes"| node_database
node_app -->|"imports PDFs"| node_file_utils
node_dashboard -->|"reads and writes"| node_database
node_dashboard -->|"opens form"| node_metadata
node_dashboard -->|"handles PDFs"| node_file_utils
node_library -->|"reads and writes"| node_database
node_library -->|"opens form"| node_metadata
node_library -->|"handles PDFs"| node_file_utils
node_setlists -->|"manages setlists"| node_database
node_setlist_detail -->|"loads setlist"| node_database
node_setlist_detail -->|"edits score"| node_metadata
node_reader_screen -->|"renders with"| node_buffered_reader
node_reader_screen -->|"loads score state"| node_database
node_buffered_reader -->|"requests page renders"| node_pdf_bridge
node_buffered_reader -->|"reads bookmarks"| node_database
node_pdf_bridge -.->|"dispatches natively"| node_android_renderer
node_pdf_bridge -.->|"dispatches natively"| node_ios_renderer
node_reader_screen -->|"loads preferences"| node_resolver
node_music_settings -->|"resolves preferences"| node_resolver
node_music_settings -->|"saves preferences"| node_settings_repo
node_setlist_settings -->|"resolves preferences"| node_resolver
node_setlist_settings -->|"saves preferences"| node_settings_repo
node_resolver -->|"merges preferences"| node_settings_repo
node_settings_repo -->|"reads and writes"| node_database

click node_app "https://github.com/jlayne246/ariascore/blob/main/ariascore/App.tsx"
click node_dashboard "https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/DashboardScreen.tsx"
click node_library "https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/LibraryScreen.tsx"
click node_setlists "https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/SetlistsScreen.tsx"
click node_setlist_detail "https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/SetlistDetailScreen.tsx"
click node_metadata "https://github.com/jlayne246/ariascore/blob/main/ariascore/components/MetadataForm.tsx"
click node_file_utils "https://github.com/jlayne246/ariascore/blob/main/ariascore/utils/fileUtils.ts"
click node_reader_screen "https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/ReaderScreen.tsx"
click node_buffered_reader "https://github.com/jlayne246/ariascore/blob/main/ariascore/components/BufferedPDFViewer.tsx"
click node_pdf_bridge "https://github.com/jlayne246/ariascore/blob/main/ariascore/native/AriaScorePdfRenderer.ts"
click node_android_renderer "https://github.com/jlayne246/ariascore/blob/main/ariascore/android/app/src/main/java/com/jlayne246/ariascore/AriaScorePdfRendererModule.kt"
click node_ios_renderer "https://github.com/jlayne246/ariascore/blob/main/ariascore/ios/NativeModules/AriaScorePdfRenderer.swift"
click node_music_settings "https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/music/MusicSettingsScreen.tsx"
click node_setlist_settings "https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/setlists/SetlistSettingsScreen.tsx"
click node_resolver "https://github.com/jlayne246/ariascore/blob/main/ariascore/utils/settings/resolver.ts"
click node_settings_repo "https://github.com/jlayne246/ariascore/blob/main/ariascore/utils/settings/repository.ts"
click node_database "https://github.com/jlayne246/ariascore/blob/main/ariascore/utils/database.ts"
click node_backups "https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/BackupsScreen.tsx"

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_app,node_dashboard toneBlue
class node_library,node_setlists,node_setlist_detail,node_metadata,node_file_utils toneAmber
class node_reader_screen,node_buffered_reader,node_pdf_bridge,node_android_renderer,node_ios_renderer,node_music_settings,node_setlist_settings toneMint
class node_resolver,node_settings_repo,node_database,node_backups toneRose
class node_musician toneIndigo
```

## Components

### App navigation

- [App and routing](https://github.com/jlayne246/ariascore/blob/main/ariascore/App.tsx): `ariascore/App.tsx`
- [Dashboard](https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/DashboardScreen.tsx): `ariascore/screens/DashboardScreen.tsx`

### Score library

- [Score library](https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/LibraryScreen.tsx): `ariascore/screens/LibraryScreen.tsx`
- [Setlist management](https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/SetlistsScreen.tsx): `ariascore/screens/SetlistsScreen.tsx`
- [Setlist detail](https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/SetlistDetailScreen.tsx): `ariascore/screens/SetlistDetailScreen.tsx`
- [Score metadata](https://github.com/jlayne246/ariascore/blob/main/ariascore/components/MetadataForm.tsx): `ariascore/components/MetadataForm.tsx`
- [PDF file handling](https://github.com/jlayne246/ariascore/blob/main/ariascore/utils/fileUtils.ts): `ariascore/utils/fileUtils.ts`

### Score reading

- [Reader screen](https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/ReaderScreen.tsx): `ariascore/screens/ReaderScreen.tsx`
- [Buffered page reader](https://github.com/jlayne246/ariascore/blob/main/ariascore/components/BufferedPDFViewer.tsx): `ariascore/components/BufferedPDFViewer.tsx`
- [PDF renderer bridge](https://github.com/jlayne246/ariascore/blob/main/ariascore/native/AriaScorePdfRenderer.ts): `ariascore/native/AriaScorePdfRenderer.ts`
- [Android renderer](https://github.com/jlayne246/ariascore/blob/main/ariascore/android/app/src/main/java/com/jlayne246/ariascore/AriaScorePdfRendererModule.kt): `ariascore/android/app/src/main/java/com/jlayne246/ariascore/AriaScorePdfRendererModule.kt`
- [iOS renderer](https://github.com/jlayne246/ariascore/blob/main/ariascore/ios/NativeModules/AriaScorePdfRenderer.swift): `ariascore/ios/NativeModules/AriaScorePdfRenderer.swift`
- [Music preferences](https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/music/MusicSettingsScreen.tsx): `ariascore/screens/music/MusicSettingsScreen.tsx`
- [Setlist preferences](https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/setlists/SetlistSettingsScreen.tsx): `ariascore/screens/setlists/SetlistSettingsScreen.tsx`

### Local state

- [Preference resolution](https://github.com/jlayne246/ariascore/blob/main/ariascore/utils/settings/resolver.ts): `ariascore/utils/settings/resolver.ts`
- [Preference repository](https://github.com/jlayne246/ariascore/blob/main/ariascore/utils/settings/repository.ts): `ariascore/utils/settings/repository.ts`
- [SQLite data store](https://github.com/jlayne246/ariascore/blob/main/ariascore/utils/database.ts): `ariascore/utils/database.ts`
- [Backups](https://github.com/jlayne246/ariascore/blob/main/ariascore/screens/BackupsScreen.tsx): `ariascore/screens/BackupsScreen.tsx`

### Other components

- **Musician**

## Connections

- Musician → App and routing: opens app (evidence: `ariascore/App.tsx`)
- App and routing → Dashboard: routes to (evidence: `ariascore/App.tsx`)
- App and routing → Score library: routes to (evidence: `ariascore/App.tsx`)
- App and routing → Reader screen: routes to (evidence: `ariascore/App.tsx`)
- App and routing → Setlist management: routes to (evidence: `ariascore/App.tsx`)
- App and routing → Setlist detail: routes to (evidence: `ariascore/App.tsx`)
- App and routing → SQLite data store: initializes (evidence: `ariascore/App.tsx`)
- App and routing → PDF file handling: imports PDFs (evidence: `ariascore/App.tsx`)
- Dashboard → SQLite data store: reads and writes (evidence: `ariascore/screens/DashboardScreen.tsx`)
- Dashboard → Score metadata: opens form (evidence: `ariascore/screens/DashboardScreen.tsx`)
- Dashboard → PDF file handling: handles PDFs (evidence: `ariascore/screens/DashboardScreen.tsx`)
- Score library → SQLite data store: reads and writes (evidence: `ariascore/screens/LibraryScreen.tsx`)
- Score library → Score metadata: opens form (evidence: `ariascore/screens/LibraryScreen.tsx`)
- Score library → PDF file handling: handles PDFs (evidence: `ariascore/screens/LibraryScreen.tsx`)
- Setlist management → SQLite data store: manages setlists (evidence: `ariascore/screens/SetlistsScreen.tsx`)
- Setlist detail → SQLite data store: loads setlist (evidence: `ariascore/screens/SetlistDetailScreen.tsx`)
- Setlist detail → Score metadata: edits score (evidence: `ariascore/screens/SetlistDetailScreen.tsx`)
- Reader screen → Buffered page reader: renders with (evidence: `ariascore/screens/ReaderScreen.tsx`)
- Reader screen → SQLite data store: loads score state (evidence: `ariascore/screens/ReaderScreen.tsx`)
- Buffered page reader → PDF renderer bridge: requests page renders (evidence: `ariascore/components/BufferedPDFViewer.tsx`)
- Buffered page reader → SQLite data store: reads bookmarks (evidence: `ariascore/components/BufferedPDFViewer.tsx`)
- PDF renderer bridge → Android renderer: dispatches natively
- PDF renderer bridge → iOS renderer: dispatches natively
- Reader screen → Preference resolution: loads preferences (evidence: `ariascore/screens/ReaderScreen.tsx`)
- Music preferences → Preference resolution: resolves preferences (evidence: `ariascore/screens/music/MusicSettingsScreen.tsx`)
- Music preferences → Preference repository: saves preferences (evidence: `ariascore/screens/music/MusicSettingsScreen.tsx`)
- Setlist preferences → Preference resolution: resolves preferences (evidence: `ariascore/screens/setlists/SetlistSettingsScreen.tsx`)
- Setlist preferences → Preference repository: saves preferences (evidence: `ariascore/screens/setlists/SetlistSettingsScreen.tsx`)
- Preference resolution → Preference repository: merges preferences (evidence: `ariascore/utils/settings/resolver.ts`)
- Preference repository → SQLite data store: reads and writes (evidence: `ariascore/utils/settings/repository.ts`)
