| 19 |
19 |
| Media | video detection (DOM `<video>` + manifests/segments + video entities), frame sampling at LEVEL ≥ 2 | |
| 20 |
20 |
| Learning | `data/platform_model/<platform>/` (response, action, page, media patterns), degradation signal, connector manifest compilation | |
| 21 |
21 |
| Storage | PostgreSQL (raw observations, entities, media, actions, schemas, feed items, relationships) + JSONL replay log | |
| 22 |
|
−| Dashboard | `pnpm dashboard` → http://localhost:8340 (decisions, page state, entities, schemas, media, connector confidence, world model, raw events) | |
|
22 |
+| Console | **www.socialcrawl.co** — Next 16 research console (`apps/dashboard`): observatory, session console (decisions, page state, entities, runtime APIs, media, world-model graph, live events), entity evidence, runtime API explorer, connectors, mission launcher. Passcode gate. | |
|
23 |
+| Control plane | `apps/api` (node:http, port 8350): overview/sessions/entities/schemas/platforms queries, SSE `/api/stream`, job runner (spawns worker processes, `crawl_jobs`). Mutations need `SRC_API_TOKEN`. | |
| 23 |
24 |
| Adapters | YouTube, Reddit (Phase 1). Facebook/Instagram/TikTok/X/LinkedIn/Threads: not yet | |
| 24 |
25 |
|
| 25 |
26 |
Read-only by construction: no like/follow/comment/share/subscribe code path exists. |
| 33 |
34 |
|
| 34 |
35 |
pnpm login youtube # opens Chromium, log in by hand, press Enter → profile saved |
| 35 |
36 |
pnpm crawl youtube --query "intelligence artificielle Québec" --goal "Discover public Quebec creators discussing AI" --minutes 10 |
| 36 |
|
−pnpm dashboard # research console |
|
37 |
+SRC_API_PORT=8350 pnpm api # control-plane API |
|
38 |
+pnpm dashboard:dev # console on http://localhost:8351 (API_URL=http://127.0.0.1:8350; set SRC_DASHBOARD_PASSCODE to enable the gate) |
| 37 |
39 |
|
| 38 |
40 |
pnpm learn youtube --minutes 15 # PLATFORM LEARNING mode + connector compilation → connectors/youtube/manifest.json |
| 39 |
41 |
pnpm src status youtube # "Platform learned: page types / entity types / schemas / confidence" |
| 45 |
47 |
|
| 46 |
48 |
LLM planner: set `SRC_LLM_PROVIDER=anthropic` (uses `ANTHROPIC_API_KEY` or an `ant auth login` profile, model `claude-opus-5`) or `SRC_LLM_PROVIDER=local` with `SRC_LOCAL_LLM_URL` / `SRC_LOCAL_LLM_MODEL` (e.g. llm-api.io on the cluster). The LLM is only consulted when the heuristic is unsure, only sees the compact page state, and can only pick an existing action id. |
| 47 |
49 |
|
|
50 |
+## Deployment (MacLustr) |
|
51 |
+ |
|
52 |
+`deploy/social-runtime-crawler.mld.json` → `M1M32:~/dispatch/apps/social-runtime-crawler.json`. `mld stage . social-runtime-crawler && mld deploy social-runtime-crawler` |
|
53 |
+places the app on the best node (Postgres 17 local `social_runtime`, PM2 `socialcrawl-api` :8350 + `socialcrawl-web` :8351, Chromium installed by hook) and routes |
|
54 |
+`https://www.socialcrawl.co` through the MacLustr Tunnel (BHS64). Browser profiles live on the node (`~/apps/social-runtime-crawler/data/browser_profiles`): log in once |
|
55 |
+through Screen Sharing with `pnpm login <platform>`. Secrets (API token, passcode) live only in the manifest on the gateway. |
|
56 |
+ |
| 48 |
57 |
## Layout |
| 49 |
58 |
|
| 50 |
59 |
``` |
| 51 |
60 |
apps/worker CLI + crawl engine (observe → plan → act → learn loop) + action executor |
| 52 |
|
−apps/api dashboard server (node:http) + public/index.html |
|
61 |
+apps/api control-plane API (node:http): queries, SSE stream, job runner |
|
62 |
+apps/dashboard SocialCrawl research console (Next 16 + React 19 + Tailwind 4 + recharts + d3-force) |
| 53 |
63 |
packages/shared types (platforms, surfaces, entities, actions, budgets), utils, logger, config |
| 54 |
64 |
packages/events Universal Social Event Format, typed bus, JSONL replay log |
| 55 |
65 |
packages/browser SocialBrowserSession (persistent profile), interactive login |