# crbr666/syncho-drive architecture

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

- Interactive diagram: https://gitdiagram.com/crbr666/syncho-drive
- Repository: https://github.com/crbr666/syncho-drive

## Overview

Synchro-Drive sets up and schedules a PowerShell job that copies a configured OneDrive folder to Google Drive using rclone. Setup covers rclone installation, Google OAuth configuration, source selection, and Windows Task Scheduler registration; the scheduled or manual sync then invokes rclone. The README also documents OAuth branding pages. Source excerpts were unavailable, so links reflect documented behavior only; the runtime `config.json` is described but is not present in the supplied tree.

Main entry points: [`Setup-Sync.ps1`](https://github.com/crbr666/syncho-drive/blob/master/Setup-Sync.ps1) (Setup script), [`Sync.ps1`](https://github.com/crbr666/syncho-drive/blob/master/Sync.ps1) (Sync script), [`docs/index.html`](https://github.com/crbr666/syncho-drive/blob/master/docs/index.html) (Home page), [`docs/privacy.html`](https://github.com/crbr666/syncho-drive/blob/master/docs/privacy.html) (Privacy page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Setup"]
  node_setup_script["Setup script<br/>[Setup-Sync.ps1]"]
  node_config_template["Config template"]
  node_winget["winget"]
  node_google_oauth["Google OAuth"]
  node_task_scheduler["Task Scheduler"]
  node_scheduled_task["Scheduled task"]
end

subgraph group_sync["Synchronization"]
  node_rclone["rclone"]
  node_sync_script["Sync script<br/>[Sync.ps1]"]
  node_onedrive_folder["OneDrive folder"]
  node_google_drive[("Google Drive")]
end

subgraph group_oauth_pages["OAuth Pages"]
  node_home_page["Home page<br/>[index.html]"]
  node_privacy_page["Privacy page<br/>[privacy.html]"]
  node_github_pages["GitHub Pages"]
end

node_user(("User"))
node_browser["Browser"]

node_user -->|"runs setup"| node_setup_script
node_user -->|"runs manually"| node_sync_script
node_setup_script -->|"installs rclone"| node_winget
node_setup_script -->|"configures OAuth"| node_google_oauth
node_google_oauth -->|"authorizes via"| node_browser
node_setup_script -->|"registers task"| node_task_scheduler
node_task_scheduler -->|"creates"| node_scheduled_task
node_scheduled_task -->|"runs weekly"| node_sync_script
node_sync_script -->|"runs sync"| node_rclone
node_rclone -->|"reads files"| node_onedrive_folder
node_rclone -->|"copies files"| node_google_drive
node_github_pages -->|"serves"| node_home_page
node_github_pages -->|"serves"| node_privacy_page

click node_setup_script "https://github.com/crbr666/syncho-drive/blob/master/Setup-Sync.ps1"
click node_config_template "https://github.com/crbr666/syncho-drive/blob/master/config.example.json"
click node_sync_script "https://github.com/crbr666/syncho-drive/blob/master/Sync.ps1"
click node_home_page "https://github.com/crbr666/syncho-drive/blob/master/docs/index.html"
click node_privacy_page "https://github.com/crbr666/syncho-drive/blob/master/docs/privacy.html"

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_setup_script,node_config_template,node_winget,node_google_oauth,node_task_scheduler,node_scheduled_task,node_user,node_browser toneBlue
class node_rclone,node_sync_script,node_onedrive_folder,node_google_drive toneAmber
class node_home_page,node_privacy_page,node_github_pages toneMint
```

## Components

### Setup

- [Setup script](https://github.com/crbr666/syncho-drive/blob/master/Setup-Sync.ps1): `Setup-Sync.ps1`
- [Config template](https://github.com/crbr666/syncho-drive/blob/master/config.example.json): `config.example.json`
- **winget**
- **Google OAuth**
- **Task Scheduler**
- **Scheduled task**

### Synchronization

- **rclone**
- [Sync script](https://github.com/crbr666/syncho-drive/blob/master/Sync.ps1): `Sync.ps1`
- **OneDrive folder**
- **Google Drive**

### OAuth Pages

- [Home page](https://github.com/crbr666/syncho-drive/blob/master/docs/index.html): `docs/index.html`
- [Privacy page](https://github.com/crbr666/syncho-drive/blob/master/docs/privacy.html): `docs/privacy.html`
- **GitHub Pages**

### Other components

- **User**
- **Browser**

## Connections

- User → Setup script: runs setup
- User → Sync script: runs manually
- Setup script → winget: installs rclone
- Setup script → Google OAuth: configures OAuth
- Google OAuth → Browser: authorizes via
- Setup script → Task Scheduler: registers task
- Task Scheduler → Scheduled task: creates
- Scheduled task → Sync script: runs weekly
- Sync script → rclone: runs sync
- rclone → OneDrive folder: reads files
- rclone → Google Drive: copies files
- GitHub Pages → Home page: serves
- GitHub Pages → Privacy page: serves
