Skip to content

elphizu/foldr

Repository files navigation

foldr

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.

Prerequisites

  • 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

Setup

cp .dev.vars.example .dev.vars
# fill
GOOGLE_CLIENT_EMAIL
GOOGLE_PRIVATE_KEY
GOOGLE_ROOT_FOLDER_ID
ADMIN_TOKEN
npm install
npx wrangler d1 migrations apply foldr-db --local
npm run dev

Deploy

npm run deploy

Set the same secrets in Cloudflare via wrangler secret put or the dashboard.

Environment Variables

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

Stack

  • Runtime - Cloudflare Workers (nodejs_compat)
  • Framework - Hono
  • Database - D1 (SQLite)
  • Auth - Bearer token + Google service account

License

MIT

About

Google Drive index built on Cloudflare Workers + D1 + Hono.

Topics

Resources

License

Stars

Watchers

Forks

Contributors