# xentraxx/googlephotostakeouthelper_neo architecture

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

- Interactive diagram: https://gitdiagram.com/xentraxx/googlephotostakeouthelper_neo
- Repository: https://github.com/xentraxx/googlephotostakeouthelper_neo

## Overview

Google Photos Takeout Helper Neo is a command-line migration tool that turns Google Takeout exports into organized photo libraries with restored dates, albums, and metadata. Its user workflow starts with exported ZIPs or extracted files, then processes media through discovery, grouping, date and album recovery, file organization, and metadata updates. The tree shows dedicated modules for these stages and supporting services; source excerpts for the runtime were not provided, so internal stage-to-stage links are marked unverified rather than asserted as calls.

Main entry points: [`lib/steps/main_pipeline.dart`](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/main_pipeline.dart) (Pipeline orchestration), [`bin/gpth.dart`](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/bin/gpth.dart) (CLI entry), [`lib/common/services/file_operations_services/zip_extraction_service.dart`](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/common/services/file_operations_services/zip_extraction_service.dart) (ZIP extraction), [`lib/steps/step_04_extract_dates/services/step_04_extract_dates_service.dart`](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_04_extract_dates/services/step_04_extract_dates_service.dart) (Recover dates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Input and discovery"]
  node_cli["CLI entry<br/>[gpth.dart]"]
  node_zip["ZIP extraction"]
  node_fixext["Fix extensions"]
  node_discover["Discover media"]
end

subgraph group_analysis["Media analysis"]
  node_merge["Merge media"]
  node_dates["Recover dates"]
  node_dateextract["Date extractors"]
  node_albums["Detect albums"]
  node_jsonmatch["JSON matching"]
end

subgraph group_organize["Organization and writing"]
  node_move["Organize files"]
  node_strategies["Album strategies"]
  node_exif["Write metadata"]
  node_creation["Update timestamps"]
end

subgraph group_shared["Shared services"]
  node_media["Media relationships"]
  node_pipeline["Pipeline orchestration<br/>[main_pipeline.dart]"]
  node_interactive["Interactive mode"]
  node_config["Processing configuration"]
end

node_user(("Takeout user"))
node_exiftool["ExifTool"]
node_fs[("Local files")]

node_user -->|"runs"| node_cli
node_cli -.->|"selects ZIPs"| node_zip
node_zip -->|"extracts then processes"| node_pipeline
node_cli -.->|"starts processing"| node_pipeline
node_pipeline -.->|"runs stage"| node_fixext
node_pipeline -.->|"runs stage"| node_discover
node_pipeline -.->|"runs stage"| node_merge
node_pipeline -.->|"runs stage"| node_dates
node_dates -.->|"uses extractors"| node_dateextract
node_pipeline -.->|"runs stage"| node_albums
node_albums -.->|"matches sidecars"| node_jsonmatch
node_pipeline -.->|"runs stage"| node_move
node_move -.->|"selects strategy"| node_strategies
node_pipeline -.->|"runs stage"| node_exif
node_pipeline -.->|"runs stage"| node_creation
node_exif -.->|"writes metadata"| node_exiftool
node_pipeline -.->|"organizes files"| node_fs
node_cli -.->|"offers interaction"| node_interactive
node_interactive -.->|"configures run"| node_config
node_pipeline -.->|"uses media services"| node_media

click node_cli "https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/bin/gpth.dart"
click node_zip "https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/common/services/file_operations_services/zip_extraction_service.dart"
click node_fixext "https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_01_fix_extensions/services/step_01_fix_extension_service.dart"
click node_discover "https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_02_discover_media/services/step_02_discover_media_service.dart"
click node_merge "https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_03_merge_media_entities/services/step_03_merge_media_entities_service.dart"
click node_dates "https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_04_extract_dates/services/step_04_extract_dates_service.dart"
click node_dateextract "https://github.com/xentraxx/googlephotostakeouthelper_neo/tree/master/lib/steps/step_04_extract_dates/date_extractors"
click node_albums "https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_05_find_albums/services/step_05_find_albums_service.dart"
click node_jsonmatch "https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/common/services/json_metadata_services/json_metadata_matcher_service.dart"
click node_move "https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_06_move_files/services/step_06_move_media_entity_service.dart"
click node_strategies "https://github.com/xentraxx/googlephotostakeouthelper_neo/tree/master/lib/steps/step_06_move_files/moving_strategies"
click node_exif "https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_07_write_exif/services/step_07_write_exif_service.dart"
click node_creation "https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_08_update_creation_time/services/step_08_update_creation_time_service.dart"
click node_media "https://github.com/xentraxx/googlephotostakeouthelper_neo/tree/master/lib/common/services/media_services"
click node_pipeline "https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/main_pipeline.dart"
click node_interactive "https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/common/services/interactive_mode_services/consolidated_interactive_service.dart"
click node_config "https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/common/models/processing_config_model.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_cli,node_zip,node_fixext,node_discover,node_user toneBlue
class node_merge,node_dates,node_dateextract,node_albums,node_jsonmatch,node_fs toneAmber
class node_move,node_strategies,node_exif,node_creation toneMint
class node_media,node_pipeline,node_interactive,node_config toneRose
class node_exiftool toneIndigo
```

## Components

### Input and discovery

- [CLI entry](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/bin/gpth.dart): `bin/gpth.dart`
- [ZIP extraction](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/common/services/file_operations_services/zip_extraction_service.dart): `lib/common/services/file_operations_services/zip_extraction_service.dart`
- [Fix extensions](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_01_fix_extensions/services/step_01_fix_extension_service.dart): `lib/steps/step_01_fix_extensions/services/step_01_fix_extension_service.dart`
- [Discover media](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_02_discover_media/services/step_02_discover_media_service.dart): `lib/steps/step_02_discover_media/services/step_02_discover_media_service.dart`

### Media analysis

- [Merge media](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_03_merge_media_entities/services/step_03_merge_media_entities_service.dart): `lib/steps/step_03_merge_media_entities/services/step_03_merge_media_entities_service.dart`
- [Recover dates](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_04_extract_dates/services/step_04_extract_dates_service.dart): `lib/steps/step_04_extract_dates/services/step_04_extract_dates_service.dart`
- [Date extractors](https://github.com/xentraxx/googlephotostakeouthelper_neo/tree/master/lib/steps/step_04_extract_dates/date_extractors): `lib/steps/step_04_extract_dates/date_extractors`
- [Detect albums](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_05_find_albums/services/step_05_find_albums_service.dart): `lib/steps/step_05_find_albums/services/step_05_find_albums_service.dart`
- [JSON matching](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/common/services/json_metadata_services/json_metadata_matcher_service.dart): `lib/common/services/json_metadata_services/json_metadata_matcher_service.dart`

### Organization and writing

- [Organize files](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_06_move_files/services/step_06_move_media_entity_service.dart): `lib/steps/step_06_move_files/services/step_06_move_media_entity_service.dart`
- [Album strategies](https://github.com/xentraxx/googlephotostakeouthelper_neo/tree/master/lib/steps/step_06_move_files/moving_strategies): `lib/steps/step_06_move_files/moving_strategies`
- [Write metadata](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_07_write_exif/services/step_07_write_exif_service.dart): `lib/steps/step_07_write_exif/services/step_07_write_exif_service.dart`
- [Update timestamps](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/step_08_update_creation_time/services/step_08_update_creation_time_service.dart): `lib/steps/step_08_update_creation_time/services/step_08_update_creation_time_service.dart`

### Shared services

- [Media relationships](https://github.com/xentraxx/googlephotostakeouthelper_neo/tree/master/lib/common/services/media_services): `lib/common/services/media_services`
- [Pipeline orchestration](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/steps/main_pipeline.dart): `lib/steps/main_pipeline.dart`
- [Interactive mode](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/common/services/interactive_mode_services/consolidated_interactive_service.dart): `lib/common/services/interactive_mode_services/consolidated_interactive_service.dart`
- [Processing configuration](https://github.com/xentraxx/googlephotostakeouthelper_neo/blob/master/lib/common/models/processing_config_model.dart): `lib/common/models/processing_config_model.dart`

### Other components

- **Takeout user**
- **ExifTool**
- **Local files**

## Connections

- Takeout user → CLI entry: runs (evidence: `README.md`)
- CLI entry → ZIP extraction: selects ZIPs
- ZIP extraction → Pipeline orchestration: extracts then processes (evidence: `README.md`)
- CLI entry → Pipeline orchestration: starts processing
- Pipeline orchestration → Fix extensions: runs stage
- Pipeline orchestration → Discover media: runs stage
- Pipeline orchestration → Merge media: runs stage
- Pipeline orchestration → Recover dates: runs stage
- Recover dates → Date extractors: uses extractors
- Pipeline orchestration → Detect albums: runs stage
- Detect albums → JSON matching: matches sidecars
- Pipeline orchestration → Organize files: runs stage
- Organize files → Album strategies: selects strategy
- Pipeline orchestration → Write metadata: runs stage
- Pipeline orchestration → Update timestamps: runs stage
- Write metadata → ExifTool: writes metadata
- Pipeline orchestration → Local files: organizes files
- CLI entry → Interactive mode: offers interaction
- Interactive mode → Processing configuration: configures run
- Pipeline orchestration → Media relationships: uses media services
