# nauvalunesa/cloudshare architecture

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

- Interactive diagram: https://gitdiagram.com/nauvalunesa/cloudshare
- Repository: https://github.com/nauvalunesa/cloudshare

## Overview

CloudShare is a zero-knowledge file-sharing platform with a browser-facing dashboard and several adjacent sharing tools. The primary workflow is client-side encryption, upload and storage of encrypted files, then retrieval and client-side verification/decryption. The application is largely implemented in two monolithic FastAPI files: main.py is the documented default, while main_storagebox.py is a storagebox variant. The README documents several capabilities whose implementation details are not shown in the excerpts, so those links are documented relationships rather than inspected call paths.

Main entry points: [`main.py`](https://github.com/nauvalunesa/cloudshare/blob/main/main.py) (Sharing API), [`index.html`](https://github.com/nauvalunesa/cloudshare/blob/main/index.html) (Client Encryption), [`drive.html`](https://github.com/nauvalunesa/cloudshare/blob/main/drive.html) (Drive Dashboard), [`filemanager.html`](https://github.com/nauvalunesa/cloudshare/blob/main/filemanager.html) (File Manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sharing["Encrypted Sharing"]
  node_main["Sharing API<br/>[main.py]"]
  node_browser_encryption["Client Encryption<br/>[index.html]"]
  node_encrypted_storage[("Encrypted File Storage")]
  node_storagebox_api["Storagebox Variant<br/>[main_storagebox.py]"]
end

subgraph group_drive["Drive Management"]
  node_drive_ui["Drive Dashboard<br/>[drive.html]"]
  node_file_manager_ui["File Manager<br/>[filemanager.html]"]
  node_server_files[("Server Filesystem")]
  node_login_ui["Login<br/>[login.html]"]
end

subgraph group_tools["Sharing Tools"]
  node_short_links["URL Shortener<br/>[main.py]"]
  node_bio_links["Bio Links<br/>[main.py]"]
  node_bio_viewer["Bio Link Viewer"]
  node_snippets["Code Snippets<br/>[main.py]"]
  node_snippet_viewer["Snippet Viewer"]
end

subgraph group_operations["Server Operations"]
  node_sftp_ui["SFTP Manager<br/>[sftpmanager.html]"]
  node_sftp_api["SFTP Operations<br/>[main.py]"]
  node_sftp_server["SFTP Server"]
end

node_user(("User"))

node_user -->|"selects files"| node_browser_encryption
node_browser_encryption -->|"uploads encrypted data"| node_main
node_main -->|"stores ciphertext"| node_encrypted_storage
node_main -->|"provides encrypted download"| node_browser_encryption
node_user -->|"signs in"| node_login_ui
node_login_ui -->|"authenticates"| node_main
node_user -->|"manages files"| node_drive_ui
node_drive_ui -->|"requests file actions"| node_main
node_user -->|"browses server files"| node_file_manager_ui
node_file_manager_ui -->|"requests file operations"| node_main
node_main -->|"browses or modifies"| node_server_files
node_user -->|"creates short links"| node_short_links
node_user -->|"creates bio page"| node_bio_links
node_bio_links -->|"serves page data"| node_bio_viewer
node_user -->|"shares code"| node_snippets
node_snippets -->|"serves viewer"| node_snippet_viewer
node_user -->|"manages remote files"| node_sftp_ui
node_sftp_ui -->|"requests transfers"| node_sftp_api
node_sftp_api -->|"transfers files"| node_sftp_server
node_main -.->|"alternative deployment"| node_storagebox_api

click node_main "https://github.com/nauvalunesa/cloudshare/blob/main/main.py"
click node_browser_encryption "https://github.com/nauvalunesa/cloudshare/blob/main/index.html"
click node_encrypted_storage "https://github.com/nauvalunesa/cloudshare/tree/main/storage"
click node_storagebox_api "https://github.com/nauvalunesa/cloudshare/blob/main/main_storagebox.py"
click node_drive_ui "https://github.com/nauvalunesa/cloudshare/blob/main/drive.html"
click node_file_manager_ui "https://github.com/nauvalunesa/cloudshare/blob/main/filemanager.html"
click node_login_ui "https://github.com/nauvalunesa/cloudshare/blob/main/login.html"
click node_short_links "https://github.com/nauvalunesa/cloudshare/blob/main/main.py"
click node_bio_links "https://github.com/nauvalunesa/cloudshare/blob/main/main.py"
click node_bio_viewer "https://github.com/nauvalunesa/cloudshare/blob/main/biolink_viewer.html"
click node_snippets "https://github.com/nauvalunesa/cloudshare/blob/main/main.py"
click node_snippet_viewer "https://github.com/nauvalunesa/cloudshare/blob/main/snippet_viewer.html"
click node_sftp_ui "https://github.com/nauvalunesa/cloudshare/blob/main/sftpmanager.html"
click node_sftp_api "https://github.com/nauvalunesa/cloudshare/blob/main/main.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_main,node_browser_encryption,node_encrypted_storage,node_storagebox_api,node_user toneBlue
class node_drive_ui,node_file_manager_ui,node_server_files,node_login_ui toneAmber
class node_short_links,node_bio_links,node_bio_viewer,node_snippets,node_snippet_viewer toneMint
class node_sftp_ui,node_sftp_api,node_sftp_server toneRose
```

## Components

### Encrypted Sharing

- [Sharing API](https://github.com/nauvalunesa/cloudshare/blob/main/main.py): `main.py`
- [Client Encryption](https://github.com/nauvalunesa/cloudshare/blob/main/index.html): `index.html`
- [Encrypted File Storage](https://github.com/nauvalunesa/cloudshare/tree/main/storage): `storage`
- [Storagebox Variant](https://github.com/nauvalunesa/cloudshare/blob/main/main_storagebox.py): `main_storagebox.py`

### Drive Management

- [Drive Dashboard](https://github.com/nauvalunesa/cloudshare/blob/main/drive.html): `drive.html`
- [File Manager](https://github.com/nauvalunesa/cloudshare/blob/main/filemanager.html): `filemanager.html`
- **Server Filesystem**
- [Login](https://github.com/nauvalunesa/cloudshare/blob/main/login.html): `login.html`

### Sharing Tools

- [URL Shortener](https://github.com/nauvalunesa/cloudshare/blob/main/main.py): `main.py`
- [Bio Links](https://github.com/nauvalunesa/cloudshare/blob/main/main.py): `main.py`
- [Bio Link Viewer](https://github.com/nauvalunesa/cloudshare/blob/main/biolink_viewer.html): `biolink_viewer.html`
- [Code Snippets](https://github.com/nauvalunesa/cloudshare/blob/main/main.py): `main.py`
- [Snippet Viewer](https://github.com/nauvalunesa/cloudshare/blob/main/snippet_viewer.html): `snippet_viewer.html`

### Server Operations

- [SFTP Manager](https://github.com/nauvalunesa/cloudshare/blob/main/sftpmanager.html): `sftpmanager.html`
- [SFTP Operations](https://github.com/nauvalunesa/cloudshare/blob/main/main.py): `main.py`
- **SFTP Server**

### Other components

- **User**

## Connections

- User → Client Encryption: selects files (evidence: `README.md`)
- Client Encryption → Sharing API: uploads encrypted data (evidence: `README.md`)
- Sharing API → Encrypted File Storage: stores ciphertext (evidence: `README.md`)
- Sharing API → Client Encryption: provides encrypted download (evidence: `README.md`)
- User → Login: signs in (evidence: `README.md`)
- Login → Sharing API: authenticates (evidence: `main.py`)
- User → Drive Dashboard: manages files (evidence: `README.md`)
- Drive Dashboard → Sharing API: requests file actions (evidence: `README.md`)
- User → File Manager: browses server files (evidence: `README.md`)
- File Manager → Sharing API: requests file operations (evidence: `README.md`)
- Sharing API → Server Filesystem: browses or modifies (evidence: `README.md`)
- User → URL Shortener: creates short links (evidence: `README.md`)
- User → Bio Links: creates bio page (evidence: `README.md`)
- Bio Links → Bio Link Viewer: serves page data (evidence: `main.py`)
- User → Code Snippets: shares code (evidence: `README.md`)
- Code Snippets → Snippet Viewer: serves viewer (evidence: `main.py`)
- User → SFTP Manager: manages remote files (evidence: `README.md`)
- SFTP Manager → SFTP Operations: requests transfers (evidence: `README.md`)
- SFTP Operations → SFTP Server: transfers files (evidence: `main.py`)
- Sharing API → Storagebox Variant: alternative deployment (evidence: `main_storagebox.py`)
