Skip to content

Commit dfbe95a

Browse files
Blackman99claude
andcommitted
docs: add hero feature illustration and root README
- Create SVG hero image showcasing graph visualization with risk-scored nodes, bezier edges, transfer labels, and feature badges - Add hero image to VitePress home page - Create root README with feature list, quick start, and project overview Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 45c8384 commit dfbe95a

3 files changed

Lines changed: 291 additions & 0 deletions

File tree

README.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# TxGraph
2+
3+
Blockchain transaction tracing graph components for React. Trace, visualize, and analyze on-chain transaction flows.
4+
5+
<p align="center">
6+
<img src="docs/public/hero-features.svg" alt="TxGraph feature overview" width="720" />
7+
</p>
8+
9+
## Features
10+
11+
- **Risk-scored nodes** — color-coded risk levels (high / medium / low / unknown) with entity tags
12+
- **Path highlighting** — click any node to trace the fund flow from root, dimming unrelated edges
13+
- **Smooth bezier edges** — labeled with transfer amount, token, and timestamp (to the second)
14+
- **Two renderers** — ReactFlow (DOM-based, up to 500 nodes) and Sigma.js (WebGL, 500+ nodes)
15+
- **Dark / Light mode** — auto-detects `document.documentElement.classList` for `dark` class
16+
- **Interactive** — expand nodes on-demand, delete nodes, zoom / pan / fit-view
17+
- **AI-agent friendly** — REST API with self-registration, MCP-compatible tool definitions
18+
19+
## Quick Start
20+
21+
```bash
22+
pnpm add @trustin/txgraph
23+
```
24+
25+
```tsx
26+
import { GraphExplorer } from '@trustin/txgraph'
27+
28+
<GraphExplorer
29+
nodes={nodes}
30+
edges={edges}
31+
stats={stats}
32+
onNodeSelect={(node) => console.log(node)}
33+
onNodeExpand={(address) => fetchMore(address)}
34+
onNodeDelete={(address) => remove(address)}
35+
/>
36+
```
37+
38+
## Project Structure
39+
40+
```
41+
txgraph/
42+
packages/react/ # @trustin/txgraph — core React components
43+
examples/local-demo/ # Vite demo app connected to TrustIn API
44+
docs/ # VitePress documentation site
45+
```
46+
47+
## Development
48+
49+
```bash
50+
# Install dependencies
51+
pnpm install
52+
53+
# Build the core package
54+
pnpm build
55+
56+
# Run the demo (requires VITE_TRUSTIN_API_KEY in examples/local-demo/.env)
57+
pnpm dev:demo
58+
59+
# Run the docs site
60+
pnpm dev:docs
61+
```
62+
63+
## Four Layers
64+
65+
| Layer | Description | Link |
66+
|-------|-------------|------|
67+
| **Layer 1** | Use TrustIn Explorer at [v2.trustin.info](https://v2.trustin.info) | [Guide](https://blackman99.github.io/txgraph/guide/layer1-product) |
68+
| **Layer 2** | AI Agent API — self-register and trace addresses | [Guide](https://blackman99.github.io/txgraph/guide/layer2-agent) |
69+
| **Layer 3** | Run the demo locally with your own API key | [Guide](https://blackman99.github.io/txgraph/guide/layer3-demo) |
70+
| **Layer 4** | Install `@trustin/txgraph` and build your own UI | [Guide](https://blackman99.github.io/txgraph/guide/layer4-component) |
71+
72+
## Documentation
73+
74+
Full documentation: [blackman99.github.io/txgraph](https://blackman99.github.io/txgraph/)
75+
76+
## License
77+
78+
MIT

docs/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ hero:
44
name: TxGraph
55
text: Blockchain Transaction Tracing
66
tagline: Trace, visualize, and analyze on-chain transaction flows. Open source, AI-agent friendly.
7+
image:
8+
src: /hero-features.svg
9+
alt: TxGraph — transaction graph visualization with risk scoring, path highlighting, and multi-renderer support
710
actions:
811
- theme: brand
912
text: Get Started

docs/public/hero-features.svg

Lines changed: 210 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)