# charleswest775/openextract architecture

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

- Interactive diagram: https://gitdiagram.com/charleswest775/openextract
- Repository: https://github.com/charleswest775/openextract

## Overview

OpenExtract is a local desktop app for opening iPhone backups and browsing or exporting their contents. The main workflow runs from choosing and unlocking a backup, through the Electron/sidecar boundary, to extraction and presentation in explorers, search, and timeline views. The README documents the product capabilities; sampled source and the SOURCE INDEX support the application, IPC, and several internal links. Some engine-to-UI connections are documented at the feature level rather than shown in sampled calls, so those links are cited to the README.

Main entry points: [`python/main.py`](https://github.com/charleswest775/openextract/blob/main/python/main.py) (Engine RPC), [`src/hooks/useTimeline.ts`](https://github.com/charleswest775/openextract/blob/main/src/hooks/useTimeline.ts) (Unified timeline), [`src/App.tsx`](https://github.com/charleswest775/openextract/blob/main/src/App.tsx) (App shell), [`electron/main.ts`](https://github.com/charleswest775/openextract/blob/main/electron/main.ts) (Electron main)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop workflow"]
  node_app["App shell<br/>[App.tsx]"]
  node_backupflow["Open backup<br/>[BackupFlow.tsx]"]
  node_ipc["Sidecar IPC<br/>[ipc.ts]"]
  node_electron["Electron main<br/>[main.ts]"]
  node_sidecar["Sidecar bridge<br/>[sidecar.ts]"]
end

subgraph group_engine["Backup engine"]
  node_engine_rpc["Engine RPC<br/>[main.py]"]
  node_backup_access["Backup access<br/>[device_backup.py]"]
  node_messages["Messages<br/>[messages.py]"]
  node_whatsapp["WhatsApp<br/>[whatsapp.py]"]
  node_photos["Photos<br/>[photos.py]"]
  node_people_export["People history export<br/>[person_export.py]"]
  node_other_extractors["Other extractors"]
end

subgraph group_browse["Browse and search"]
  node_explorers["Content explorers"]
  node_timeline["Unified timeline<br/>[useTimeline.ts]"]
  node_timeline_view["Timeline view<br/>[TimelineView.tsx]"]
  node_people["People history<br/>[people.ts]"]
  node_search_ui["Search results<br/>[SearchResults.tsx]"]
  node_search_logic["Search matching<br/>[search.ts]"]
end

subgraph group_exports["Export and integration"]
  node_save_data["Save formats<br/>[saveData.ts]"]
  node_pdf_export["PDF export<br/>[pdfExport.ts]"]
  node_local_files["Local files<br/>[localMedia.ts]"]
end

node_user(("Backup owner"))

node_user -->|"opens app"| node_app
node_app -->|"starts backup flow"| node_backupflow
node_backupflow -->|"requests backup data"| node_ipc
node_ipc -->|"calls bridge"| node_electron
node_electron -->|"dispatches calls"| node_sidecar
node_sidecar -.->|"forwards RPC"| node_engine_rpc
node_engine_rpc -->|"opens backups"| node_backup_access
node_engine_rpc -->|"dispatches extraction"| node_messages
node_engine_rpc -->|"dispatches extraction"| node_whatsapp
node_engine_rpc -->|"dispatches extraction"| node_photos
node_engine_rpc -.->|"supports export"| node_people_export
node_engine_rpc -->|"dispatches extraction"| node_other_extractors
node_app -->|"shows backup content"| node_explorers
node_explorers -.->|"offers combined history"| node_timeline
node_timeline -->|"loads backup records"| node_ipc
node_timeline -.->|"provides timeline data"| node_timeline_view
node_timeline -->|"uses contact grouping"| node_people
node_search_ui -->|"shows matching records"| node_timeline
node_search_ui -->|"uses query matching"| node_search_logic
node_app -.->|"offers backup search"| node_search_ui
node_explorers -.->|"exports selected content"| node_save_data
node_electron -->|"handles PDF requests"| node_pdf_export
node_explorers -.->|"exports as PDF"| node_pdf_export
node_electron -.->|"serves local media"| node_local_files

click node_app "https://github.com/charleswest775/openextract/blob/main/src/App.tsx"
click node_backupflow "https://github.com/charleswest775/openextract/blob/main/src/components/backup/BackupFlow.tsx"
click node_ipc "https://github.com/charleswest775/openextract/blob/main/src/lib/ipc.ts"
click node_electron "https://github.com/charleswest775/openextract/blob/main/electron/main.ts"
click node_sidecar "https://github.com/charleswest775/openextract/blob/main/electron/sidecar.ts"
click node_engine_rpc "https://github.com/charleswest775/openextract/blob/main/python/main.py"
click node_backup_access "https://github.com/charleswest775/openextract/blob/main/python/device_backup.py"
click node_messages "https://github.com/charleswest775/openextract/blob/main/python/messages.py"
click node_whatsapp "https://github.com/charleswest775/openextract/blob/main/python/whatsapp.py"
click node_photos "https://github.com/charleswest775/openextract/blob/main/python/photos.py"
click node_people_export "https://github.com/charleswest775/openextract/blob/main/python/person_export.py"
click node_other_extractors "https://github.com/charleswest775/openextract/tree/main/python"
click node_explorers "https://github.com/charleswest775/openextract/tree/main/src/components/explore"
click node_timeline "https://github.com/charleswest775/openextract/blob/main/src/hooks/useTimeline.ts"
click node_timeline_view "https://github.com/charleswest775/openextract/blob/main/src/components/timeline/TimelineView.tsx"
click node_people "https://github.com/charleswest775/openextract/blob/main/src/lib/people.ts"
click node_search_ui "https://github.com/charleswest775/openextract/blob/main/src/components/search/SearchResults.tsx"
click node_search_logic "https://github.com/charleswest775/openextract/blob/main/src/lib/search.ts"
click node_save_data "https://github.com/charleswest775/openextract/blob/main/src/lib/saveData.ts"
click node_pdf_export "https://github.com/charleswest775/openextract/blob/main/electron/pdfExport.ts"
click node_local_files "https://github.com/charleswest775/openextract/blob/main/electron/localMedia.ts"

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_backupflow,node_ipc,node_electron,node_sidecar toneBlue
class node_engine_rpc,node_backup_access,node_messages,node_whatsapp,node_photos,node_people_export,node_other_extractors toneAmber
class node_explorers,node_timeline,node_timeline_view,node_people,node_search_ui,node_search_logic toneMint
class node_save_data,node_pdf_export,node_local_files toneRose
class node_user toneIndigo
```

## Components

### Desktop workflow

- [App shell](https://github.com/charleswest775/openextract/blob/main/src/App.tsx): `src/App.tsx`
- [Open backup](https://github.com/charleswest775/openextract/blob/main/src/components/backup/BackupFlow.tsx): `src/components/backup/BackupFlow.tsx`
- [Sidecar IPC](https://github.com/charleswest775/openextract/blob/main/src/lib/ipc.ts): `src/lib/ipc.ts`
- [Electron main](https://github.com/charleswest775/openextract/blob/main/electron/main.ts): `electron/main.ts`
- [Sidecar bridge](https://github.com/charleswest775/openextract/blob/main/electron/sidecar.ts): `electron/sidecar.ts`

### Backup engine

- [Engine RPC](https://github.com/charleswest775/openextract/blob/main/python/main.py): `python/main.py`
- [Backup access](https://github.com/charleswest775/openextract/blob/main/python/device_backup.py): `python/device_backup.py`
- [Messages](https://github.com/charleswest775/openextract/blob/main/python/messages.py): `python/messages.py`
- [WhatsApp](https://github.com/charleswest775/openextract/blob/main/python/whatsapp.py): `python/whatsapp.py`
- [Photos](https://github.com/charleswest775/openextract/blob/main/python/photos.py): `python/photos.py`
- [People history export](https://github.com/charleswest775/openextract/blob/main/python/person_export.py): `python/person_export.py`
- [Other extractors](https://github.com/charleswest775/openextract/tree/main/python): `python`

### Browse and search

- [Content explorers](https://github.com/charleswest775/openextract/tree/main/src/components/explore): `src/components/explore`
- [Unified timeline](https://github.com/charleswest775/openextract/blob/main/src/hooks/useTimeline.ts): `src/hooks/useTimeline.ts`
- [Timeline view](https://github.com/charleswest775/openextract/blob/main/src/components/timeline/TimelineView.tsx): `src/components/timeline/TimelineView.tsx`
- [People history](https://github.com/charleswest775/openextract/blob/main/src/lib/people.ts): `src/lib/people.ts`
- [Search results](https://github.com/charleswest775/openextract/blob/main/src/components/search/SearchResults.tsx): `src/components/search/SearchResults.tsx`
- [Search matching](https://github.com/charleswest775/openextract/blob/main/src/lib/search.ts): `src/lib/search.ts`

### Export and integration

- [Save formats](https://github.com/charleswest775/openextract/blob/main/src/lib/saveData.ts): `src/lib/saveData.ts`
- [PDF export](https://github.com/charleswest775/openextract/blob/main/electron/pdfExport.ts): `electron/pdfExport.ts`
- [Local files](https://github.com/charleswest775/openextract/blob/main/electron/localMedia.ts): `electron/localMedia.ts`

### Other components

- **Backup owner**

## Connections

- Backup owner → App shell: opens app (evidence: `README.md`)
- App shell → Open backup: starts backup flow (evidence: `src/App.tsx`)
- Open backup → Sidecar IPC: requests backup data (evidence: `src/components/backup/BackupFlow.tsx`)
- Sidecar IPC → Electron main: calls bridge (evidence: `src/lib/ipc.ts`)
- Electron main → Sidecar bridge: dispatches calls (evidence: `electron/main.ts`)
- Sidecar bridge → Engine RPC: forwards RPC
- Engine RPC → Backup access: opens backups (evidence: `python/main.py`)
- Engine RPC → Messages: dispatches extraction (evidence: `python/main.py`)
- Engine RPC → WhatsApp: dispatches extraction (evidence: `python/main.py`)
- Engine RPC → Photos: dispatches extraction (evidence: `python/main.py`)
- Engine RPC → People history export: supports export (evidence: `python/main.py`)
- Engine RPC → Other extractors: dispatches extraction (evidence: `python/main.py`)
- App shell → Content explorers: shows backup content (evidence: `src/App.tsx`)
- Content explorers → Unified timeline: offers combined history
- Unified timeline → Sidecar IPC: loads backup records (evidence: `src/hooks/useTimeline.ts`)
- Unified timeline → Timeline view: provides timeline data
- Unified timeline → People history: uses contact grouping (evidence: `src/hooks/useTimeline.ts`)
- Search results → Unified timeline: shows matching records (evidence: `src/components/search/SearchResults.tsx`)
- Search results → Search matching: uses query matching (evidence: `src/components/search/SearchResults.tsx`)
- App shell → Search results: offers backup search
- Content explorers → Save formats: exports selected content
- Electron main → PDF export: handles PDF requests (evidence: `electron/main.ts`)
- Content explorers → PDF export: exports as PDF
- Electron main → Local files: serves local media (evidence: `electron/main.ts`)
