Gstorage

Multi-Account Drive Aggregator — Implementation Plan

A desktop app that pools several Google accounts (e.g. 3 × 15 GB) into one unified ~45 GB virtual drive. Everything runs on the user’s machine; file data flows directly between the user and Google, never through a server of yours.


Locked decisions

Decision Choice Why
Runtime Desktop app, Python Clean FUSE bindings, first-class Google client, simple parallelism. Reversible: Electron/TS if you later want a polished GUI.
Server None Data flows user → Google directly. Zero hosting cost, lighter security review.
Auth OAuth “Desktop app” client + PKCE, loopback on localhost Standard serverless desktop flow; no client secret to hide.
Scope drive.file App only touches files it created — far lighter verification than full drive scope. Chunks count as app-created, so this is sufficient even with splitting.
Storage model (v1) Whole-file placement One lost/locked account can’t corrupt other files; native Drive preview stays intact.
Storage model (v2) Chunking across accounts Needed only for single files larger than one account’s free space.
Metadata index SQLite, local Folder tree via parent_id self-reference. B+ tree indexing gives fast path lookups; no graph DB needed.
Quota accounting In quota units, not request counts New projects (post-May 2026) use the unit model: list = 100, download = 200, etc.

Phase 0 — Setup (½ day)

Milestone: app launches, empty SQLite DB on disk, Google project ready.


Phase 1 — OAuth + multi-account login (2–3 days)

The load-bearing phase. Get this right first.

Milestone: user logs into 3 accounts; app holds and can refresh 3 token sets.


Phase 2 — Combined storage view (2 days)

Milestone: dashboard shows real aggregated free space. This is where the idea first feels real.


Phase 3 — Metadata index + unified listing (3–4 days)

SQLite schema (starting point):

Build the file browser: query the index, render one unified tree regardless of which account each file physically lives on. The index is the source of truth for the UI.

Milestone: unified browser renders files across accounts as one drive.


Phase 4 — Upload with smart placement (3–4 days)

The core write path — whole files, no chunking yet.

Milestone: drop a file in → uploads to best-fit account → appears in the unified view.


Phase 5 — Download, delete & hardening (2–3 days)

Milestone: full create/read/delete lifecycle is reliable; index self-heals.

End of v1. Phases 0–5 give a genuinely usable “combined Drive.” ~2–3 focused weeks solo.


Phase 6 — Chunking / splitting (v2)

Only once v1 is solid. This unlocks single files bigger than any one account’s free space, at the cost of many more failure modes.

(Optional here: content-aware compression before chunking — but skip compressing already-compressed media like video/zip; it burns CPU for near-zero gain.)


Phase 7 — FUSE mount (optional polish)

Mount the pool as a real local disk (the way rclone does), so the OS file manager treats it like any other drive. Nicest possible UX; Python has clean FUSE bindings. Purely additive once the core works.


Verify against current Google docs before relying on these

These change and are worth confirming, not trusting from memory or this plan:


Critical path

Phase 1 → 2 → 3 → 4 → 5 = a working product. Everything else (chunking, FUSE, compression) is additive and should wait until that spine is stable.