From a514cb13a6a7be438cb40a5231f7a2f48dcf659f Mon Sep 17 00:00:00 2001 From: haoyuren <13851610112@163.com> Date: Thu, 5 Mar 2026 15:50:38 -0600 Subject: Add README with example screenshot Co-Authored-By: Claude Opus 4.6 --- .gitignore | 1 + README.md | 32 ++++++++++++++++++++++++++++++++ example.png | Bin 0 -> 1094153 bytes 3 files changed, 33 insertions(+) create mode 100644 README.md create mode 100644 example.png diff --git a/.gitignore b/.gitignore index a6c57f5..e502019 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.json +!package.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..e865b36 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# SocialNet + +A single-file, local-first social network visualization tool built with D3.js. + +![Example](example.png) + +## Features + +- **Force-directed graph** — nodes for people, edges for relationships, centered on "me" +- **Familiarity levels** — color-coded nodes/edges (密友, 熟悉, 一般, 不太熟, 只见过, 没见过, unknown) +- **Custom tags** — relation tags (同学, 同事, ...), contact methods, personal info; all customizable and persistent +- **Transitivity** — define transitive relations (e.g. 高中同学's 高中同学 = 高中同学), auto-propagate connections +- **Proximity ranking** — Random Walk with Restart (closed-form) to rank how close each person is to you +- **Relation path finder** — BFS shortest path between any two people with visual display +- **Batch operations** — connect one person to all people with a certain tag; batch-set unknown familiarity levels +- **File persistence** — bind to a local JSON file via File System Access API; auto-saves on every change +- **Import/Export** — JSON import/export for backup and portability + +## Usage + +Just open `index.html` in a modern browser (Chrome/Edge recommended for File System Access API support). No server or build step required. + +## Data Storage + +- **localStorage** — graph data, custom tags, and transitive settings are saved automatically +- **Local file binding** — optionally bind to a `.json` file for durable persistence across browser resets + +Your data never leaves your machine. + +## Tech + +Single HTML file, zero build dependencies. Uses [D3.js v7](https://d3js.org/) loaded from CDN. diff --git a/example.png b/example.png new file mode 100644 index 0000000..a6ac278 Binary files /dev/null and b/example.png differ -- cgit v1.2.3