- Add frontend Dockerfile with multi-stage build using node and nginx - Add backend Dockerfile with multi-stage build to compile and serve app - Add docker-compose.yml to define frontend and backend services with environment variables - Configure nginx to serve SPA, enable gzip compression and caching for static assets - Set up nginx reverse proxy for API requests to backend service on /api path
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
- <EFBFBD> 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.
- <EFBFBD> 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
git clone <repository-url>
cd <repository-directory>
2. Install Dependencies
You need to install dependencies for both the frontend and the backend.
Frontend:
npm install
Backend:
cd server
npm install
cd ..
3. Configure Environment Variables
Frontend (.env):
Create a .env file in the root directory:
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:
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):
cd server
npm run dev
Server runs on http://localhost:3001
Start Frontend (Terminal 2):
npm run dev
Frontend runs on http://localhost:5173
Project Structure
/server: Node.js Express Backendsrc/routes: API endpoints (/auth,/transfer)src/services: Cloud provider integration (onedrive.ts,googledrive.ts)
/src: React Frontendcomponents: UI components (Cards, Progress, Alerts)lib/api.ts: API client for communicating with the backendApp.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