FileDrive is a Django-based cloud storage application similar to Google Drive, allowing users to store, manage, and share files online. Users can create folders, upload files, organize their content, and control sharing permissions.
- User Authentication: Secure login/signup system for user access
- File Management: Upload, organize, download, and delete files
- Folder Organization: Create nested folder structures for better organization
- Storage Management: Configurable storage limits per user (default: 1GB)
- File Preview: Built-in viewers for images, videos, audio, PDFs, and text files
- Sharing Options: Public or private sharing for files and folders
- Trash System: Recover deleted items or permanently remove them
- Recent Activity: Track recent file and folder actions
- Search Functionality: Find files and folders quickly
- User Profiles: Manage personal information and profile photos
- Drag & Drop: Easy file uploading with drag-and-drop support
- Progress Tracking: Visual representation of storage usage
- Backend: Django 4.x
- Frontend: Bootstrap 5, HTML5, CSS3, JavaScript
- Database: SQLite (development), can be configured for PostgreSQL/MySQL (production)
- File Storage: Django's file system storage
- Icons: Bootstrap Icons
Check out the live demo at https://drive.thinkori.com/
- Python 3.8+
- pip
- virtualenv (recommended)
-
Clone the repository:
git clone https://github.com/skhalidmahmud/filedrive.git cd filedrive -
Create and activate a virtual environment:
virtualenv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Apply migrations:
python manage.py makemigrations python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
-
Access the application at
http://localhost:8000
To configure the default storage space per user:
- Go to the Django admin panel at
http://localhost:8000/admin - Navigate to "Drive" > "Storage Settings"
- Update the "Space per user" field (in bytes)
- 1 GB = 1073741824 bytes
- 5 GB = 5368709120 bytes
For production, configure your web server to serve media files:
# settings.py
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')- Sign Up: Create a new account with a username and password
- Login: Access your account with your credentials
- Upload Files: Click "Upload File" or drag and drop files
- Create Folders: Organize your files with folders
- Share Files: Toggle public/private sharing for files and folders
- View Files: Preview images, videos, audio, PDFs, and text files
- Download Files: Save files to your device
- Manage Storage: Monitor your storage usage in the sidebar
- Search: Find files and folders using the search bar
- Profile: Update your profile information and photo
- User Management: Manage user accounts through the Django admin
- Storage Configuration: Adjust storage limits per user
- Content Monitoring: View and manage user files and folders
- Activity Tracking: Monitor user activity through the RecentActivity model
filedrive/
├── drive/ # Main application
│ ├── migrations/ # Database migrations
│ ├── templates/ # HTML templates
│ │ └── drive/ # App-specific templates
│ ├── templatetags/ # Custom template filters
│ ├── __init__.py
│ ├── admin.py # Django admin configuration
│ ├── apps.py # App configuration
│ ├── forms.py # Form classes
│ ├── models.py # Database models
│ ├── tests.py # Test cases
│ ├── urls.py # URL patterns
│ └── views.py # View functions
├── filedive/ # Project settings
│ ├── __init__.py
│ ├── asgi.py
│ ├── settings.py # Django settings
│ ├── urls.py # Root URL configuration
│ └── wsgi.py
├── media/ # User-uploaded files
├── requirements.txt # Python dependencies
└── manage.py # Django management script
- Standard Django User model
- Extended with UserProfile for additional information
space_per_user: Storage limit per user in bytes
user: One-to-one relationship with Userphoto: Profile picturegender: User's genderdate_of_birth: User's date of birth
name: Folder nameowner: User who owns the folderparent: Parent folder (for nested structure)created_at: Creation timestampmodified_at: Last modification timestampis_public: Public visibility flag
name: File nameowner: User who owns the filefolder: Parent folderfile: File pathsize: File size in bytescreated_at: Creation timestampmodified_at: Last modification timestampis_public: Public visibility flagfile_type: File extension/type
owner: User who owns the itemfile: Reference to deleted filefolder: Reference to deleted folderdeleted_at: Deletion timestamp
user: User who performed the actionaction: Action performed (e.g., "uploaded", "viewed")item_name: Name of the itemitem_type: Type of item ("file" or "folder")timestamp: Action timestamp
signup_view: User registrationlogin_view: User loginlogout_view: User logout
home_view: User dashboardfolder_view: Display folder contentsfile_view: Display file details and previewdownload_file_view: Download a file
create_folder_view: Create a new folderupload_file_view: Upload a new filedelete_item_view: Move item to trashtrash_view: Display trash contentsrestore_from_trash_view: Restore item from trashdelete_from_trash_view: Permanently delete item
toggle_public_view: Toggle public/private sharingprofile_view: User profile managementsearch_view: Search for files and folders
Khalid Mahmud
- GitHub: github.com/skhalidmahmud
- LinkedIn: www.linkedin.com/in/skhalidmahmud
- Portfolio: khalid.top
Thinkori
- Website: thinkori.com
- GitHub: github.com/thinkori
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions, please open an issue on the GitHub repository.
- Mobile app development
- File versioning
- Collaborative editing
- Advanced sharing permissions
- File commenting
- Third-party integrations (Google Drive, Dropbox)
- End-to-end encryption
- Bulk operations
- Keyboard shortcuts
- Dark mode
- Multi-language support