Skip to content

armgit / BYOC

Public Imported from GitHub
0

One storage API for Google Drive, Nextcloud, and S3-compatible clouds, in TypeScript and Python.

7.8 KB
Raw Blame

v0.4 pitch — draft

This describes a product that does not exist yet. Browser-direct upload, @byoc/connect, and the index are unbuilt. This document is the spec: we write the claim first, test whether it lands, then build to whatever survives. Do not publish any of this until the code backs it.


The claim

One API for storage your users already own.

Google Drive, S3 and R2, Nextcloud, or a local disk — the bytes go from your user's browser straight to your user's cloud. Your server never touches them.

Why this sentence and not another

Three candidates were tested against the strongest objection to each:

Candidate Objection that kills it
"A universal storage abstraction" Anyone can build one. Says nothing about why it matters.
"User-owned data for the web" This is Solid's pitch. Nine years, no adoption. Sounds ideological, not useful.
"Storage your users already own" Survives. It's a capability claim, not a values claim.

The word doing the work is already. Solid asks the world to adopt a new protocol, a new server, a new identity system. BYOC asks for none of that: the user has Google Drive today. That is the entire strategic difference, and it belongs in the first sentence.

The second sentence — your server never touches them — is what makes it concrete rather than aspirational. It is also a falsifiable claim, which is why the demo has to show it.


The 15-second demo

A launch README has to land before the reader scrolls. One silent GIF:

  ┌─────────────────────────┬──────────────────────────┐
  │  browser                │  your server's logs      │
  │                         │                          │
  │  [ uploading 200 MB ]   │  POST /api/token   204   │
  │  ████████████░░░  73%   │                          │
  │                         │  (nothing else)          │
  │  -> user's Google Drive │                          │
  └─────────────────────────┴──────────────────────────┘

           200 MB uploaded.  0 bytes through the server.

Split screen, no narration. The right-hand pane staying empty is the product.

This cannot be filmed until browser-direct upload works. The demo is therefore the acceptance test for v0.4, not a marketing afterthought.


The problem, in numbers

Three costs that every app holding user files pays:

Money. Storage is priced per GB per month, forever, and it scales with your user count rather than your revenue. A media app with 10,000 users at 5 GB each is carrying 50 TB whether or not those users ever pay.

Liability. Files you hold are files you can leak, files you must produce under subpoena, and files that fall in scope for GDPR, HIPAA, and the EU AI Act's high-risk provisions from August 2026.

Trust. Dropbox's 2023 terms change over AI training triggered a serious backlash. Zoom in 2023, Mozilla in 2025. Users now ask whether their files train someone's model, and "we never had your files" is a far stronger answer than a policy promise.

BYOC's answer to all three is the same: don't hold the data.


The code

import { BYOC } from "@byoc/core";
import { GoogleDriveProvider } from "@byoc/google-drive";

const storage = new BYOC({
  provider: new GoogleDriveProvider({ auth: userToken })
});

await storage.writeText("reports/q3.md", "# Q3");
await storage.readText("reports/q3.md");

The point is that this is unremarkable. It looks like every storage SDK, and that is deliberate: the architecture is radical, the API is boring. Swap the provider and nothing else changes.


How it differs from the things it will be compared to

Readers will assume this is one of three things it isn't. Say so first.

vs. an S3 SDK. S3 stores files in your bucket. The bill and the breach are yours. BYOC stores them in the user's account, on the user's quota.

vs. Uppy / Companion. Uppy is an importer: it lets a user pick a file from their Drive and copies it into your storage. After the import, you hold the file and all three costs above apply. In BYOC the file never leaves. Uppy answers "let users bring files in." BYOC answers "don't take them."

vs. Solid / remoteStorage. Same goal, opposite method. They define a new protocol and need new servers and new user habits; Solid has been at this since 2016. BYOC uses accounts users already have, and works today.

vs. OpenDAL / rclone. OpenDAL is a broad operator model across many services; rclone is excellent at command-line transfer and sync. Both are tools you reach for. BYOC is a dependency your application ships with, and it makes provider differences explicit rather than flattening them -- a caller feature-detects directUpload instead of discovering at runtime that the provider cannot do it.

The objection to be ready for

"This is just presigned URLs. I can do that in ten lines."

True for S3, and the answer has to be one breath:

Ten lines for S3. Now do Google Drive's resumable sessions, progress and resume in the browser, and swap providers without touching your code.

If that answer is not crisp, the launch stalls on the first comment.

Why this is becoming infrastructure

The EU Data Act (Regulation 2023/2854) requires cloud-switching support and structured machine-readable export in specified cases. BYOC is not a compliance certificate, but application-level portability is shifting from a nice-to-have toward an expectation. This is supporting material, not the headline -- lead with the demo, not the regulation.


Architecture

   BEFORE                              WITH BYOC

   browser                             browser
      |                                   |
      v                                   |  (short-lived token)
   your server  <- bandwidth              v
      |         <- liability          user's cloud
      v         <- storage bill
   your S3                            your server: metadata only

Your server issues a scoped, short-lived credential and records a pointer. It never sees a byte of content.

What your server still holds: an index — paths, sizes, timestamps, content hashes, and any embeddings you compute. That is what keeps the app able to search, sort and paginate without holding the files themselves.


What this makes buildable

  • AI apps that read a user's documents without ever storing them — you keep embeddings and pointers, the user keeps the source
  • Media and video apps whose storage costs stay flat as users grow
  • Regulated tools in health, legal, and finance where "we never held it" is the compliance answer
  • Local-first and indie apps with no storage budget at all

Providers

Provider Model Status
Local filesystem own disk shipped 0.3.0
In-memory test double shipped 0.3.0
Google Drive personal cloud shipped
S3 / R2 / MinIO developer cloud shipped
Nextcloud / WebDAV self-hosted shipped
Dropbox, OneDrive personal cloud planned

Install

npm install @byoc/core @byoc/local     # no account needed
pip install byoc-storage

Open questions for the readers we show this to

  1. Does "your server never touches them" read as valuable, or as a limitation?
  2. Is the AI-app framing the strongest one, or does it narrow the pitch?
  3. What is the first thing you'd need before using this in production?
  4. Which comparison did you reach for first — S3, Uppy, or Solid?

Answers to 1 and 4 decide the headline. Answer to 3 decides the roadmap.