How jeetrex17/tdrive works
TDrive is a desktop/mobile file manager and CLI that uses a user's Telegram account as drive storage. The principal workflow is to authenticate, select a personal or shared drive, organize or transfer files, and preview or stream them; the README also documents encrypted backup, mounts, live sync, and recovery. The graph combines those documented capabilities with sampled frontend bridge and photo-backup code. Several backend subsystem links are documented capabilities rather than inspected call paths, so those edges are dashed with no evidence path.
Main entry points: main.ts Desktop/mobile UI · app.ts Wails bindings · service.go File and folder operations · client.go Telegram client
Components 23
App and CLI
- Desktop/mobile UI
frontend/src/main.ts - Frontend API
frontend/src/api.ts - Wails bindings
frontend/bindings/TDrive/app.ts - Scriptable CLI
cmd/tdrive/main.go
Drive services
- Authentication
backend/auth/auth.go - File and folder operations
backend/services/file/service.go - Drive sharing
backend/services/channel/service.go - Vault encryption
backend/services/encryption/service.go - Drive projection
backend/projection/read.go
Telegram and state
- Telegram account
- Telegram client
backend/tgclient/client.go - Local SQLite state
backend/storage_sqlite.go - Live synchronization
backend/sync/sync.go
Gallery and media
- Photo gallery
backend/projection/gallery.go - Media streaming
backend/media/server.go - Image thumbnails
backend/thumbnail/generate.go
Backup and mount
- Backup controls
frontend/src/modules/photo-backup/controller.ts - Backup API
frontend/src/api/photo-backup.ts - Backup engine
backend/photobackup/engine.go - Mount controls
frontend/src/ui/mount/mount-controller.ts - Drive mount
backend/mountcontroller/controller.go - Local WebDAV
backend/mountdav/server.go
Other components
- User
Connections 30
- User → Desktop/mobile UI: uses
README.md - User → Scriptable CLI: scripts with
README.md - Desktop/mobile UI → Frontend API: requests
- Frontend API → Wails bindings: invokes
- Wails bindings → Authentication: dispatches to
- Wails bindings → File and folder operations: dispatches to
- Scriptable CLI → File and folder operations: runs transfers
- Authentication → Telegram account: authenticates with
- File and folder operations → Telegram client: transfers through
- Telegram client → Telegram account: reads and writes
README.md - Drive sharing → Telegram account: hosts shared drives
README.md - File and folder operations → Drive projection: updates drive state
- Drive projection → Local SQLite state: persists state
- Live synchronization → Telegram account: observes activity
README.md - Live synchronization → Local SQLite state: rebuilds local state
README.md - Vault encryption → File and folder operations: encrypts contents
README.md - Desktop/mobile UI → Photo gallery: browses photos
README.md - Photo gallery → Telegram client: loads media
- Desktop/mobile UI → Media streaming: streams previews
README.md - Media streaming → Telegram client: streams from
README.md - Media streaming → Image thumbnails: generates previews
- Desktop/mobile UI → Backup controls: configures backup
README.md - Backup controls → Backup API: calls
frontend/src/modules/photo-backup/controller.ts - Backup API → Wails bindings: invokes
frontend/src/api/photo-backup.ts - Wails bindings → Backup engine: dispatches to
- Backup engine → Telegram client: uploads assets
- Desktop/mobile UI → Mount controls: controls
README.md - Mount controls → Drive mount: requests mount
- Drive mount → Local WebDAV: serves endpoint
README.md - Local WebDAV → User: exposes mounted drive
README.md