Skip to content

alabaganne/all-drive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

48 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

All-Drive

A comprehensive cloud storage management application that allows users to connect and manage multiple cloud storage services (Google Drive, OneDrive, Dropbox, MEGA) from a single unified interface.

πŸš€ Features

  • Multi-Cloud Integration: Connect and manage multiple cloud storage services
  • Unified File Management: Browse, organize, and manage files across different cloud providers
  • User Authentication: Secure login and registration system
  • File Organization: Create folders, categorize files, and organize content
  • Search Functionality: Search across all connected drives
  • File Sharing: Share files and folders with other users
  • Recycle Bin: Recover deleted files
  • Modern UI: Beautiful, responsive interface built with React and Tailwind CSS
  • Real-time Updates: Live synchronization with cloud storage services

πŸ–ΌοΈ Screenshots

Dashboard view:

Dashboard

More screenshots can be found in the screenshots folder.

πŸ› οΈ Tech Stack

Frontend (Client)

  • React 18 - UI framework
  • TypeScript - Type safety and better development experience
  • Vite - Build tool and development server
  • React Router DOM - Client-side routing
  • Tailwind CSS - Utility-first CSS framework
  • Framer Motion - Animation library
  • React Icons - Icon library
  • Axios - HTTP client for API requests
  • React Toastify - Toast notifications
  • React Dropzone - File upload handling
  • Chart.js & React-Chartjs-2 - Data visualization
  • LocalForage - Local storage management

Backend (Server)

  • Node.js - Runtime environment
  • Express.js - Web framework
  • MongoDB - NoSQL database with Mongoose ODM
  • JWT - Authentication tokens
  • bcrypt - Password hashing
  • Google APIs - Google Drive integration
  • Multer - File upload middleware
  • CORS - Cross-origin resource sharing
  • dotenv - Environment variable management

πŸ“ Project Structure

all-drive/
β”œβ”€β”€ client/                          # Frontend React application
β”‚   β”œβ”€β”€ public/                      # Static assets
β”‚   β”‚   β”œβ”€β”€ icons/                   # SVG icons for drives and file types
β”‚   β”‚   └── react.svg
β”‚   β”‚   β”œβ”€β”€ components/              # Reusable React components
β”‚   β”‚   β”‚   β”œβ”€β”€ shared/              # Shared components
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ cards/           # Card components for drives and files
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.tsx       # Navigation bar
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SidebarLeft.tsx  # Left sidebar
β”‚   β”‚   β”‚   β”‚   └── SidebarRight.tsx # Right sidebar
β”‚   β”‚   β”‚   β”œβ”€β”€ Button.tsx           # Button component
β”‚   β”‚   β”‚   β”œβ”€β”€ Input.tsx            # Input component
β”‚   β”‚   β”‚   β”œβ”€β”€ Layout.tsx           # Main layout wrapper
β”‚   β”‚   β”‚   └── modal/               # Modal components
β”‚   β”‚   β”œβ”€β”€ context/                 # React context providers
β”‚   β”‚   β”‚   β”œβ”€β”€ auth-context.tsx     # Authentication context
β”‚   β”‚   β”‚   └── modal-context.tsx    # Modal state management
β”‚   β”‚   β”œβ”€β”€ data/                    # Static data and mock files
β”‚   β”‚   β”‚   └── static/mock/         # Mock data for development
β”‚   β”‚   β”œβ”€β”€ libs/                    # Utility libraries
β”‚   β”‚   β”‚   β”œβ”€β”€ helpers/             # Helper functions
β”‚   β”‚   β”‚   └── hooks/               # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ pages/                   # Page components
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx        # Main dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ Login.tsx            # Login page
β”‚   β”‚   β”‚   β”œβ”€β”€ Register.tsx         # Registration page
β”‚   β”‚   β”‚   β”œβ”€β”€ MyFolders.tsx        # Folders management
β”‚   β”‚   β”‚   β”œβ”€β”€ AddDrive.tsx         # Add new drive
β”‚   β”‚   β”‚   β”œβ”€β”€ SharedFiles.tsx      # Shared files view
β”‚   β”‚   β”‚   β”œβ”€β”€ RecycleBin.tsx       # Recycle bin
β”‚   β”‚   β”‚   └── Search.tsx           # Search functionality
β”‚   β”‚   β”œβ”€β”€ types/                   # TypeScript type definitions
β”‚   β”‚   β”‚   β”œβ”€β”€ drives.ts            # Drive-related types
β”‚   β”‚   β”‚   β”œβ”€β”€ folder.ts            # Folder types
β”‚   β”‚   β”‚   └── items.ts             # File item types
β”‚   β”‚   β”œβ”€β”€ App.tsx                  # Main App component
β”‚   β”‚   β”œβ”€β”€ main.tsx                 # Application entry point
β”‚   β”‚   └── router.tsx               # Routing configuration
β”‚   β”œβ”€β”€ package.json                 # Frontend dependencies
β”‚   β”œβ”€β”€ tailwind.config.cjs          # Tailwind CSS configuration
β”‚   β”œβ”€β”€ tsconfig.json                # TypeScript configuration
β”‚   └── vite.config.ts               # Vite configuration
β”œβ”€β”€ server/                          # Backend Node.js application
β”‚   β”œβ”€β”€ middlewares/                 # Express middlewares
β”‚   β”‚   β”œβ”€β”€ auth.js                  # Authentication middleware
β”‚   β”‚   └── upload.js                # File upload middleware
β”‚   β”œβ”€β”€ models/                      # Database models
β”‚   β”‚   β”œβ”€β”€ user.js                  # User model
β”‚   β”‚   └── drive.js                 # Drive model
β”‚   β”œβ”€β”€ routes/                      # API routes
β”‚   β”‚   β”œβ”€β”€ auth.js                  # Authentication routes
β”‚   β”‚   β”œβ”€β”€ drive.js                 # Drive management routes
β”‚   β”‚   └── user-drive.js            # User-drive relationship routes
β”‚   β”œβ”€β”€ app.js                       # Main server file
β”‚   β”œβ”€β”€ google-drive-routes.js       # Google Drive integration
β”‚   β”œβ”€β”€ db.sql                       # Database schema
β”‚   β”œβ”€β”€ init-db.js                   # Database initialization
β”‚   └── package.json                 # Backend dependencies
β”œβ”€β”€ docs/                            # Documentation
β”‚   β”œβ”€β”€ Diagrams/                    # UML diagrams and use cases
β”‚   └── Chapters/                    # Project documentation chapters
└── README.md                        # This file

πŸš€ Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • MongoDB database
  • Google Cloud Console account (for Google Drive integration)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd all-drive
  2. Install frontend dependencies

    cd client
    npm install
  3. Install backend dependencies

    cd ../server
    npm install
  4. Environment Setup

    Create a .env file in the server directory:

    # Server Configuration
    PORT=3000
    
    # MongoDB Connection
    MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/all-drive
    
    # JWT Configuration
    ACCESS_TOKEN_SECRET=your_jwt_secret_key
    
    # Google Drive API Configuration
    GOOGLE_CLIENT_ID=your_google_client_id
    GOOGLE_CLIENT_SECRET=your_google_client_secret
    GOOGLE_SCOPE=https://www.googleapis.com/auth/drive
    GOOGLE_REDIRECT_URL=http://localhost:3000/auth
  5. Database Setup

    cd server
    node init-db.js

Running the Application

  1. Start the backend server

    cd server
    npm run dev

    The server will start on http://localhost:3000

  2. Start the frontend development server

    cd client
    npm run dev

    The client will start on http://localhost:9000

  3. Build for production

    cd client
    npm run build

πŸ”§ API Endpoints

Authentication

  • POST /auth/register - User registration
  • POST /auth/login - User login

Drive Management

  • GET / - Google Drive OAuth initiation
  • GET /auth - Google Drive OAuth callback
  • POST /user-drive/getFolders - Get user folders
  • POST /drive/add - Add new drive connection

🌟 Key Features Explained

Multi-Cloud Integration

The application supports multiple cloud storage providers:

  • Google Drive: Full integration with Google Drive API
  • OneDrive: Microsoft OneDrive integration
  • Dropbox: Dropbox API integration
  • MEGA: MEGA cloud storage integration

File Management

  • Browse files and folders across all connected drives
  • Upload, download, and delete files
  • Create new folders and organize content
  • Search functionality across all drives
  • File sharing with other users

User Experience

  • Modern, responsive design with Tailwind CSS
  • Smooth animations with Framer Motion
  • Toast notifications for user feedback
  • Loading states and error handling
  • Mobile-friendly interface

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the ISC License.

πŸ†˜ Support

For support and questions, please open an issue in the repository or contact the development team.

About

Manage your cloud based file storage services from one place.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •