How sangketkit01/telegram-drive works
Telegram Cloud Drive is a self-hosted file manager: users authenticate in a Vue interface, organize and share files, and upload or retrieve file content through a Django API backed by metadata storage and Telegram MTProto. The graph separates authentication, drive operations, and chunk storage, while retaining upload, preview, and sharing capabilities. Some frontend views and backend routes were not sampled; those subsystems are represented by their known source paths, and unsupported call-level links are omitted.
Main entry points: views.py Drive API · api.js HTTP API client · index.js SPA routing · upload.js Upload queue
Components 21
Web application
- SPA routing
frontend/src/router/index.js - Login and registration
frontend/src/views/LoginView.vue - Shared-link view
frontend/src/views/SharedLinkView.vue - Drive workspace
frontend/src/views/DriveView.vue - HTTP API client
frontend/src/services/api.js - User feedback state
frontend/src/stores/feedback.js
Authentication
- Session state
frontend/src/stores/auth.js - Authentication endpoints
backend/authentication/views.py
Drive operations
- Drive state
frontend/src/stores/drive.js - Upload queue
frontend/src/stores/upload.js - Upload manager
frontend/src/components/feedback/UploadManager.vue - File preview
frontend/src/components/modals/PreviewModal.vue - PDF viewer
frontend/src/components/drive/PdfViewer.vue - Drive API
backend/drive/views.py - Sharing and permissions
backend/drive/permissions.py - Drive metadata models
backend/drive/models.py
Chunk storage
- Runtime configuration
backend/config/env_schema.py - Storage engine
backend/storage_engine/client.py
Other components
- Browser user
- Telegram MTProto
- PostgreSQL metadata
Connections 21
- Browser user → SPA routing: uses
README.md - SPA routing → Login and registration: routes to
frontend/src/router/index.js - SPA routing → Shared-link view: routes to
frontend/src/router/index.js - SPA routing → Drive workspace: routes to
frontend/src/router/index.js - Session state → HTTP API client: sends requests
frontend/src/stores/auth.js - Session state → User feedback state: reports status
frontend/src/stores/auth.js - Drive state → HTTP API client: sends requests
frontend/src/stores/drive.js - Drive state → User feedback state: reports status
frontend/src/stores/drive.js - Upload queue → HTTP API client: sends requests
frontend/src/stores/upload.js - Upload queue → Drive state: refreshes state
frontend/src/stores/upload.js - Upload queue → User feedback state: reports status
frontend/src/stores/upload.js - Upload manager → Upload queue: controls queue
frontend/src/components/feedback/UploadManager.vue - File preview → PDF viewer: renders PDF
frontend/src/components/modals/PreviewModal.vue - HTTP API client → Drive API: calls API
README.md - Authentication endpoints → HTTP API client: serves auth requests
- Drive API → Drive metadata models: reads and writes
backend/drive/views.py - Drive API → Sharing and permissions: checks access
backend/drive/views.py - Drive API → Storage engine: stores and retrieves chunks
backend/drive/views.py - Drive API → PostgreSQL metadata: persists metadata
README.md - Storage engine → Telegram MTProto: transfers chunks
README.md - Runtime configuration → Storage engine: configures backend
backend/storage_engine/client.py