Skip to content

Interactive ego-network (force-directed) graph viz on profiles #3

@melvincarvalho

Description

@melvincarvalho

What

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    diddid:nostr / DID methodenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions