Google Drive file browser - Cloudflare Workers + D1 + Hono.
Browse a Google Drive folder tree in the browser. No auth UI, no file uploads, no sync. Just reads a folder hierarchy via a Google service account.
- Node.js 20+
- Wrangler (installed via npm)
- A Google Cloud service account with Drive API access to the target folder
- A Cloudflare account with D1
cp .dev.vars.example .dev.vars# fill
GOOGLE_CLIENT_EMAIL
GOOGLE_PRIVATE_KEY
GOOGLE_ROOT_FOLDER_ID
ADMIN_TOKENnpm install
npx wrangler d1 migrations apply foldr-db --local
npm run devnpm run deploySet the same secrets in Cloudflare via wrangler secret put or the dashboard.
| Variable | Description |
|---|---|
GOOGLE_CLIENT_EMAIL |
Service account email |
GOOGLE_PRIVATE_KEY |
Service account private key |
GOOGLE_ROOT_FOLDER_ID |
ID of the root folder to browse |
ADMIN_TOKEN |
Bearer token for API authentication |
- Runtime - Cloudflare Workers (nodejs_compat)
- Framework - Hono
- Database - D1 (SQLite)
- Auth - Bearer token + Google service account