# OneDrive ↔ Google Drive Streamer A secure, high-performance application to stream files bidirectionally between Microsoft OneDrive and Google Drive. Now powered by a **Node.js Express backend** for reliable server-side streaming and token management. ## Features - � **Bidirectional Transfers**: Move files from OneDrive to Google Drive AND Google Drive to OneDrive. - 🚀 **Server-Side Streaming**: Files are piped directly between cloud providers on the server, ensuring faster and more reliable transfers for large files. - � **Secure OAuth 2.0**: Implements robust Authorization Code Flow via the backend. - 📊 **Real-time Progress**: Track transfer status with live progress updates. - 📁 **File Management**: Browse and select files from your connected cloud storage. ## Prerequisites - Node.js (v18 or higher) - npm or yarn ## Setup ### 1. Clone the repository ```bash git clone cd ``` ### 2. Install Dependencies You need to install dependencies for both the frontend and the backend. **Frontend:** ```bash npm install ``` **Backend:** ```bash cd server npm install cd .. ``` ### 3. Configure Environment Variables **Frontend (`.env`):** Create a `.env` file in the root directory: ```env VITE_MS_CLIENT_ID=your_microsoft_client_id VITE_GOOGLE_CLIENT_ID=your_google_client_id ``` **Backend (`server/.env`):** Create a `.env` file in the `server` directory: ```env PORT=3001 # Microsoft Graph Credentials VITE_MS_CLIENT_ID=your_microsoft_client_id MS_CLIENT_SECRET=your_microsoft_client_secret # Google Drive Credentials VITE_GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret REDIRECT_URI=http://localhost:5173/auth/callback ``` > **Note:** You must register applications in both Azure Portal and Google Cloud Console. > Ensure the Redirect URI is set to `http://localhost:5173/auth/callback`. ### 4. Run the Application You need to run both the backend server and the frontend client. **Start Backend (Terminal 1):** ```bash cd server npm run dev ``` *Server runs on http://localhost:3001* **Start Frontend (Terminal 2):** ```bash npm run dev ``` *Frontend runs on http://localhost:5173* ## Project Structure - **`/server`**: Node.js Express Backend - `src/routes`: API endpoints (`/auth`, `/transfer`) - `src/services`: Cloud provider integration (`onedrive.ts`, `googledrive.ts`) - **`/src`**: React Frontend - `components`: UI components (Cards, Progress, Alerts) - `lib/api.ts`: API client for communicating with the backend - `App.tsx`: Main application logic and state management ## Technologies - **Frontend**: React, TypeScript, Vite, Tailwind CSS, Lucide Icons, Shadcn UI - **Backend**: Node.js, Express, TypeScript, Axios, Microsoft Graph Client, Google APIs ## License ISC