You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Interactive ego-network (force-directed) graph viz on profiles #3
Replace the static follow-dot grid on a profile with an interactive ego-network force-directed graph: the identity + its follows, with the follow-edges among those follows drawn so clusters/communities show.
Feasibility (probed — it's ready)
Data is fast: fetch the ego's follow-list, then one $in batch over the alters' follows docs (~20–50ms), intersect in memory.
Density is real for active accounts: one ego (390 follows) yields 18,428 intra-network edges; nolim1t's followers show 557 edges in a 50-sample. Inactive/niche accounts are genuinely sparse (expected social-graph structure, not a bug).
Backend
GET /api/graph/:pubkey → { nodes, edges }:
nodes = the ego + up to ~120 of its follows (cap by the follow's own follower-count so dense egos stay legible), each with { pubkey, name, picture, followers }.
edges = follow-relationships among the selected nodes (optionally thresholded for very dense egos).
Frontend
Hand-rolled canvas force simulation (~120 lines, zero new client deps — matches beacon's from-scratch style). Nodes rendered as the gradient avatars, sized by follower-count; faint edges; drag + click-a-node to navigate to /<hex>.
Degrade gracefully: sparse egos render a light radial; dense egos render a capped, readable cluster.
Acceptance
Profile shows an interactive graph; dense egos stay smooth via the node cap; clicking a node routes to that identity.
Activity