HUB
Sign inSign up

dominic908/fb-middle-man

By dominic908

•Updated about 2 hours ago

FB Middle Man: standalone Zig Facebook collector — ask, briefing, breaking, timeline, trust.

Image
0

56

dominic908/fb-middle-man repository overview

⁠Run it

docker pull dominic908/fb-middle-man
docker run --rm --network host dominic908/fb-middle-man demo
docker run --rm --network host dominic908/fb-middle-man ask "what happened today in Liberia"

Feed (collect feed, browser extension) needs --network host — it listens on loopback only.

⁠FB Middle Man

Standalone Zig Facebook GraphQL collector. Ask one question, get one ranked answer. Anonymous only: no account, no cookies, no login. Public content only. Zig 0.17.1, std.http only, no external dependencies. Baseline CPU build, any x86-64 Linux.

Developer guide: docs/DEVELOPER.md — every command, flag, and output shape. Docker: Dockerfile — run the collector in a container; see docs/DEVELOPER.md.

⁠Build

zig build  # zig-out/bin/collect + zig-out/bin/understand
zig build test  # 259 tests (225 main + 34 AI)
sh scripts/make-bundle.sh  # one static file: ./fb-middle-man, verified with the offline demo

⁠Commands

collect --help lists everything; collect --help shows its flags. JSON goes to stdout or --out ; the short summary goes to stderr.

collect ask "what happened today in Liberia"  # one ranked answer; classifies page/post/group/person/keyword/question itself
collect briefing  # top 5 stories, last 24h; NEW / UPDATED / unchanged vs yesterday (alias: morning)
collect breaking  # 3+ independent pages on one story within 60 min, no keywords
collect timeline "<topic or post URL>"  # first post, pickups in order, what changed, corrections flagged
collect trust [--snapshot]  # trust score per page + our own rank (trust + followers + engagement)
collect demo  # briefing + breaking + timeline on bundled sample data, no network
collect -testAll  # full live test at once; PASS/FAIL/RATE-LIMITED/SKIPPED per check + summary, evidence in ./testall/
collect search --query <q> --type profile --limit 10  # 10 people/pages/groups at a time; --cursor <next_cursor> for the next page
collect watch --pages registry --keywords "bridge" --interval 30 --once  # new keyword-matching posts only
collect feed  # listens on 127.0.0.1:18711 for the browser extension
collect doctor  # probes all ten GraphQL queries, reports live/stale + reason
collect refresh-doc-ids  # rediscovers doc ids from Facebook's JS (takes minutes)

Advanced (under collect advanced --help): scrape, search, reactors, profile, group, members, post, browser-scrape, browser-capture.

⁠How answers are ranked

Corroboration first, engagement velocity second. Confidence comes from corroboration only: 1 source → 0.35, 2 → 0.6, 3 → 0.8, 4+ → 0.9. A story is verified with 2+ independent sources; single-source stories are flagged. Popularity is NOT verification. Every post carries its media with streamability flags; --download-media saves files, login-walled URLs are skipped and listed. Date words map to a window ("today", "yesterday", "this week", "last week"); --after / --before / --timezone override. An HTML report is written next to the JSON by default (--no-html skips it).

⁠Media understanding

Phase 1 (in collect, no AI): captions (VTT/SRT), alt text, dHash near-duplicate photos, scene cuts, speech/silence segments, QR payloads. Needs --download-media. Phase 2 (separate understand plug-in, only on Phase 1-flagged material): understand stt | tag | both | doctor. CPU only, no GPU; --threads sets the budget (0 = auto). Contract: docs/ai-contract.md. Install models: sh scripts/download-models.sh, sh scripts/build-whisper.sh, sh ai/yolo_onnx/build.sh.

⁠Notes

  • Anonymous only, by rule. No session-cookie mode, no marketplace search.
  • Facebook rate-limits datacenter IPs: expect rate-limited (1675004) from a VPS. Live results come from a residential IP.
  • Browser fallback (GraphQL route dead): Node.js helper in browser-fallback/ — see its README. Extension feed: see browser-extension/README.md.

Tag summary

Content type

Image

Digest

sha256:44c6e9936…

Size

447.8 MB

Last updated

about 2 hours ago

docker pull dominic908/fb-middle-man