Skip to content

0.26.0: the dht collection, read from bittorrented.com's own database - #93

Merged
ralyodio merged 1 commit into
mainfrom
feat/dht-collection
Sep 13, 2026
Merged

0.26.0: the dht collection, read from bittorrented.com's own database#93
ralyodio merged 1 commit into
mainfrom
feat/dht-collection

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

What

A dht collection at nichedb.dev/c/dht: torrents as the bittorrented.com crawler (bitmagnet) observes them on the BitTorrent DHT, read from the site's own Supabase.

  • Adapter bittorrented-dht calls rpc/browse_dht_torrents over PostgREST with the site's publishable key (the same one its browser bundle ships; never the service role key). Sorted by date from a cursor, 500 rows a page, pagesPerRun (default 10) and minSeeders (default 0) as source config. The cursor is a timestamp plus how many rows at it were read, because the crawler writes in batches that share a timestamp and date_from is inclusive. Sorted by seeders the function hits its 15s statement timeout on a table this size; by date from a cursor a page returns in ~0.4s (measured).
  • Adult material is left out: content class xxx is skipped, and so is a name that says so in plain words when the classifier has not caught up.
  • Items: kind torrent, keyed by infohash, linking to bittorrented.com/dht/<infohash>, tags dht, type:<class>, seeded/unseeded; data carries the magnet (built with a URL-encoded display name), size, file count, swarm as crawled and the class.
  • Feeds: dht-latest, dht-seeded, dht-movies, dht-tv, dht-music, dht-software, dht-books.
  • Config: BITTORRENTED_SUPABASE_URL, BITTORRENTED_SUPABASE_KEY (needsEnv, so the source seeds paused without them). Set on the Railway services and in the nichedb--prod vault.

Checks

  • bun test: 1364 pass (6 new).
  • biome check clean on the changed files (the repo's one remaining error is a pre-existing CSS specificity warning).
  • Version 0.23.0 → 0.24.0 in every manifest and the CLI.

Volume

The crawl can add a great many rows a day; pagesPerRun × 500 per 15-minute cadence caps growth (default ≈ 480k rows/day at most). Lower it on the source page if the collection grows faster than wanted.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UpE2YNWeoYxtu2B8oL2LPS

Torrents as the bittorrented.com crawler observes them on the BitTorrent
DHT. The site has no submit or export endpoint, but the function its own
/dht page reads through, browse_dht_torrents, is callable over PostgREST
with the publishable key the browser bundle already ships, so the adapter
reads the same rows the site does, sorted by date from a cursor (the one
shape the function has an index for; by seeders it hits its 15s timeout),
500 a page, paging by offset inside a shared timestamp because the crawler
writes in batches.

Adult material stays out: a torrent the crawler classes xxx is skipped, as
is one whose name says so in plain words. nichedb.dev is read through
family DNS filters, and the site this reads from went members-only for the
same reason.

Needs BITTORRENTED_SUPABASE_URL and BITTORRENTED_SUPABASE_KEY on the
deployment (never the service role key); the source seeds paused without
them. Feeds: newest, seeded, and one per content class.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UpE2YNWeoYxtu2B8oL2LPS
@ralyodio ralyodio changed the title 0.24.0: the dht collection, read from bittorrented.com's own database 0.26.0: the dht collection, read from bittorrented.com's own database Sep 13, 2026
@ralyodio
ralyodio merged commit 2699b76 into main Sep 13, 2026
3 checks passed
@ralyodio
ralyodio deleted the feat/dht-collection branch September 13, 2026 13:51
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.

1 participant