Skip to content

Follow nichedb.dev for a campaign: its open collections become crawls, on a clock - #75

Merged
ralyodio merged 1 commit into
mainfrom
feat/nichedb-discovery
Sep 13, 2026
Merged

ralyodio merged 1 commit into
mainfrom
feat/nichedb-discovery

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Anthony: "automate the shit maybe a nichedb.dev/all.json or something and we crawl that shit with a daemon to discover people to outreach in our profile db for selling promoting sharing later."

discover_nichedb (packages/pipeline/src/nichedb-discovery.ts)

  • Reads nichedb.dev's webrings (members), sites (OpenSite pages) and profiles (people with a home page) since a cursor, via the keyless items API, up to five pages per collection per run.
  • One candidate per host; github.com, x.com, linkedin.com and the other platforms, our own hosts, and *.l.ink are skipped.
  • Queues crawl_site per new host with dedupeKey crawl:<campaign>:<host> and batchId = the run, so the intake screen reports it like any batch.
  • Queues its own next run everyMs later (default 6 h) with the newest updated_at as since. Two alternating dedupe keys (nichedb:<campaign>:a / :b) keep exactly one next run outstanding while the current one is running.
  • Emits discover events; needs no model.

API

  • POST /api/v1/campaigns/:id/discover/nichedb {collections?, everyHours?, limit?, since?} → 202. Replaces any pending schedule.
  • GET …/discover/nichedb{following, runs[]}.
  • DELETE …/discover/nichedb → removes the pending run; a running one finishes without a successor.

Worker dispatch, pipeline exports and the activity label are wired. Tests: candidate extraction, host rules, a full run against a stubbed nichedb (3 crawls queued, next run queued with the cursor), the incremental run and the double-schedule guard, stop.

First use: the "LogicSRC open standards" campaign in Anthony's workspace, so the people publishing OpenWebring, OpenSite and OpenProfile data end up as prospects for the specs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XYae2mH3khdwiXUVzcVMDw

…, on a clock

nichedb.dev's webrings, sites and profiles collections are lists of
people's own sites, with who makes each one and what it publishes about
itself. Anyone in there publishes on the open web in a machine-readable
way, which is who an open-standards offering wants to talk to.

The `discover_nichedb` job reads each collection since a cursor through
nichedb's keyless items API (sort=updated, order=asc, since=), turns
items into candidate sites (one per host; platforms, our own hosts and
the l.ink pages skipped; a profile's site from its accounts or its
OpenProfile), queues a `crawl_site` per new host under the campaign, and
queues itself again with the newest updated_at as the next cursor,
everyMs from now. Two alternating dedupe keys per campaign keep one next
run outstanding while a run is still running. Needs no model.

POST /campaigns/:id/discover/nichedb starts or re-tunes it
(collections, everyHours, limit, since), GET reads the pending and
running runs, DELETE stops it; a running job whose row was deleted under
it finishes without a successor.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYae2mH3khdwiXUVzcVMDw
@ralyodio
ralyodio merged commit 8ac24bc into main Sep 13, 2026
4 checks passed
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