# pradeeshwarrj/pamline-desktop architecture

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

- Interactive diagram: https://gitdiagram.com/pradeeshwarrj/pamline-desktop
- Repository: https://github.com/pradeeshwarrj/pamline-desktop

## Overview

pamline Desktop is a Tauri/Svelte desktop interface for taking passive-acoustic recordings through ecological analysis. The main workflow is project setup, recording preparation and checks, detection, review and calibration, then summaries and outputs; soundscape analysis is a separate branch. The UI calls a Rust command layer, which prepares the bundled analysis runtime and runs pamline jobs. The README documents product stages not visible in the sampled code; those workflow links cite the README. Unsampled implementation details and their internal calls are not inferred.

Main entry points: [`src-tauri/src/lib.rs`](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src-tauri/src/lib.rs) (Tauri command host), [`src/lib/backend/validation.svelte.ts`](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/backend/validation.svelte.ts) (Validation state and jobs), [`src/lib/screens/ProjectLive.svelte`](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/ProjectLive.svelte) (Project settings), [`src/lib/screens/ValidateLive.svelte`](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/ValidateLive.svelte) (Review samples)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_backend["Tauri frontend API<br/>[tauri.ts]"]
  node_validation_api["Validation state and jobs"]
end

subgraph group_prep["Project preparation"]
  node_project["Project settings<br/>[ProjectLive.svelte]"]
  node_standardize["Standardize audio"]
  node_scan["Scan recordings<br/>[ScanLive.svelte]"]
  node_filter["Filter audio<br/>[FilterLive.svelte]"]
end

subgraph group_detection["Detection and review"]
  node_detect["BirdNET detection<br/>[DetectLive.svelte]"]
  node_process["Process detections<br/>[ProcessLive.svelte]"]
  node_validate["Review samples"]
  node_calibrate["Calibrate thresholds"]
end

subgraph group_analysis["Ecological analysis"]
  node_occupancy["Occupancy histories"]
  node_activity["Activity and richness"]
  node_report["Reports<br/>[ReportLive.svelte]"]
  node_export["Data export<br/>[ExportLive.svelte]"]
  node_soundscape["Soundscape indices"]
end

subgraph group_engine["Analysis runtime"]
  node_tauri["Tauri command host<br/>[lib.rs]"]
  node_jobs["Job execution<br/>[jobs.rs]"]
  node_validation_rust["Validation file access<br/>[validation.rs]"]
  node_setup["First-launch setup<br/>[setup.rs]"]
  node_runtime["Runtime discovery<br/>[runtime.rs]"]
end

node_user(("Researcher"))
node_pamline["pamline analysis package"]

node_user -->|"configures"| node_project
node_project -->|"starts workflow"| node_standardize
node_standardize -->|"prepares recordings"| node_scan
node_scan -->|"checks recordings"| node_filter
node_filter -->|"feeds recordings"| node_detect
node_detect -->|"produces detections"| node_process
node_process -->|"samples detections"| node_validate
node_validate -->|"supplies verdicts"| node_calibrate
node_calibrate -->|"sets thresholds"| node_occupancy
node_calibrate -->|"sets thresholds"| node_activity
node_activity -->|"summarizes results"| node_report
node_occupancy -->|"summarizes results"| node_report
node_report -->|"packages results"| node_export
node_user -->|"runs workflow"| node_soundscape
node_project -.->|"uses commands"| node_backend
node_validate -->|"loads and saves"| node_validation_api
node_validation_api -->|"runs jobs"| node_backend
node_validation_api -->|"invokes commands"| node_tauri
node_tauri -->|"registers commands"| node_jobs
node_tauri -->|"registers commands"| node_validation_rust
node_tauri -->|"registers commands"| node_setup
node_setup -->|"locates runtime"| node_runtime
node_jobs -->|"runs analysis jobs"| node_pamline
node_validation_rust -.->|"supports validation jobs"| node_jobs

click node_project "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/ProjectLive.svelte"
click node_standardize "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/StandardizeLive.svelte"
click node_scan "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/ScanLive.svelte"
click node_filter "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/FilterLive.svelte"
click node_detect "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/DetectLive.svelte"
click node_process "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/ProcessLive.svelte"
click node_validate "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/ValidateLive.svelte"
click node_calibrate "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/CalibrateLive.svelte"
click node_occupancy "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/OccupancyLive.svelte"
click node_activity "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/ActivityLive.svelte"
click node_report "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/ReportLive.svelte"
click node_export "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/ExportLive.svelte"
click node_soundscape "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/SoundscapeLive.svelte"
click node_backend "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/backend/tauri.ts"
click node_validation_api "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/backend/validation.svelte.ts"
click node_tauri "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src-tauri/src/lib.rs"
click node_jobs "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src-tauri/src/jobs.rs"
click node_validation_rust "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src-tauri/src/validation.rs"
click node_setup "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src-tauri/src/setup.rs"
click node_runtime "https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src-tauri/src/runtime.rs"

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_backend,node_validation_api toneBlue
class node_project,node_standardize,node_scan,node_filter toneAmber
class node_detect,node_process,node_validate,node_calibrate toneMint
class node_occupancy,node_activity,node_report,node_export,node_soundscape toneRose
class node_tauri,node_jobs,node_validation_rust,node_setup,node_runtime,node_user,node_pamline toneIndigo
```

## Components

### Desktop interface

- [Tauri frontend API](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/backend/tauri.ts): `src/lib/backend/tauri.ts`
- [Validation state and jobs](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/backend/validation.svelte.ts): `src/lib/backend/validation.svelte.ts`

### Project preparation

- [Project settings](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/ProjectLive.svelte): `src/lib/screens/ProjectLive.svelte`
- [Standardize audio](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/StandardizeLive.svelte): `src/lib/screens/StandardizeLive.svelte`
- [Scan recordings](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/ScanLive.svelte): `src/lib/screens/ScanLive.svelte`
- [Filter audio](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/FilterLive.svelte): `src/lib/screens/FilterLive.svelte`

### Detection and review

- [BirdNET detection](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/DetectLive.svelte): `src/lib/screens/DetectLive.svelte`
- [Process detections](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/ProcessLive.svelte): `src/lib/screens/ProcessLive.svelte`
- [Review samples](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/ValidateLive.svelte): `src/lib/screens/ValidateLive.svelte`
- [Calibrate thresholds](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/CalibrateLive.svelte): `src/lib/screens/CalibrateLive.svelte`

### Ecological analysis

- [Occupancy histories](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/OccupancyLive.svelte): `src/lib/screens/OccupancyLive.svelte`
- [Activity and richness](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/ActivityLive.svelte): `src/lib/screens/ActivityLive.svelte`
- [Reports](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/ReportLive.svelte): `src/lib/screens/ReportLive.svelte`
- [Data export](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/ExportLive.svelte): `src/lib/screens/ExportLive.svelte`
- [Soundscape indices](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src/lib/screens/SoundscapeLive.svelte): `src/lib/screens/SoundscapeLive.svelte`

### Analysis runtime

- [Tauri command host](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Job execution](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src-tauri/src/jobs.rs): `src-tauri/src/jobs.rs`
- [Validation file access](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src-tauri/src/validation.rs): `src-tauri/src/validation.rs`
- [First-launch setup](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src-tauri/src/setup.rs): `src-tauri/src/setup.rs`
- [Runtime discovery](https://github.com/pradeeshwarrj/pamline-desktop/blob/main/src-tauri/src/runtime.rs): `src-tauri/src/runtime.rs`

### Other components

- **Researcher**
- **pamline analysis package**

## Connections

- Researcher → Project settings: configures (evidence: `README.md`)
- Project settings → Standardize audio: starts workflow (evidence: `README.md`)
- Standardize audio → Scan recordings: prepares recordings (evidence: `README.md`)
- Scan recordings → Filter audio: checks recordings (evidence: `README.md`)
- Filter audio → BirdNET detection: feeds recordings (evidence: `README.md`)
- BirdNET detection → Process detections: produces detections (evidence: `README.md`)
- Process detections → Review samples: samples detections (evidence: `README.md`)
- Review samples → Calibrate thresholds: supplies verdicts (evidence: `README.md`)
- Calibrate thresholds → Occupancy histories: sets thresholds (evidence: `README.md`)
- Calibrate thresholds → Activity and richness: sets thresholds (evidence: `README.md`)
- Activity and richness → Reports: summarizes results (evidence: `README.md`)
- Occupancy histories → Reports: summarizes results (evidence: `README.md`)
- Reports → Data export: packages results (evidence: `README.md`)
- Researcher → Soundscape indices: runs workflow (evidence: `README.md`)
- Project settings → Tauri frontend API: uses commands
- Review samples → Validation state and jobs: loads and saves (evidence: `src/lib/screens/ValidateLive.svelte`)
- Validation state and jobs → Tauri frontend API: runs jobs (evidence: `src/lib/backend/validation.svelte.ts`)
- Validation state and jobs → Tauri command host: invokes commands (evidence: `src/lib/backend/validation.svelte.ts`)
- Tauri command host → Job execution: registers commands (evidence: `src-tauri/src/lib.rs`)
- Tauri command host → Validation file access: registers commands (evidence: `src-tauri/src/lib.rs`)
- Tauri command host → First-launch setup: registers commands (evidence: `src-tauri/src/lib.rs`)
- First-launch setup → Runtime discovery: locates runtime (evidence: `src-tauri/src/setup.rs`)
- Job execution → pamline analysis package: runs analysis jobs
- Validation file access → Job execution: supports validation jobs
