A comprehensive cloud storage solution that leverages Telegram's infrastructure for file storage and management. Upload, organize, and access your files from anywhere using Telegram as the backend storage service.
TeleDrive is a full-stack application that transforms Telegram into your personal cloud storage system. The project consists of a Flutter frontend and a Node.js backend that acts as an intermediary between the application and Telegram's API. This enables users to securely store and manage their files through a familiar and intuitive interface.
-
Login Screen π
The login screen using Telegram authentication to securely access your drive.

-
Home Page - All Files π
Main dashboard showing all files with search and upload functionality.


-
Photos Gallery πΈ
Grid view of all images with thumbnail previews for quick browsing.

-
Documents Section π
Organized view of document files with type indicators and quick actions.

-
Video Gallery π₯
Built-in video player for previewing video content directly in the app.

-
File Upload β¬οΈ
File selection and upload interface with progress tracking. -
Downloads Manager π½οΈ
List of files downloaded to the device with open and share options.

-
Recycle Bin ποΈ
Deleted files with options to restore or permanently remove.

-
App Navigation Drawer
Easy access to all app sections from any screen.

-
Other Files Section
View and manage miscellaneous file types.

-
Successful Authentication
Confirmation screen after successful login.

- Secure Authentication: Login using Telegram's authentication system π
- Intuitive Interface: User-friendly design for easy file management π¨
- Cross-platform Support: Works on Android, iOS, and web platforms π±π»
- Upload & Download: Transfer files to and from Telegram's servers β¬οΈπ½οΈ
- File Categories: Automatic organization into Photos, Documents, Videos, APKs, and Others πΈππ₯
- Search Functionality: Easily find files by name π
- File Preview: Preview images and documents directly in the app π
- Recycle Bin: Soft-delete functionality with restore capability ποΈ
- Direct Downloads: Save files directly to device storage π
- Telegram Forwarding: Send files to your Telegram chat π€
- File Status Tracking: Monitor upload and download progress π
- Thumbnail Generation: Automatic thumbnail creation for image files πΌοΈ
- Permission Handling: Proper storage access permissions π
- Error Handling: Robust error management for a smooth user experience π¨
- Responsive Design: Works seamlessly across different screen sizes π
- Flutter: Cross-platform UI framework for building natively compiled applications π₯οΈ
- Dart: Programming language optimized for building UIs π§
- HTTP Package: For API communication with backend π
- File Management Libraries: For handling file operations on the device π
- Node.js: JavaScript runtime environment for server-side code π’
- Express: Web application framework for Node.js π
- Telegram Bot API: For file storage and retrieval π€
- Multer: For handling file uploads π€
- Flutter SDK (2.0+) πΌοΈ
- Node.js (14.0+) π’
- Telegram Bot Token (from @BotFather) π€
-
Clone the repository:
git clone https://github.com/yourusername/telegram_drive
-
Navigate to the frontend directory:
cd telegram_drive/frontend -
Install dependencies:
flutter pub get
-
Run the application:
flutter run
-
Navigate to the backend directory:
cd telegram_drive/backend -
Install dependencies:
npm install
-
Create a
.envfile with the following content:TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here PORT=3000 -
Start the server:
npm start
- POST
/api/verify- Verify the 6-digit code received from Telegram bot
- POST
/api/upload- Upload a file to Telegram β¬οΈ - GET
/api/files- Get all files for a user π - GET
/api/file/:fileId- Download a file directly π - GET
/api/download/:fileId- Send a file to user's Telegram chat π€ - DELETE
/api/file/:fileId- Move a file to the Recycle Bin ποΈ
- GET
/api/thumbnail/:fileId- Get thumbnail for an image file
- GET
/api/bin- List files in recycle bin π - POST
/api/bin/restore/:fileId- Restore a file from recycle bin π - DELETE
/api/bin/:fileId- Permanently delete a file β - DELETE
/api/bin/empty- Empty the recycle bin π§Ή
frontend/
βββ lib/
β βββ constants.dart # App-wide constants including entry point of the app
β βββ main.dart # Entry point of the application
β βββ home/ # Home page and related components
β βββ models/ # Data models including File models
β βββ screens/ # Additional screens (download, preview)
β βββ services/ # Services for file preview
β βββ shared_preferences/ # User data persistence
β βββ widgets/ # Reusable UI components
β βββ assets/ # Static assets
βββ pubspec.yaml # Flutter dependencies
backend/
βββ server.js # Main server file
βββ uploads/ # Temporary storage for file uploads
βββ data/
β βββ userFiles.json # User file metadata storage
βββ thumbnails/ # Cache directory for generated thumbnails
βββ .env # Environment variables
- Verification Code: 6-digit time-limited verification code for authentication π
- File ID Validation: Ensures users can only access their own files π‘οΈ
- Temporary File Storage: Files are stored temporarily during processing π¦
- Error Handling: Comprehensive error handling with appropriate status codes π¨
- Thumbnail Caching: Generated thumbnails are cached to reduce processing load πΌοΈ
- Scheduled Cleanup: Automatic cleanup of old cached thumbnails π§Ή
- Periodic Data Saving: Automatic saving of file metadata ποΈ
- Graceful Shutdown: Ensures data is saved before server shutdown π
- Verify your internet connection is stable π
- Check that the file size is under the 50MB limit π
- Ensure you have correct permissions granted to the app π
- Make sure you're using the correct Telegram account π±
- Check if the Telegram bot is active and functioning π€
-
Use a process manager like PM2:
npm install -g pm2 pm2 start server.js --name telegram-drive
-
Set behind a reverse proxy (Nginx/Apache) for SSL termination π
-
Configure a proper firewall π‘οΈ