A Local GitHub Talent Dashboard Powered by the Lume DSL
Introduction
When doing recruiting or network-operator work, GitHub's public data is the cheapest source of "talent signal" — but it is not directly usable. A raw /users/<owner>/repos response has hundreds of fields and is nearly 250KB on a single page, and a browser hitting api.github.com directly also has to clear CORS. What lume-talentlens sets out to do is concrete: turn a person's GitHub footprint into decision material for "is this person worth following / worth hiring" (job-seeking status, engineering output, technical focus, network quality). To be precise: it does not claim to judge a person's real ability from GitHub metrics alone. It organizes scattered public engineering activity into explainable, traceable candidate leads — helping a recruiter decide what to look at next and what to verify, rather than replacing the hiring decision itself.
Its most counter-intuitive point is this: the server side is not Node/Python, but a single binary compiled from a self-designed DSL (Lume). This article does not walk you through building it from scratch; instead it tears the real code apart layer by layer — looking at how it uses Lume's routing / SSR / agent tools to cram "read GitHub snapshots, compute talent signals, run a chat agent" into one binary, while designing corresponding protections for the privacy exposure surface and the response-body cap.
TL;DR
- The server is a Lume single binary (prefork ×4), and
app/github.lumeonly does assembly:importeachlib/*.lumemodule to complete route/tool registration, thenserver {}+run()to start the service. - Two data sources, one serving path: by default it runs in local-snapshot mode — reads of existing snapshots issue no network requests; only an uncached owner switches it to on-demand online fetch mode, where the server proxies GitHub's API via
/api/live/github, bypassing the browser's CORS. With an external LLM configured,/chatalso reaches the remote model service — "zero network" applies to the snapshot-read path only, not to the app's entire runtime. - When the project started, Lume had no
lower/containsbuiltins yet, soshared.lumeshipped those two helpers (based onreplace); newer Lume has builtins for both, and the local helpers are kept only so the app still runs on older builds (including the public release binary).importdoes not propagate mutations across modules, soanalyze.lumeis all explicit(repos, snap)pure functions. - Response bodies have a hard cap (a historical release build would collapse at 64KB), so the whole project uses three unified tricks: aggregation (
/api/overviewreturns only stats), pagination (/api/repos≤50 per page), and projection (the live proxy slims the raw JSON down to consumed fields). - Safety gates rely on convention, not luck: bind only
127.0.0.1,.envfully gitignored, and Lume'senv()masks variables containingTOKEN/SECRET(the app reads the aliasGH_ANALYZER_PAT); write operations accept onlyapplication/jsonto block CSRF.
Overall Architecture: The Browser Trusts Only the Local Service
The topology is flat — the browser talks only to the local Lume service, and outbound traffic has only two destinations: the GitHub REST API and the LLM endpoint.
┌─────────────── Browser (127.0.0.1:8091)───────────────┐
│ React SPA (/, /chat) SSR pages (/overview etc)│
└───────────────┬───────────────────────┬───────────────┘
│ same-origin JSON / SSE │ same-origin HTML
┌───────────────▼───────────────────────▼───────────────┐
│ Lume server (single binary, prefork×4) │
│ entry github.lume → lib/* (routing/tools/rendering) │
│ bind 127.0.0.1:8091 │
└───┬───────────────┬───────────────────┬───────────────┘
│ read local file │ outbound http_get() │ LLM bridge (agent)
▼ ▼ ▼
data/github/<owner>/ api.github.com OpenAI-compatible endpoint
Key design: the server reads local files by default (local-snapshot mode). Snapshots are prefetched by scripts/fetch-github.sh into data/github/<owner>/, and the long-running service does not actively go online. Only when a user queries an owner not yet cached does it switch to on-demand online fetch mode, and the server proxies through /api/live/github — this step simultaneously bypasses the browser's egress/CORS restrictions on api.github.com.
Server Side: Wiring Everything with a Lume Single Binary
The entry app/github.lume is deliberately thin; routes and tools live in lib/, and take effect through top-level registration. server_port() / server_bind() read the port and bind address from environment variables, defaulting to 8091 and 127.0.0.1:
import "lib/shared.lume" as sh;
import "lib/api.lume" as api;
import "lib/live.lume" as live;
import "lib/ssr.lume" as ssr;
import "lib/tools.lume" as tools;
import "lib/actions.lume" as actions;
server {
port = server_port();
workers = 4;
bind = server_bind();
docroot = "./www";
views = "github";
}
run();
Lume's module mechanism is the foundation that makes this split work: get / tool written at a module's top level complete route/tool registration on import by the entry point, with no explicit call needed; nested import is relative to the module's own directory (lib/shared.lume writes import "analyze.lume" rather than lib/...); export func is callable across modules. But the importer's mutations to an incoming map/array do not propagate back to the exporter — so the pure-computation layer must explicitly receive and return data, rather than mutating the passed-in reference.
Dependencies point in one direction: github.lume → each lib/*; analyze.lume depends on nothing; ui.lume only does SSR rendering.
To be fair: Node.js could do all of this too — Lume's value is not that only it can, but a set of design trade-offs: one DSL describes routing, data logic, and agent tools in a single language surface; server-side dependencies collapse into one native binary with a minimal deployment shape; module boundaries plus a pure-function layer leave almost no implicit state; and the UI and the agent share one analysis vocabulary instead of computing separately. The costs are equally real: a small language ecosystem, some builtins you must fill in yourself (like the string helpers below), and a capability gap between the public release binary and dev builds that forces an explicit minimum-version requirement on the runtime.
Data Model and the Pure-Function Layer
The snapshot data/github/<owner>/snapshot.json is a pipeline artifact (the server reads it only). The raw API's ~100 fields are projected by fetch-github.sh down to ~24 fields/repo, and derived fields like created_year, recency buckets, and push_month are precomputed in the pipeline — the server only aggregates, never recomputes, which is why interfaces return in milliseconds.
lib/analyze.lume is the pure-function layer: every function takes (repos, snap) and returns JSON, with no IO, no env, no routing. Note that analyze builds a complete all array (with the full repo set), while what is exposed externally is analyze_lite — which drops all and keeps only aggregates and top-10, specifically to stay under the response-body cap:
export func analyze_lite(repos, snap) {
let a = analyze(repos, snap);
return {
owner: a.owner,
fetched_at: a.fetched_at,
profile: a.profile,
count: a.count,
non_fork_count: a.non_fork_count,
totals: a.totals,
languages: a.languages,
recency: a.recency,
years: a.years,
top_by_stars: a.top_by_stars,
top_by_activity: a.top_by_activity,
talent: a.talent,
push_trend: a.push_trend,
};
}
insight() computes talent signals from a recruiting perspective on top of analyze: the active_within_90d ratio, the with_desc/with_license/with_topics ratios, top2_language_share, and so on — these are exactly the same metrics shared by both the dashboard and the agent tools.
These metrics should be read as hypotheses to verify, not ability scores. A fairer reading:
| Metric | How to interpret it |
|---|---|
active_within_90d | degree of recent public activity, not actual work investment |
with_desc / with_license / with_topics | metadata hygiene of the repos, not code quality |
top2_language_share | concentration of public projects, not breadth of ability |
| stars × recent activity | attention and maintenance signal, still requires manual code review |
The same applies to the influence ranking of the people lists: the scores.json score is composed of repo breadth (≤40), follower reach (≤20), mutual-follow ratio (≤15), account age (≤10), and hireable/bio markers (≤8), capped at ≈93 in total; marked accounts are hard-demoted at merge time per suspects.json (high suspicion −20, medium −10, floor 0), and accounts whose profile fetch failed score 0 — it measures the visibility of a public engineering footprint, and the ranking only decides "who to look at first," never a conclusion. Also note: the suspects.json markings are heuristic leads, not confirmed verdicts — few followers, no repos, or an empty bio can all have innocent reasons; read them as "anomalous-account leads worth checking manually," not "proven bots."
Owner Resolution and Snapshot Reading: The Security Boundary Starts at the Parameter
Every route/tool's first step is to resolve the owner. sanitize_owner in lib/shared.lume guards the owner as a single path segment: length ≤39, and forbidden characters . / % space # ? etc. The purpose is direct — the data/github/<owner>/ directory lookup can never escape data/github/:
export func sanitize_owner(s) {
if (s == null) { return ""; }
s = str(s);
if (s == "") { return ""; }
if (len(s) > 39) { return ""; }
if (contains(s, ".") or contains(s, "/") or contains(s, "%")
or contains(s, " ") or contains(s, "#") or contains(s, "?")
or contains(s, "\n")) {
return "";
}
return s;
}
export func load_snap(owner) {
let raw = read_file("data/github/" + owner + "/snapshot.json");
if (raw == null) { return null; }
let s = json(raw);
if (s == null) { return null; }
return s;
}
When the project started, Lume had no lower / contains builtins yet, so shared.lume shipped those two helpers, both cobbled together with replace (contains judges containment by "the string gets shorter after replacement"); newer Lume has these string functions built in, and the helpers remain only for compatibility with older builds (including the public release binary). The multi-owner resolution priority is: ?owner= > OWNER env var > data/github/last_owner > default (when not found, returns empty string, so the JSON route goes to no_snapshot); when the snapshot is missing, the JSON route uniformly returns {status:404, error:"no_snapshot", owner:<owner>, hint:"run: OWNER=<owner> make fetch (or make fetch OWNER=<owner>)"}.
Live Proxy and the Response-Body Cap
/api/live/github in lib/live.lume is the server-side exit that proxies GitHub. It first passes live_safe_path, an SSRF guard. This is an endpoint allowlist: only the four user-scoped GET shapes the frontend actually issues may pass (/users/{owner}, /users/{owner}/repos, /followers, /following); the owner segment is strictly GitHub-login shaped ([A-Za-z0-9-], 1..39 chars, percent-encodings rejected outright — encodeURIComponent is the identity transform for legal logins, so allowing %XX would only widen the encoded-traversal surface), and the query string is validated against a key allowlist (type/sort/direction/per_page/page) with plain-token values. The //, space, .., and # guards are kept as defense in depth. Any path that does not match is rejected before it is ever joined onto the fixed https://api.github.com prefix:
// endpoint allowlist (excerpt): segment + charset checks
let segs = split(path, "/");
let nseg = len(segs);
if (nseg != 3 and nseg != 4) { return false; }
if (segs[0] != "" or segs[1] != "users") { return false; }
if (not live_valid_owner(segs[2])) { return false; } // [A-Za-z0-9-], 1..39
if (nseg == 4) {
let tail = segs[3];
if (tail != "repos" and tail != "followers" and tail != "following") { return false; }
}
return live_valid_query(q); // key allowlist + plain-token values
The guard's behavior is pinned by 39 cases in tests/live_guard.lume: it accepts the five real call shapes the frontend sends and rejects host/scheme smuggling, %2F/%2E%2E encoded traversal, backslashes, off-allowlist endpoints, and rogue query params; it is wired into the make test gate. You can reproduce the guard test independently — it needs no snapshot data and no running server:
$ lume tests/live_guard.lume
PASS 39/39
A raw 100-repo page is ~250KB, far exceeding the framework's single-response-body cap, so slim_body must project before returning (/repos → 16 fields/item, /followers|/following → 5 fields, profile → 15 fields). The proxy also does two layers of caching: an in-memory TTL (LIVE_CACHE_TTL_SEC, default 300s) and a disk-backed data/github/live/ (shared across restarts, default 24h) — only successful responses are cached, so transient errors are never pinned. gh_get itself carries 3 retries (against the occasional TLS handshake reset on mainland networks), but 403/429 return immediately, no retry, no quota burn.
Frontend: A Lightweight React + esbuild SPA
The frontend is React 18 + TypeScript, bundled with esbuild, no webpack/vite, with pnpm managing dependencies. scripts/build-ui.sh bundles frontend/src/main.tsx into www/github/app.js. api.ts uniformly wraps fetch with a j<T>() layer: on 404/non-ok it tries to parse the no_snapshot body, and only throws if it cannot — because "no snapshot" is a normal business state and should not be treated as an exception:
async function j<T>(url: string): Promise<T> {
const r = await window.fetch(url);
if (r.status === 404 || !r.ok) {
try {
return (await r.json()) as T;
} catch {
throw new Error(url + " -> " + r.status);
}
}
return (await r.json()) as T;
}
The component tree is organized from an HR perspective: Dashboard.tsx assembles panels (overview/talent-signal/comparison), lists (followers/following/bots/worth-following + radar-profile cards), bars (language/activity/year bar charts); Agent.tsx takes the SSE route to /chat; LangSwitch + i18n.ts do the Chinese/English switch, with all copy going through a dictionary and the switch persisted. Lists are ranked by the server-side scores.json influence; high scores get a badge, and the bot chip's tooltip shows the judgment basis directly.
Agent Tools: 10 repo_/github_
lib/tools.lume registers 10 agent tools (repo_insights / repo_search / repo_language / repo_recency / repo_year / repo_stats / github_story / github_owners / github_radar / github_people). They run on forked workers, reading the snapshot fresh on each call, so there is no shared mutable state. github_people also merges the bot markers from suspects.json at the tool layer into the return, so the agent sees the same chips as the UI. /chat goes through Lume's LLM bridge; when LLM_* is not configured, a built-in fallback engine answers without any model dependency.
A Few Gates on Privacy and Security
This is not "add security after launch" — it is writing conventions into the architecture:
- Network exposure: bind only
127.0.0.1, no external listening; containers set0.0.0.0and publish only on the host loopback. - Credentials not in code:
.env,data/github/,logs/are all gitignored;scripts/env.shsuppressesbash -xwhen loading to prevent echo-back. - Credentials not in the app: Lume's
env()masks variables whose names containTOKEN/API_KEY/SECRET/PASSWORD; the live proxy reads the aliasGH_ANALYZER_PAT, which the Makefile maps fromGH_TOKEN. - Responses leak no secrets:
/api/github_authreturns only{authed:bool}; live/refresh responses contain no token. - Write-operation CSRF: follow/unfollow accepts only
Content-Type: application/json; cross-site JSON is blocked by the missing CORS header + preflight, and HTML form / text-plain payloads are 403-rejected before the body is even parsed. This layer is part of the overall defense, not the only mechanism: if a lax CORS policy is ever opened up or the service is deployed to a public network, Origin validation, authentication, and CSRF protection must be re-evaluated —Content-Typechecking alone cannot be the backstop. - Data isolation: snapshots/network/radar all live in the gitignored
data/github/; the code hardcodes no owner.
To state the boundary honestly: the 127.0.0.1 default binding shrinks the attack surface and lowers the risk of data exposure, but it does not mean "privacy and security are fully guaranteed." Still to be accounted for: other local processes on the same machine can still reach the port; the Agent chat may send candidate data off-box through the LLM bridge; whether the file-system permissions on local snapshots / logs / caches are appropriate; and whether a Docker port mapping or reverse-proxy misconfiguration could expose the service. Treat loopback + gitignored credentials + env() masking as the first layer of defense in depth, not the only guarantee.
One pit worth recording: the **public release binary of Lume (agent-httpd 1.0) does not build in http_get/put/delete**, so running this app would fail at runtime — you must use a full Lume build that includes the outbound-HTTP builtins (e.g. built from source with make). To close this "release vs. dev-build capability drift" compatibility gap, we recommend publishing an explicit minimum Lume version requirement and maintaining a builtin-function list + integration tests alongside each release, so users never discover a missing builtin only at runtime.
FAQ
Why does lume-talentlens's server use the self-designed Lume DSL instead of Node/Python?
Because it has to fit into a single binary: a native HTTP server + SSR + agent tools + LLM bridge in one stop, plus a local-snapshot-only default and zero third-party Python dependencies. Lume's top-level registration (effective on import) and server{} config make the split of routing/tools/rendering very lightweight. The cost is that when the project started Lume lacked some string builtins (the app ships its own helpers as a fallback), and that the public release binary lacks outbound-HTTP builtins — these two constraints.
How exactly does the response-body cap affect the interface design?
The Lume framework has a hard cap on a single response body (a historical release build would collapse at 64KB). The whole project handles it with three tricks: /api/overview returns only aggregate stats, not the repo list; /api/repos paginates, ≤50 items per page; /api/live/github projects the raw GitHub JSON down to the app's consumed fields (/repos → 16 fields/item) before returning. An unprojected 100-repo page at ~250KB would blow it up directly.
How does the browser bypass GitHub's CORS?
It does not hit api.github.com directly from the browser. Uncached owners are proxied by the server through /api/live/github; the server's outbound path has none of the browser's CORS/egress restrictions; live_safe_path prevents SSRF with a fixed host prefix + an endpoint allowlist (four user-scoped GET shapes, owner charset, query key/value allowlist), and slim_body projects and slims before returning.
For a local-only recruiting dashboard, how is the data-exposure surface minimized?
Snapshots are pulled by a prefetch script into local data/github/<owner>/, and the long-running service reads local snapshots only — reads of existing snapshots issue no external requests; .env and data/ are gitignored, so a public clone carries no personal data; Lume's env() masks variables containing TOKEN/SECRET, and the app reads the alias GH_ANALYZER_PAT; /api/github_auth returns only a boolean, never a token; write operations accept JSON payloads only to block CSRF. These are conventions that minimize the exposure surface and lower risk — not a promise of "absolute security"; same-machine processes, LLM egress, file permissions, and proxy misconfiguration still need separate evaluation.
Do the 10 repo_/github_ tools behind /chat read live data?
No, not live. They run on forked workers and read the local snapshot fresh on each call (data/github/<owner>/snapshot.json), so there is no shared mutable state, and the tool calls themselves issue no external requests (if an external LLM is configured, the LLM bridge does reach out to the model service on /chat). To refresh data you must first OWNER=x make fetch or hit /api/refresh (rate-limited to 60s per owner), and only then will queries see the new snapshot.
make dev won't start and reports an http-related undefined — what do I do?
That means you are using the public release binary (agent-httpd 1.0), which does not build in http_get/put/delete. Switch to a full Lume build that includes the outbound-HTTP builtins (e.g. a source build; specify the path with LUME=). The make dev startup probe validates the outbound-HTTP builtin with printf 'print(http_get);' | $LUME -, and refuses to start if it is missing.
An End-to-End Scenario: Quickly Sizing Up an Unknown GitHub Account
Reading about module splits alone makes it easy to get lost in implementation detail. The walkthrough below ties every capability above into one end-to-end scenario — the goal, after taking an unfamiliar username, is to quickly judge "what to look at / verify next," not to produce a composite score. All figures below are synthetic demo data; reproduction steps are at the end of this article.
- Enter the username: fill in
owneron/overview; in local-snapshot mode the server readsdata/github/<owner>/snapshot.json; if absent it switches to on-demand online fetch mode and proxies and persists through/api/live/github(governed by thelive_safe_pathSSRF guard). - See representative repos and the tech stack:
/reposreturns the projected repo list paginated;/overview'slanguagesgives the language distribution andtop2_language_shareconcentration. - See network and anomalous-account leads:
/peoplereturns followers / following; the radar card + bot chip's tooltip show the matching rules and suspicion level directly (suspects.jsonis merged into the return at thegithub_peopletool layer; markings are heuristic leads, not confirmed verdicts). - Ask the Agent: on
/chat, ask "which of this person's repos are most worth reviewing further?" —repo_insights/repo_statsread the same snapshot fresh and rank repos by stars / 90-day activity. - Return verifiable evidence: the Agent's answer points to specific repos and their stars, push months, fork flags — publicly verifiable fields — rather than a composite ability score.
Sample output (synthetic demo data, not a real run; the tool-call sequence and judgment rules are based on the real 10
repo_*/github_*tools):You: Which of octocat's repos are most worth my further look? Agent:
repo_insights(octocat)returns 23 non-fork repos for this account. Cross-ranking by stars and 90-day push activity, the top review priorities aresandbox-monorepo(1,842 stars, last push 2026-09, non-fork) andtiny-queue(640 stars, last push 2026-08, non-fork) — the repo names and numbers can be checked against the raw snapshot fields on the/reposdashboard. I only rank "public engineering-activity intensity" — I draw no conclusion about "code quality." You: Does he have any anomalous accounts among his followers worth checking? Agent:github_people(octocat)yields 4 high-suspicion leads. One example:crypto-airdrop-77follows 1,203 accounts with only 2 followers (a one-way ratio of about 600:1), owns 0 repos, and has an empty bio — matching the abnormal-follow-ratio / zero-repos / empty-bio rules, suspicion level high (consistent with the dashboard's bot chip tooltip, fromsuspects.json); these are heuristic leads, and a real conclusion needs manual review.
This advances the article from "I built an app in a self-designed DSL" to "I solved a concrete problem with this architecture" — and the Agent's output stays anchored to verifiable public fields, never overstepping into ability judgment.
Note: the dialogue above is a sample output — the account and numbers are synthetic, for demonstrating the interaction shape only. Reproducibility has two layers: rule reproducibility (tool-call shape, ranking vocabulary, and judgment rules can be checked directly against the repo source) and result reproducibility (re-running on the same snapshot should yield consistent rankings and hit counts; shipping a synthetic snapshot sample + expected JSON output so readers can verify the analysis logic with zero dependencies is on the project's follow-up list). For real run screenshots, run
make devon your machine and capture the dashboard and/chatwindows (the app depends on a full Lume build with the outbound-HTTP builtins). Shortest path from clone to a running server:git clone https://github.com/erishen/lume-talentlens && cd lume-talentlens (cd frontend && pnpm install) # first clone only: frontend deps (React/esbuild/TS) OWNER=<x> make fetch # snapshot <x>'s GitHub data into data/github/ make dev # foreground server, default 127.0.0.1:8091 (Lume capability probe runs first) curl localhost:8091/api/overview?owner=<x> # inspect the aggregatesThere is no background
make run—make devis the one dev loop and it kills whatever already holds the port before starting. If startup reports an http-related undefined, see the FAQ above (the public release binary lacks the outbound-HTTP builtins; switch to a full build).
Project Links
- GitHub repository: https://github.com/erishen/lume-talentlens
| Module | File | Notes |
|---|---|---|
| Entry & assembly | app/github.lume | import modules + server{} + run() |
| Shared layer | app/lib/shared.lume | owner resolution, snapshot reading, string helpers, gh_get retries |
| Pure analysis layer | app/lib/analyze.lume | repo_view / analyze / insight / histograms (no IO) |
| JSON routes | app/lib/api.lume | owners/overview/repos/people/radar/refresh and 16+ endpoints |
| Live proxy | app/lib/live.lume | /api/live/github proxy + SSRF guard + two-layer cache |
| Agent tools | app/lib/tools.lume | 10 repo_/github_ agent tools |
| Frontend API client | frontend/src/api.ts | unified fetch wrapper + no_snapshot handling |
| Architecture doc | ARCHITECTURE.md | layering, data model, data flow, security boundaries |
Enjoy this article?
erishen/lume-talentlens
Comments (0)