# jademind/slack-files-download architecture

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

- Interactive diagram: https://gitdiagram.com/jademind/slack-files-download
- Repository: https://github.com/jademind/slack-files-download

## Overview

This small command-line utility backs up files attached to messages in a Slack workspace JSON export. The user supplies an export directory and optional output-folder name; the script validates the export, discovers channel directories, reads each channel’s JSON messages, and downloads eligible attachments into per-channel folders. Existing files are skipped, enabling incremental backups. Progress is reported during processing. The map separates these runtime stages while keeping their shared implementation path. Relationships are based on the sampled script and README; the external Slack service is represented as the source of private file downloads.

Main entry points: [`slack-files-download.py`](https://github.com/jademind/slack-files-download/blob/main/slack-files-download.py) (Channel processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Backup user"))
node_cli["Command-line entry"]
node_validation["Export validation"]
node_discovery["Channel discovery"]
node_channel_processing["Channel processing"]
node_message_processing["Attachment processing"]
node_progress["Progress reporting"]
node_export["Slack export files"]
node_backup["Local backup files"]
node_slack["Slack file service"]

node_user -->|"runs"| node_cli
node_cli -->|"validates"| node_validation
node_cli -->|"discovers"| node_discovery
node_cli -->|"processes"| node_channel_processing
node_validation -->|"checks files"| node_export
node_discovery -->|"lists directories"| node_export
node_channel_processing -->|"reads messages"| node_export
node_channel_processing -->|"processes messages"| node_message_processing
node_channel_processing -->|"creates folders"| node_backup
node_message_processing -->|"downloads files"| node_slack
node_message_processing -->|"writes files"| node_backup
node_channel_processing -->|"reports progress"| node_progress
node_message_processing -->|"reports progress"| node_progress

click node_cli "https://github.com/jademind/slack-files-download/blob/main/slack-files-download.py"
click node_validation "https://github.com/jademind/slack-files-download/blob/main/slack-files-download.py"
click node_discovery "https://github.com/jademind/slack-files-download/blob/main/slack-files-download.py"
click node_channel_processing "https://github.com/jademind/slack-files-download/blob/main/slack-files-download.py"
click node_message_processing "https://github.com/jademind/slack-files-download/blob/main/slack-files-download.py"
click node_progress "https://github.com/jademind/slack-files-download/blob/main/slack-files-download.py"

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_user toneBlue
class node_cli,node_validation,node_discovery,node_channel_processing,node_message_processing,node_progress toneTeal
class node_export,node_backup,node_slack toneIndigo
```

## Components

### Other components

- **Backup user**
- [Command-line entry](https://github.com/jademind/slack-files-download/blob/main/slack-files-download.py): `slack-files-download.py`
- [Export validation](https://github.com/jademind/slack-files-download/blob/main/slack-files-download.py): `slack-files-download.py`
- [Channel discovery](https://github.com/jademind/slack-files-download/blob/main/slack-files-download.py): `slack-files-download.py`
- [Channel processing](https://github.com/jademind/slack-files-download/blob/main/slack-files-download.py): `slack-files-download.py`
- [Attachment processing](https://github.com/jademind/slack-files-download/blob/main/slack-files-download.py): `slack-files-download.py`
- [Progress reporting](https://github.com/jademind/slack-files-download/blob/main/slack-files-download.py): `slack-files-download.py`
- **Slack export files**
- **Local backup files**
- **Slack file service**

## Connections

- Backup user → Command-line entry: runs (evidence: `README.md`)
- Command-line entry → Export validation: validates (evidence: `slack-files-download.py`)
- Command-line entry → Channel discovery: discovers (evidence: `slack-files-download.py`)
- Command-line entry → Channel processing: processes (evidence: `slack-files-download.py`)
- Export validation → Slack export files: checks files (evidence: `slack-files-download.py`)
- Channel discovery → Slack export files: lists directories (evidence: `slack-files-download.py`)
- Channel processing → Slack export files: reads messages (evidence: `slack-files-download.py`)
- Channel processing → Attachment processing: processes messages (evidence: `slack-files-download.py`)
- Channel processing → Local backup files: creates folders (evidence: `slack-files-download.py`)
- Attachment processing → Slack file service: downloads files (evidence: `slack-files-download.py`)
- Attachment processing → Local backup files: writes files (evidence: `slack-files-download.py`)
- Channel processing → Progress reporting: reports progress (evidence: `slack-files-download.py`)
- Attachment processing → Progress reporting: reports progress (evidence: `slack-files-download.py`)
