Skip to content

Add a storage page w/ breakdown and files#86

Draft
wooorm wants to merge 7 commits into
eurosky-social:mainfrom
wooorm:wooorm/storage
Draft

Add a storage page w/ breakdown and files#86
wooorm wants to merge 7 commits into
eurosky-social:mainfrom
wooorm:wooorm/storage

Conversation

@wooorm

@wooorm wooorm commented Apr 8, 2026

Copy link
Copy Markdown
Member
  • new /storage route
  • new little api server to run next to database to expose needed data (blob metadata + storage breakdown)
  • controllers/storage_controller.ts lists user blob CIDs server side (capped at 5k) and renders page
  • storage/show.tsx shows things and lets folks interact with their files

Important to note:

  • an image/video CDN is probably a good idea
  • client-side pagination; the data being sent isn’t big (just cids, total blob sizes, and mime types) so it’s not very pressing

@wooorm

wooorm commented Apr 8, 2026

Copy link
Copy Markdown
Member Author

Here’s roughly how that looks in dark and light mode:

Screenshot 2026-04-08 at 3 30 43 PM Screenshot 2026-04-08 at 3 31 08 PM

@wooorm
wooorm requested a review from ThisIsMissEm April 8, 2026 15:03
@wooorm wooorm mentioned this pull request Apr 8, 2026
Comment thread app/controllers/storage_controller.ts Outdated
* Query; see <https://docs.bsky.app/docs/api/com-atproto-sync-list-blobs>.
*/
const query = l.query(
'com.atproto.sync.listBlobs',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you just do pnpm lex install com.atproto.sync.listBlobs and then pnpm lex:build and you'll get the types into the lexicon directory: https://github.com/eurosky-social/eurosky-portal/tree/main/app/lexicons

That is, codegen automatically makes this for you, you just need to do import * as lexicon from '#lexicons' then lexicon.com.atproto.sync.listBlobs

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting! done

@ThisIsMissEm
ThisIsMissEm marked this pull request as draft April 9, 2026 00:41
wooorm added 6 commits April 15, 2026 17:11
* new `/storage` route
* `controllers/storage_controller.ts` lists user blob CIDs server side
  (capped at 5k) and renders page
* `storage/show.tsx` fetches all blobs, gives insights, and lets folks
  interact with their files

Important to note:

* server does not support `Range` requests, that should be done to
  prevent large files, especially non-image/videos, from being read;
  this is important both for the server and for client performance;
  I also don’t see images being cached;
  is there a Eurosky proxy/cache layer endpoint for blobs given DIDs
  and CIDs?
* a rather nice to have would be a new endpoint to analyze the users data
  *without* having to fetch it all on the client; this would reduce a
  lot of load for users client side
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants