# keepcoolch/dropzonefilesharing architecture

> Architecture diagram of the GitHub repository keepcoolch/dropzonefilesharing, 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/keepcoolch/dropzonefilesharing
- Repository: https://github.com/keepcoolch/dropzonefilesharing

## Overview

Dropzone File Sharing is a PHP file-transfer application: users select files or folders, upload them resumably, and receive a protected, expiring download link or send it by email. Admins manage uploads, settings, and user accounts. The map follows the evidenced browser-to-upload and link-download paths; README-described ZIP finalization and admin capabilities are included, but their unsampled wiring is not inferred. State is file-backed JSON and filesystem storage, with SMTP as an optional integration.

Main entry points: [`upload.php`](https://github.com/keepcoolch/dropzonefilesharing/blob/main/upload.php) (Upload endpoint), [`admin.php`](https://github.com/keepcoolch/dropzonefilesharing/blob/main/admin.php) (Admin panel), [`js/main.js`](https://github.com/keepcoolch/dropzonefilesharing/blob/main/js/main.js) (Chunk transfer client), [`download.php`](https://github.com/keepcoolch/dropzonefilesharing/blob/main/download.php) (Protected download)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sharing["Sharing workflow"]
  node_browser["Upload interface<br/>[index.php]"]
  node_uploadclient["Chunk transfer client<br/>[main.js]"]
  node_uploadapi["Upload endpoint<br/>[upload.php]"]
  node_zip["Folder ZIP creation<br/>[upload.php]"]
  node_link["Download link<br/>[upload.php]"]
  node_download["Protected download<br/>[download.php]"]
  node_uploadstore[("Uploaded files<br/>[config.php]")]
  node_metadata[("Upload metadata<br/>[config.php]")]
  node_verify["Email verification<br/>[verify.php]"]
  node_emailcleanup["Email cleanup"]
end

subgraph group_admin["Administration"]
  node_adminui["Admin panel<br/>[admin.php]"]
  node_adminfile["Admin download<br/>[admin_download.php]"]
  node_userentry["User sign-in<br/>[index.php]"]
  node_userstore[("User accounts")]
end

subgraph group_core["Shared services"]
  node_config["Configuration<br/>[config.php]"]
  node_helpers["Shared helpers<br/>[helpers.php]"]
  node_language["Translations<br/>[language.php]"]
  node_diskcheck["Disk capacity check"]
end

subgraph group_integrations["External integrations"]
  node_smtp(("SMTP server"))
end

node_sender(("Uploader"))
node_recipient(("Link recipient"))
node_adminactor(("Administrator"))
node_emailactor(("Email recipient"))

node_sender -->|"selects files"| node_browser
node_browser -->|"starts upload"| node_uploadclient
node_uploadclient -->|"checks capacity"| node_diskcheck
node_uploadclient -->|"sends chunks"| node_uploadapi
node_uploadapi -->|"stages files"| node_uploadstore
node_uploadapi -->|"finalizes folders"| node_zip
node_uploadapi -->|"records link"| node_metadata
node_uploadapi -->|"returns link"| node_link
node_link -->|"shares access"| node_recipient
node_recipient -->|"opens link"| node_download
node_download -->|"reads token"| node_metadata
node_download -->|"serves file"| node_uploadstore
node_adminactor -->|"manages service"| node_adminui
node_adminui -->|"manages uploads"| node_metadata
node_adminui -->|"updates settings"| node_config
node_adminui -->|"manages accounts"| node_userstore
node_adminui -->|"downloads upload"| node_adminfile
node_adminfile -->|"streams file"| node_uploadstore
node_sender -.->|"signs in"| node_userentry
node_userentry -.->|"checks account"| node_userstore
node_verify -->|"checks verification"| node_metadata
node_verify -->|"sends mail"| node_smtp
node_smtp -->|"delivers message"| node_emailactor
node_uploadclient -->|"cleans up"| node_emailcleanup
node_browser -->|"loads translations"| node_language
node_uploadapi -->|"uses utilities"| node_helpers
node_download -->|"loads translations"| node_language

click node_browser "https://github.com/keepcoolch/dropzonefilesharing/blob/main/index.php"
click node_uploadclient "https://github.com/keepcoolch/dropzonefilesharing/blob/main/js/main.js"
click node_uploadapi "https://github.com/keepcoolch/dropzonefilesharing/blob/main/upload.php"
click node_zip "https://github.com/keepcoolch/dropzonefilesharing/blob/main/upload.php"
click node_link "https://github.com/keepcoolch/dropzonefilesharing/blob/main/upload.php"
click node_download "https://github.com/keepcoolch/dropzonefilesharing/blob/main/download.php"
click node_uploadstore "https://github.com/keepcoolch/dropzonefilesharing/blob/main/inc/config.php"
click node_metadata "https://github.com/keepcoolch/dropzonefilesharing/blob/main/inc/config.php"
click node_adminui "https://github.com/keepcoolch/dropzonefilesharing/blob/main/admin.php"
click node_adminfile "https://github.com/keepcoolch/dropzonefilesharing/blob/main/admin_download.php"
click node_userentry "https://github.com/keepcoolch/dropzonefilesharing/blob/main/index.php"
click node_userstore "https://github.com/keepcoolch/dropzonefilesharing/tree/main/inc"
click node_config "https://github.com/keepcoolch/dropzonefilesharing/blob/main/inc/config.php"
click node_helpers "https://github.com/keepcoolch/dropzonefilesharing/blob/main/inc/helpers.php"
click node_language "https://github.com/keepcoolch/dropzonefilesharing/blob/main/inc/language.php"
click node_diskcheck "https://github.com/keepcoolch/dropzonefilesharing/blob/main/check_disk_space.php"
click node_verify "https://github.com/keepcoolch/dropzonefilesharing/blob/main/verify.php"
click node_emailcleanup "https://github.com/keepcoolch/dropzonefilesharing/blob/main/delete_emailadress.php"

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_browser,node_uploadclient,node_uploadapi,node_zip,node_link,node_download,node_uploadstore,node_metadata,node_verify,node_emailcleanup toneBlue
class node_adminui,node_adminfile,node_userentry,node_userstore toneAmber
class node_config,node_helpers,node_language,node_diskcheck toneMint
class node_smtp toneRose
class node_sender,node_recipient,node_adminactor,node_emailactor toneIndigo
```

## Components

### Sharing workflow

- [Upload interface](https://github.com/keepcoolch/dropzonefilesharing/blob/main/index.php): `index.php`
- [Chunk transfer client](https://github.com/keepcoolch/dropzonefilesharing/blob/main/js/main.js): `js/main.js`
- [Upload endpoint](https://github.com/keepcoolch/dropzonefilesharing/blob/main/upload.php): `upload.php`
- [Folder ZIP creation](https://github.com/keepcoolch/dropzonefilesharing/blob/main/upload.php): `upload.php`
- [Download link](https://github.com/keepcoolch/dropzonefilesharing/blob/main/upload.php): `upload.php`
- [Protected download](https://github.com/keepcoolch/dropzonefilesharing/blob/main/download.php): `download.php`
- [Uploaded files](https://github.com/keepcoolch/dropzonefilesharing/blob/main/inc/config.php): `inc/config.php`
- [Upload metadata](https://github.com/keepcoolch/dropzonefilesharing/blob/main/inc/config.php): `inc/config.php`
- [Email verification](https://github.com/keepcoolch/dropzonefilesharing/blob/main/verify.php): `verify.php`
- [Email cleanup](https://github.com/keepcoolch/dropzonefilesharing/blob/main/delete_emailadress.php): `delete_emailadress.php`

### Administration

- [Admin panel](https://github.com/keepcoolch/dropzonefilesharing/blob/main/admin.php): `admin.php`
- [Admin download](https://github.com/keepcoolch/dropzonefilesharing/blob/main/admin_download.php): `admin_download.php`
- [User sign-in](https://github.com/keepcoolch/dropzonefilesharing/blob/main/index.php): `index.php`
- [User accounts](https://github.com/keepcoolch/dropzonefilesharing/tree/main/inc): `inc`

### Shared services

- [Configuration](https://github.com/keepcoolch/dropzonefilesharing/blob/main/inc/config.php): `inc/config.php`
- [Shared helpers](https://github.com/keepcoolch/dropzonefilesharing/blob/main/inc/helpers.php): `inc/helpers.php`
- [Translations](https://github.com/keepcoolch/dropzonefilesharing/blob/main/inc/language.php): `inc/language.php`
- [Disk capacity check](https://github.com/keepcoolch/dropzonefilesharing/blob/main/check_disk_space.php): `check_disk_space.php`

### External integrations

- **SMTP server**

### Other components

- **Uploader**
- **Link recipient**
- **Administrator**
- **Email recipient**

## Connections

- Uploader → Upload interface: selects files
- Upload interface → Chunk transfer client: starts upload
- Chunk transfer client → Disk capacity check: checks capacity
- Chunk transfer client → Upload endpoint: sends chunks
- Upload endpoint → Uploaded files: stages files
- Upload endpoint → Folder ZIP creation: finalizes folders
- Upload endpoint → Upload metadata: records link
- Upload endpoint → Download link: returns link
- Download link → Link recipient: shares access
- Link recipient → Protected download: opens link
- Protected download → Upload metadata: reads token
- Protected download → Uploaded files: serves file
- Administrator → Admin panel: manages service
- Admin panel → Upload metadata: manages uploads
- Admin panel → Configuration: updates settings
- Admin panel → User accounts: manages accounts
- Admin panel → Admin download: downloads upload
- Admin download → Uploaded files: streams file
- Uploader → User sign-in: signs in
- User sign-in → User accounts: checks account
- Email verification → Upload metadata: checks verification
- Email verification → SMTP server: sends mail
- SMTP server → Email recipient: delivers message
- Chunk transfer client → Email cleanup: cleans up
- Upload interface → Translations: loads translations
- Upload endpoint → Shared helpers: uses utilities
- Protected download → Translations: loads translations
