# syamsuddin/my-cloud architecture

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

- Interactive diagram: https://gitdiagram.com/syamsuddin/my-cloud
- Repository: https://github.com/syamsuddin/my-cloud

## Overview

my-cloud is a Windows Explorer-style web client for an existing Nextcloud instance; Nextcloud remains the file, account, quota, and permission authority. The principal workflow is an employee signing in, browsing and manipulating files through the Explorer UI, and receiving results from the Laravel BFF. The graph includes documented sharing, favorites, trash, search, and editor capabilities. Sampled source confirms selected service/controller calls; unsampled wiring is represented only where supported by the README and file tree.

Main entry points: [`routes/bff.php`](https://github.com/syamsuddin/my-cloud/blob/main/routes/bff.php) (API routes), [`app/Services/Nextcloud/Dav.php`](https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Nextcloud/Dav.php) (WebDAV adapter), [`app/Services/Auth/AuthService.php`](https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Auth/AuthService.php) (Authentication), [`app/Services/Nextcloud/Ocs.php`](https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Nextcloud/Ocs.php) (OCS adapter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Explorer interface"]
  node_spa["Vue application<br/>[app.js]"]
  node_explorer["Explorer page<br/>[ExplorerPage.vue]"]
  node_stores["Explorer state<br/>[explorer.js]"]
  node_webapi["API client<br/>[client.js]"]
end

subgraph group_api["BFF API"]
  node_routes["API routes<br/>[bff.php]"]
  node_filesctl["File endpoints<br/>[FileController.php]"]
  node_sharectl["Share endpoints"]
  node_authctl["Auth endpoints<br/>[AuthController.php]"]
  node_uploadctl["Upload endpoints"]
  node_downloadctl["Download endpoints"]
  node_trashctl["Trash endpoints"]
  node_searchctl["Search endpoints"]
  node_editorctl["Editor endpoints"]
end

subgraph group_domain["File workflows"]
  node_filesvc["File operations<br/>[FileService.php]"]
  node_sharesvc["Sharing and favorites<br/>[ShareService.php]"]
  node_trashsvc["Trash operations<br/>[TrashService.php]"]
  node_searchsvc["Recursive search<br/>[SearchService.php]"]
  node_uploadsvc["Chunked uploads<br/>[ChunkedUpload.php]"]
  node_zipsvc["ZIP downloads<br/>[ZipStreamer.php]"]
  node_editorsvc["Editor integration<br/>[EditorService.php]"]
end

subgraph group_nc["Nextcloud access"]
  node_dav["WebDAV adapter<br/>[Dav.php]"]
  node_ocs["OCS adapter<br/>[Ocs.php]"]
  node_ncclient["Nextcloud client<br/>[NcClient.php]"]
end

subgraph group_state["Identity and audit"]
  node_authsvc["Authentication<br/>[AuthService.php]"]
  node_accounts[("Account records<br/>[NcAccount.php]")]
  node_audit["Audit logging<br/>[AuditLogger.php]"]
  node_auditdb[("Audit records<br/>[AuditLog.php]")]
end

node_employee(("Employee"))
node_nextcloud["Nextcloud server"]

node_employee -->|"uses"| node_spa
node_spa -->|"renders"| node_explorer
node_explorer -->|"updates state"| node_stores
node_explorer -->|"requests data"| node_webapi
node_webapi -->|"sends API calls"| node_routes
node_routes -->|"dispatches files"| node_filesctl
node_routes -->|"dispatches sharing"| node_sharectl
node_routes -->|"dispatches login"| node_authctl
node_routes -->|"dispatches uploads"| node_uploadctl
node_routes -->|"dispatches downloads"| node_downloadctl
node_routes -->|"dispatches trash"| node_trashctl
node_routes -->|"dispatches search"| node_searchctl
node_routes -->|"dispatches editor"| node_editorctl
node_filesctl -->|"calls"| node_filesvc
node_filesvc -->|"reads and writes"| node_dav
node_sharectl -->|"calls"| node_sharesvc
node_sharesvc -->|"manages shares"| node_ocs
node_trashctl -->|"calls"| node_trashsvc
node_trashsvc -->|"manages trash"| node_dav
node_searchctl -->|"calls"| node_searchsvc
node_searchsvc -->|"searches nodes"| node_dav
node_uploadctl -->|"calls"| node_uploadsvc
node_uploadsvc -->|"transfers chunks"| node_dav
node_downloadctl -->|"streams files"| node_dav
node_downloadctl -->|"builds ZIP"| node_zipsvc
node_zipsvc -->|"reads files"| node_dav
node_editorctl -->|"calls"| node_editorsvc
node_editorsvc -.->|"opens editor"| node_ocs
node_dav -->|"sends requests"| node_ncclient
node_ocs -->|"sends requests"| node_ncclient
node_ncclient -->|"WebDAV and OCS"| node_nextcloud
node_authctl -->|"calls"| node_authsvc
node_authsvc -->|"authenticates"| node_ocs
node_authsvc -->|"persists account"| node_accounts
node_authsvc -->|"records login"| node_audit
node_filesvc -->|"records actions"| node_audit
node_audit -->|"writes entries"| node_auditdb

click node_spa "https://github.com/syamsuddin/my-cloud/blob/main/resources/js/app.js"
click node_explorer "https://github.com/syamsuddin/my-cloud/blob/main/resources/js/pages/ExplorerPage.vue"
click node_stores "https://github.com/syamsuddin/my-cloud/blob/main/resources/js/stores/explorer.js"
click node_webapi "https://github.com/syamsuddin/my-cloud/blob/main/resources/js/api/client.js"
click node_routes "https://github.com/syamsuddin/my-cloud/blob/main/routes/bff.php"
click node_filesctl "https://github.com/syamsuddin/my-cloud/blob/main/app/Http/Controllers/Api/FileController.php"
click node_sharectl "https://github.com/syamsuddin/my-cloud/blob/main/app/Http/Controllers/Api/ShareController.php"
click node_authctl "https://github.com/syamsuddin/my-cloud/blob/main/app/Http/Controllers/Api/AuthController.php"
click node_uploadctl "https://github.com/syamsuddin/my-cloud/blob/main/app/Http/Controllers/Api/UploadController.php"
click node_downloadctl "https://github.com/syamsuddin/my-cloud/blob/main/app/Http/Controllers/Api/DownloadController.php"
click node_trashctl "https://github.com/syamsuddin/my-cloud/blob/main/app/Http/Controllers/Api/TrashController.php"
click node_searchctl "https://github.com/syamsuddin/my-cloud/blob/main/app/Http/Controllers/Api/SearchController.php"
click node_editorctl "https://github.com/syamsuddin/my-cloud/blob/main/app/Http/Controllers/Api/EditorController.php"
click node_filesvc "https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Files/FileService.php"
click node_sharesvc "https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Files/ShareService.php"
click node_trashsvc "https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Files/TrashService.php"
click node_searchsvc "https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Files/SearchService.php"
click node_uploadsvc "https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Nextcloud/ChunkedUpload.php"
click node_zipsvc "https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Files/ZipStreamer.php"
click node_editorsvc "https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Files/EditorService.php"
click node_dav "https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Nextcloud/Dav.php"
click node_ocs "https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Nextcloud/Ocs.php"
click node_ncclient "https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Nextcloud/NcClient.php"
click node_authsvc "https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Auth/AuthService.php"
click node_accounts "https://github.com/syamsuddin/my-cloud/blob/main/app/Models/NcAccount.php"
click node_audit "https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Audit/AuditLogger.php"
click node_auditdb "https://github.com/syamsuddin/my-cloud/blob/main/app/Models/AuditLog.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_spa,node_explorer,node_stores,node_webapi toneBlue
class node_routes,node_filesctl,node_sharectl,node_authctl,node_uploadctl,node_downloadctl,node_trashctl,node_searchctl,node_editorctl toneAmber
class node_filesvc,node_sharesvc,node_trashsvc,node_searchsvc,node_uploadsvc,node_zipsvc,node_editorsvc,node_nextcloud toneMint
class node_dav,node_ocs,node_ncclient toneRose
class node_authsvc,node_accounts,node_audit,node_auditdb,node_employee toneIndigo
```

## Components

### Explorer interface

- [Vue application](https://github.com/syamsuddin/my-cloud/blob/main/resources/js/app.js): `resources/js/app.js`
- [Explorer page](https://github.com/syamsuddin/my-cloud/blob/main/resources/js/pages/ExplorerPage.vue): `resources/js/pages/ExplorerPage.vue`
- [Explorer state](https://github.com/syamsuddin/my-cloud/blob/main/resources/js/stores/explorer.js): `resources/js/stores/explorer.js`
- [API client](https://github.com/syamsuddin/my-cloud/blob/main/resources/js/api/client.js): `resources/js/api/client.js`

### BFF API

- [API routes](https://github.com/syamsuddin/my-cloud/blob/main/routes/bff.php): `routes/bff.php`
- [File endpoints](https://github.com/syamsuddin/my-cloud/blob/main/app/Http/Controllers/Api/FileController.php): `app/Http/Controllers/Api/FileController.php`
- [Share endpoints](https://github.com/syamsuddin/my-cloud/blob/main/app/Http/Controllers/Api/ShareController.php): `app/Http/Controllers/Api/ShareController.php`
- [Auth endpoints](https://github.com/syamsuddin/my-cloud/blob/main/app/Http/Controllers/Api/AuthController.php): `app/Http/Controllers/Api/AuthController.php`
- [Upload endpoints](https://github.com/syamsuddin/my-cloud/blob/main/app/Http/Controllers/Api/UploadController.php): `app/Http/Controllers/Api/UploadController.php`
- [Download endpoints](https://github.com/syamsuddin/my-cloud/blob/main/app/Http/Controllers/Api/DownloadController.php): `app/Http/Controllers/Api/DownloadController.php`
- [Trash endpoints](https://github.com/syamsuddin/my-cloud/blob/main/app/Http/Controllers/Api/TrashController.php): `app/Http/Controllers/Api/TrashController.php`
- [Search endpoints](https://github.com/syamsuddin/my-cloud/blob/main/app/Http/Controllers/Api/SearchController.php): `app/Http/Controllers/Api/SearchController.php`
- [Editor endpoints](https://github.com/syamsuddin/my-cloud/blob/main/app/Http/Controllers/Api/EditorController.php): `app/Http/Controllers/Api/EditorController.php`

### File workflows

- [File operations](https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Files/FileService.php): `app/Services/Files/FileService.php`
- [Sharing and favorites](https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Files/ShareService.php): `app/Services/Files/ShareService.php`
- [Trash operations](https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Files/TrashService.php): `app/Services/Files/TrashService.php`
- [Recursive search](https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Files/SearchService.php): `app/Services/Files/SearchService.php`
- [Chunked uploads](https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Nextcloud/ChunkedUpload.php): `app/Services/Nextcloud/ChunkedUpload.php`
- [ZIP downloads](https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Files/ZipStreamer.php): `app/Services/Files/ZipStreamer.php`
- [Editor integration](https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Files/EditorService.php): `app/Services/Files/EditorService.php`

### Nextcloud access

- [WebDAV adapter](https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Nextcloud/Dav.php): `app/Services/Nextcloud/Dav.php`
- [OCS adapter](https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Nextcloud/Ocs.php): `app/Services/Nextcloud/Ocs.php`
- [Nextcloud client](https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Nextcloud/NcClient.php): `app/Services/Nextcloud/NcClient.php`

### Identity and audit

- [Authentication](https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Auth/AuthService.php): `app/Services/Auth/AuthService.php`
- [Account records](https://github.com/syamsuddin/my-cloud/blob/main/app/Models/NcAccount.php): `app/Models/NcAccount.php`
- [Audit logging](https://github.com/syamsuddin/my-cloud/blob/main/app/Services/Audit/AuditLogger.php): `app/Services/Audit/AuditLogger.php`
- [Audit records](https://github.com/syamsuddin/my-cloud/blob/main/app/Models/AuditLog.php): `app/Models/AuditLog.php`

### Other components

- **Employee**
- **Nextcloud server**

## Connections

- Employee → Vue application: uses
- Vue application → Explorer page: renders
- Explorer page → Explorer state: updates state
- Explorer page → API client: requests data
- API client → API routes: sends API calls
- API routes → File endpoints: dispatches files
- API routes → Share endpoints: dispatches sharing
- API routes → Auth endpoints: dispatches login
- API routes → Upload endpoints: dispatches uploads
- API routes → Download endpoints: dispatches downloads
- API routes → Trash endpoints: dispatches trash
- API routes → Search endpoints: dispatches search
- API routes → Editor endpoints: dispatches editor
- File endpoints → File operations: calls
- File operations → WebDAV adapter: reads and writes
- Share endpoints → Sharing and favorites: calls
- Sharing and favorites → OCS adapter: manages shares
- Trash endpoints → Trash operations: calls
- Trash operations → WebDAV adapter: manages trash
- Search endpoints → Recursive search: calls
- Recursive search → WebDAV adapter: searches nodes
- Upload endpoints → Chunked uploads: calls
- Chunked uploads → WebDAV adapter: transfers chunks
- Download endpoints → WebDAV adapter: streams files
- Download endpoints → ZIP downloads: builds ZIP
- ZIP downloads → WebDAV adapter: reads files
- Editor endpoints → Editor integration: calls
- Editor integration → OCS adapter: opens editor
- WebDAV adapter → Nextcloud client: sends requests
- OCS adapter → Nextcloud client: sends requests
- Nextcloud client → Nextcloud server: WebDAV and OCS
- Auth endpoints → Authentication: calls
- Authentication → OCS adapter: authenticates
- Authentication → Account records: persists account
- Authentication → Audit logging: records login
- File operations → Audit logging: records actions
- Audit logging → Audit records: writes entries
