Repository navigation
Files up to 5 GB, no file limit (free account); pay-as-you-go storage - #43
Merged
Merged
Conversation
…orage Signed in, the free tier has no file count and files of up to 5 GB, with 5 GB of end-to-end encrypted storage. More is pay as you go ($0.05 per GB a month over 5 GB) from the CoinPay prepaid balance, charged hourly. Signed out keeps the local 4 MB / 20 MB / 1,000-file limits and says an account lifts them. - src/blob-store.ts: stored files. Per-file random AES-256 key, 8 MiB chunks, AES-GCM with the chunk index as IV. The key travels only inside the sealed workspace, so the server holds chunks it cannot read or name. - server/blobs.ts: /api/v1/blobs chunk API, usage per account, 402 past the free allowance without a balance, hourly idempotent storage charge, abandoned uploads dropped after two days. Blobs live beside the DB on the volume. - Workspace documents may carry a blob ref; files over 4 MB open read-only (PDF and images whole, text as the first 1 MB) and download exactly. - Autosync uploads stored files before the sealed snapshot, spills small text past a 16 MB snapshot budget to blobs (same digest, so no merge churn) and collects unreferenced blobs after an hour. - Desktop: no 1,000-file walk cap; files over 4 MB are read in ranges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ralyodio
added a commit
that referenced
this pull request
Oct 19, 2026
The spec waited for "Synced" on the second device, which was already on screen from the first pass, so the first device could poll before the edit was uploaded. Wait for the account revision to advance instead. Failed once on main CI after #43. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Anthony: "we got a readm3.com file size limitation error please fix max filesize is 5gb and unlimited files", then "on free tier but account is required. pay as you go for more data storage".
How: files over 4 MB become stored files (
src/blob-store.ts): kept as a Blob in IndexedDB on the device, and on the account as 8 MiB AES-256-GCM chunks under a per-file random key that only lives inside the sealed (E2E) workspace.server/blobs.tsserves/api/v1/blobs(chunk PUT/GET, complete, delete, usage), refuses uploads past the free allowance with a 402 when the balance is not positive, charges storage hourly (idempotent ledger ref), and drops abandoned uploads after two days. Autosync uploads stored files before the snapshot, spills small text past a 16 MB snapshot budget (digest-preserving, so no merge churn) and garbage-collects unreferenced blobs after an hour. Desktop: no 1,000-file cap; large files are read in ranges.Free allowance, price and blob dir are env-configurable:
READM3_FREE_STORAGE_BYTES,READM3_STORAGE_MICROS_PER_GB_MONTH,READM3_BLOB_DIR(defaultblobs/beside the DB, i.e./data/blobson the volume).Tests: typecheck;
bun test ./server/test72 pass (new blobs.test.ts: round trip, isolation, chunk sizes, 402 + top-up, hourly charge once, abandoned cleanup);npm test198 pass (new blob-store.test.ts); Playwright site 37 pass (new: signed-in 9 MB file opens read-only, uploads encrypted, name absent from snapshot, downloads exact size; signed-out asks for an account) and accounts 4 pass.🤖 Generated with Claude Code