Repository navigation
Expand file tree
/
Copy pathcode-brain.html
More file actions
191 lines (182 loc) · 9.67 KB
/
Copy pathcode-brain.html
File metadata and controls
191 lines (182 loc) · 9.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Code Graph - Repositories by Domain, Language & Meaning | Moses Yebei</title>
<meta name="author" content="Moses Yebei">
<meta name="description" content="An interactive 3D map of 1,600+ repositories: group them by domain and language or lay them out by meaning, walk to similar repos, and grow any repo into its module structure.">
<link rel="canonical" href="https://moses-y.github.io/code-brain.html">
<meta property="og:type" content="website">
<meta property="og:url" content="https://moses-y.github.io/code-brain.html">
<meta property="og:title" content="Code Graph - Repositories by Domain, Language & Meaning | Moses Yebei">
<meta property="og:description" content="Group repos by domain and language or by meaning, walk to similar repos, then dive inside one.">
<meta property="og:image" content="https://moses-y.github.io/og-image.png">
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>⚡</text></svg>">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/site.css">
<link rel="stylesheet" href="assets/css/panel.css">
<link rel="stylesheet" href="assets/css/report.css">
<link rel="stylesheet" href="assets/css/reader.css">
<!-- Chrome both graph pages share; the page stylesheet below overrides it. -->
<link rel="stylesheet" href="assets/css/graph-shell.css">
<link rel="stylesheet" href="assets/css/code-brain.css">
</head>
<body>
<nav class="cg-nav">
<div class="cg-left">
<a href="/" class="nav-logo">MY</a>
<div class="cg-links">
<a href="/#pipeline">Pipeline</a>
<a href="/projects.html">Projects</a>
<a href="/code-brain.html" class="active">Code Graph</a>
<a href="/services.html">Services</a>
<a href="/case-studies.html">Case Studies</a>
<a href="/#about">About</a>
</div>
</div>
<a href="https://cal.com/moses-yebei" target="_blank" rel="noopener" class="nav-cta">Book a call</a>
</nav>
<div class="plate">
<aside class="rail" id="rail">
<div class="readout">
<div class="ro-hd"><span class="ro-lab">Estate readout</span><span class="ro-live">live</span></div>
<div class="ro-figs" id="ro-figs"></div>
</div>
<div class="dock">
<div class="title">
<div class="title-row">
<h1>Code Graph</h1>
<button class="icon-btn" id="dock-toggle" aria-expanded="true" title="Collapse controls" aria-label="Collapse controls">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2"><polyline points="18 15 12 9 6 15"/></svg>
</button>
</div>
<p class="sub">Every repository, grouped by domain and language or laid out by meaning. Click a repo for its neighbours; double-click to grow its inner structure.</p>
</div>
<div class="search">
<input type="text" id="search" placeholder="Search a repo, then Enter…" autocomplete="off">
</div>
<!-- Each choice is one dropdown, so the rail reads as a short form instead
of a column of toggles whose labels flip meaning when pressed. -->
<div class="ctl-grid">
<label class="ctl">View
<select id="f-view">
<option value="tree">By domain & language</option>
<option value="semantic">By meaning (semantic map)</option>
</select>
</label>
<label class="ctl">Colour
<select id="f-colour">
<option value="domain">Domain</option>
<option value="language">Language</option>
<option value="grade">Grade</option>
</select>
</label>
<label class="ctl">Domain
<select id="f-domain"><option value="">All domains</option></select>
</label>
<label class="ctl">Language
<select id="f-lang"><option value="">All languages</option></select>
</label>
<label class="ctl">Size
<select id="f-size">
<option value="">Any size</option>
<option value="s">Small (≤ 20 files)</option>
<option value="m">Medium (21–100)</option>
<option value="l">Large (100+)</option>
</select>
</label>
</div>
<!-- Only meaningful on the semantic map, where similarity edges are drawn.
The default matches the threshold data/clusters.json groups at. -->
<div class="edgectl" id="edge-ctl" hidden>
<label for="edge-min">Edge strength <strong id="edge-min-val">0.68</strong></label>
<input type="range" id="edge-min" min="0.40" max="0.95" step="0.01" value="0.68" aria-describedby="edge-count">
<span class="edgectl-n" id="edge-count"></span>
</div>
<div class="stats">
<span>Repos <strong id="s-repos">0</strong></span>
<span>Files <strong id="s-files">0</strong></span>
<span>Languages <strong id="s-langs">0</strong></span>
<span>Domains <strong id="s-domains">0</strong></span>
</div>
<div class="tools">
<button type="button" class="tool" id="reset">Reset view</button>
<button type="button" class="tool" id="legend-toggle" aria-expanded="true">Hide key</button>
<a class="tool" id="all-reports" href="report.html">All reports</a>
</div>
<div class="legend" id="legend"></div>
</div>
<div class="deck-hd">
<span class="ro-lab" id="deck-crumb">All domains</span>
<span class="ro-lab" id="deck-count"></span>
</div>
<div class="deck" id="deck" tabindex="0" aria-label="Drill-down browser"></div>
</aside>
<div class="stage">
<div id="graph"></div>
<button class="icon-btn" id="rail-toggle" aria-expanded="true" aria-controls="rail"
title="Hide panel" aria-label="Hide panel">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2"><polyline points="15 18 9 12 15 6"/></svg>
</button>
<div class="info" id="info">
<div class="pnl-hd">
<div class="kind" id="i-kind">Repository</div>
<button class="min" id="info-min" aria-label="Collapse panel" aria-expanded="true" title="Collapse">–</button>
<button class="close" id="info-close" aria-label="Close panel" title="Close">✕</button>
</div>
<h2 id="i-name">Node</h2>
<p id="i-desc"></p>
<div class="meta" id="i-meta"></div>
<div class="dive" id="i-dive" style="display:none">
<div class="label" id="i-dive-label">Dive inside</div>
<div class="btn-row">
<button class="cg-btn primary" id="report-btn" style="display:none">Read the report</button>
<button class="cg-btn" id="dive-btn">Grow structure</button>
<button class="cg-btn" id="collapse-btn" style="display:none">Collapse</button>
</div>
</div>
<div class="links" id="i-links"></div>
<!-- Neighbours from the published relation layer, same module and same
markup as Code Graph. Repo nodes only; it stays empty as you dive. -->
<div class="kin" id="i-kin"></div>
<div class="findings" id="i-findings"></div>
<div class="step" id="i-step">
<div class="label">Walk to a neighbour</div>
<div class="btn-row">
<button class="cg-btn" id="prev">◀ Prev</button>
<span id="n-count" class="n-count"></span>
<button class="cg-btn" id="next">Next ▶</button>
</div>
</div>
</div>
<div class="hint">
<strong>Click</strong> a repo for its neighbours · <strong>double-click</strong> to grow its modules · <strong>← →</strong> walk neighbours · <strong>drag</strong> orbit · <strong>Esc</strong> reset
</div>
<div class="loading-cg" id="loading">
<div class="spinner"></div>
<div>Wiring the brain…</div>
</div>
</div>
</div>
<div class="toast" id="toast"></div>
<script src="https://unpkg.com/3d-force-graph@1.73.4/dist/3d-force-graph.min.js"></script>
<script src="assets/js/report-grade.js"></script>
<script src="assets/js/report-render.js"></script>
<script src="assets/js/reader.js"></script>
<!-- Shared vocabulary, then data and panel, then the controller that uses them. -->
<!-- Canvas sizing and camera moves, shared by both graph pages. -->
<script src="assets/js/index-record.js"></script>
<script src="assets/js/graph-shell.js"></script>
<script src="assets/js/cb-dom.js"></script>
<script src="assets/js/cb-data.js"></script>
<script src="assets/js/cb-panel.js"></script>
<script src="assets/js/cb-layout.js"></script>
<script src="assets/js/cb-dive.js"></script>
<!-- Shared with Code Graph: reads /data/kin/<id>.json, the published layer. -->
<script src="assets/js/graph-grade.js"></script>
<script src="assets/js/kg-traverse.js"></script>
<script src="assets/js/code-brain.js"></script>
</body>
</html>