Cloud-native S3-compatible bucket manager built on Cloudflare Workers.
This repository is under active refactoring. For architecture notes and progress tracking, see:
- Backend: Cloudflare Workers + Hono (
/api/**) - Database: Cloudflare D1 (SQLite-compatible) + Drizzle ORM
- Frontend: Vue 3 SPA (Naive UI) bundled by Vite and served via Workers assets
- Storage: S3-compatible providers (Cloudflare R2 / AWS S3 / MinIO / ...)
- User registration/login (cookie-based sessions)
- Bucket configuration & connection test (stored in D1)
- Object browser (list/preview/delete)
- Upload via presigned URL + upload history recording
- Raw file access via
/api/raw/:bucketId/*with access checks - Site settings stored in D1 (fallback: env → default)
UI is currently English-only.
- Node.js 22+ (recommended: 24.x)
- Bun
- Cloudflare account (for deploy / production D1)
Install dependencies:
bun installOptional: create a local env file (frontend build-time options):
cp .env.sample .envApply D1 migrations to local database:
bun run drizzle:pushStart dev server:
bun devDefault dev URL: http://localhost:5880
There are two common ways:
- Enable registration, then the first registered user (ID=1) becomes admin automatically.
- The flag is resolved by DB → env → default.
- In
wrangler.jsonc,ALLOW_REGISTERdefaults tofalse. - Admins can change it later in the UI:
/@admin/settings.
- Admin create endpoint (no public registration needed)
- Set
ADMIN_CREATE_TOKENas a Worker secret. - Then run:
bun run user:create -- --url http://localhost:5880 --email admin@example.com --password "StrongPass123" --token "<ADMIN_CREATE_TOKEN>"Script details: scripts/create-user.ts
bun dev- start dev serverbun run build- build frontend + worker assetsbun run deploy- deploy to Cloudflare Workersbun run drizzle:push- apply D1 migrations locallybun run drizzle:push-prod- apply D1 migrations to production (D1 HTTP)bun run drizzle:studio- open Drizzle Studio (local)bun run drizzle:studio-prod- open Drizzle Studio (production)
Frontend (Vite) env vars live in:
.env(optional).env.development/.env.production.env.samplelists supported keys
Backend (Worker) env vars are configured in Cloudflare (Dashboard / Wrangler):
ALLOW_REGISTER(string boolean)SITE_NAME(instance display name)ADMIN_CREATE_TOKEN(enables/api/auth/admin-create)
Production Drizzle (D1 HTTP driver) requires:
CLOUDFLARE_ACCOUNT_IDCLOUDFLARE_API_TOKENCLOUDFLARE_DATABASE_ID
backend/- Worker API (Hono)frontend/- Vue SPAdb/- Drizzle schemadrizzle/- SQL migrationscommon/- shared utilities
My Buckets
Gallery Layout
Book Layout
Manga!
File Info
MIT License
- Copyright (c) 2022 Siyu Long (before f82ffdc)
- Copyright (c) 2025 Dragon Fish (remastered version)
FlareDrive Logos & mascots
- CC BY-SA 4.0
- See more: README






