# miworky/mitenedownloader architecture

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

- Interactive diagram: https://gitdiagram.com/miworky/mitenedownloader
- Repository: https://github.com/miworky/mitenedownloader

## Overview

miteneDownloader is an Electron desktop app for retrieving photos and videos from Mitene’s browser site. The user logs in, opens a page, copies its embedded page data into the app, and loads a media list with filenames based on capture time and the first comment. Photos can be batch-downloaded to a chosen folder; video links are copied and downloaded individually. README documents these stages, but the renderer implementation is not shown, so its internal parsing and UI wiring are not asserted.

Main entry points: [`index.html`](https://github.com/miworky/mitenedownloader/blob/main/index.html) (App UI and media list), [`index.js`](https://github.com/miworky/mitenedownloader/blob/main/index.js) (Electron main process), [`preload.js`](https://github.com/miworky/mitenedownloader/blob/main/preload.js) (IPC bridge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop app"]
  node_electron_main["Electron main process<br/>[index.js]"]
  node_renderer["App UI and media list<br/>[index.html]"]
  node_preload["IPC bridge<br/>[preload.js]"]
end

subgraph group_mitene["Mitene access"]
  node_mitene_site["Mitene browser site"]
  node_page_data["Page data"]
  node_https_service["Mitene media service"]
end

subgraph group_downloads["Media downloads"]
  node_media_urls["Media URLs<br/>[index.html]"]
  node_folder_dialog["Folder chooser<br/>[index.js]"]
  node_batch_download["Photo batch download<br/>[index.js]"]
  node_video_download["Manual video download<br/>[index.html]"]
end

node_user(("User"))

node_user -->|"logs in"| node_mitene_site
node_mitene_site -->|"provides page"| node_page_data
node_user -->|"copies source data"| node_page_data
node_user -->|"pastes and loads"| node_renderer
node_electron_main -->|"loads window"| node_renderer
node_electron_main -->|"configures preload"| node_preload
node_renderer -.->|"uses bridge"| node_preload
node_renderer -.->|"lists media"| node_media_urls
node_user -->|"chooses photos"| node_renderer
node_renderer -.->|"requests batch"| node_electron_main
node_electron_main -->|"opens chooser"| node_folder_dialog
node_electron_main -->|"requests files"| node_https_service
node_electron_main -->|"writes files"| node_batch_download
node_user -->|"copies video link"| node_renderer
node_renderer -.->|"opens video link"| node_video_download

click node_electron_main "https://github.com/miworky/mitenedownloader/blob/main/index.js"
click node_renderer "https://github.com/miworky/mitenedownloader/blob/main/index.html"
click node_preload "https://github.com/miworky/mitenedownloader/blob/main/preload.js"
click node_media_urls "https://github.com/miworky/mitenedownloader/blob/main/index.html"
click node_folder_dialog "https://github.com/miworky/mitenedownloader/blob/main/index.js"
click node_batch_download "https://github.com/miworky/mitenedownloader/blob/main/index.js"
click node_video_download "https://github.com/miworky/mitenedownloader/blob/main/index.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_electron_main,node_renderer,node_preload,node_user toneBlue
class node_mitene_site,node_page_data,node_https_service toneAmber
class node_media_urls,node_folder_dialog,node_batch_download,node_video_download toneMint
```

## Components

### Desktop app

- [Electron main process](https://github.com/miworky/mitenedownloader/blob/main/index.js): `index.js`
- [App UI and media list](https://github.com/miworky/mitenedownloader/blob/main/index.html): `index.html`
- [IPC bridge](https://github.com/miworky/mitenedownloader/blob/main/preload.js): `preload.js`

### Mitene access

- **Mitene browser site**
- **Page data**
- **Mitene media service**

### Media downloads

- [Media URLs](https://github.com/miworky/mitenedownloader/blob/main/index.html): `index.html`
- [Folder chooser](https://github.com/miworky/mitenedownloader/blob/main/index.js): `index.js`
- [Photo batch download](https://github.com/miworky/mitenedownloader/blob/main/index.js): `index.js`
- [Manual video download](https://github.com/miworky/mitenedownloader/blob/main/index.html): `index.html`

### Other components

- **User**

## Connections

- User → Mitene browser site: logs in (evidence: `README.md`)
- Mitene browser site → Page data: provides page (evidence: `README.md`)
- User → Page data: copies source data (evidence: `README.md`)
- User → App UI and media list: pastes and loads (evidence: `README.md`)
- Electron main process → App UI and media list: loads window (evidence: `index.js`)
- Electron main process → IPC bridge: configures preload (evidence: `index.js`)
- App UI and media list → IPC bridge: uses bridge
- App UI and media list → Media URLs: lists media
- User → App UI and media list: chooses photos (evidence: `README.md`)
- App UI and media list → Electron main process: requests batch
- Electron main process → Folder chooser: opens chooser (evidence: `index.js`)
- Electron main process → Mitene media service: requests files (evidence: `index.js`)
- Electron main process → Photo batch download: writes files (evidence: `index.js`)
- User → App UI and media list: copies video link (evidence: `README.md`)
- App UI and media list → Manual video download: opens video link
