Skip to content

jcwtw/drvtw_oss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DriveToWeb

Host websites directly from Google Drive or Microsoft OneDrive — no traditional web server required. Users share a folder of HTML/CSS/JS files with DriveToWeb, and the service makes it accessible at a public subdomain.

Live service: drv.tw (shutting down May 31, 2026)

How It Works

  1. A user uploads their website files to a Google Drive or OneDrive folder and shares it
  2. They sign in to DriveToWeb via OAuth and receive a site URL (e.g. sitename.on.drv.tw)
  3. Visitors access the URL — DriveToWeb fetches files from the cloud storage and serves them, with multi-layer caching

Repository Structure

drvtw_oss/
├── backend/          # PHP application server, nginx configs, setup scripts
├── frontend/         # Static landing site (www.drv.tw), hosted on Azure Static Web Apps
├── HISTORY.md        # Major milestones
└── README.md         # This file

See the README in each subfolder for setup details.

Architecture

Layer Technology
Application PHP 8.x, nginx, PHP-FPM
Database MongoDB (local socket + MongoDB Atlas replica)
CDN / Edge Cloudflare, AWS CloudFront with Lambda@Edge
OAuth Google OAuth 2.0, Microsoft OAuth 2.0
Cloud APIs Google Drive API v3, Microsoft Graph API
Email PHPMailer via SMTP (AWS SES)
SSL Let's Encrypt via acme.sh
Static frontend Azure Static Web Apps

Features

  • Serve static websites from Google Drive or Microsoft OneDrive
  • Custom subdomain per user (sitename.on.drv.tw)
  • Custom domain support via DNS CNAME or TXT record
  • Email-based visitor authentication for private sites
  • Phishing and malware content scanning before serving
  • Abuse reporting API
  • Multi-layer cache: PHP → nginx proxy → CDN (up to 180-day TTL)
  • Service worker support for progressive web apps
  • Custom 404 pages
  • Bilingual (English/Chinese) documentation at docs-of.drv.tw

Known Limitations

  • Google Drive: Google's restricted OAuth scope policy blocks new app registrations requesting broad Drive access. Existing users continue to work; new Google Drive sign-ups are disabled.
  • Phishing abuse: The service is a recurring target for phishing campaigns. The blacklist (drvtw_blacklist.php) requires active maintenance.
  • Self-hosted deployments need their own Google and Microsoft OAuth app registrations.

Quick Start

See backend/README.md for server setup instructions.

License

MIT — see LICENSE.

PHPMailer (in backend/html/PHPMailer/) is LGPL-2.1.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

No contributors