- Add build arguments and environment variables for OAuth client IDs in frontend Dockerfile - Install wget and add HEALTHCHECK commands to frontend and backend Dockerfiles - Create non-root user in backend Dockerfile for improved security - Update docker-compose.yml with healthcheck configurations and dynamic port/environment variable support - Add network configuration and restart policies to docker-compose services - Expand .env.example with additional OAuth secrets, ports, and environment variables for Coolify - Enhance README.md with detailed Coolify deployment instructions and required environment variables table
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
Docker & Coolify Deployment
Local Docker
# Build and run with Docker Compose
docker-compose up --build
# Access at http://localhost
Coolify Deployment
From Public Repository
- In Coolify, go to Projects → New → From Git Repository
- Select GitHub/GitLab/Bitbucket and enter the repo URL
- Set Build Pack to
Docker Compose - Configure environment variables in Coolify's UI
From Private Repository
- In Coolify, go to Settings → Private Keys and add your SSH key
- Create new project with Private Repository option
- Use SSH URL:
git@github.com:username/repo.git - Configure environment variables in Coolify's UI
Required Environment Variables (Coolify UI)
| Variable | Description |
|---|---|
VITE_MS_CLIENT_ID |
Microsoft/Azure OAuth Client ID |
MS_CLIENT_SECRET |
Microsoft/Azure OAuth Secret |
VITE_GOOGLE_CLIENT_ID |
Google OAuth Client ID |
GOOGLE_CLIENT_SECRET |
Google OAuth Secret |
REDIRECT_URI |
https://yourdomain.com/auth/callback |
Important
: Update your OAuth app redirect URIs in Azure Portal and Google Cloud Console to match your Coolify domain.
License
ISC