Wevna
A local-first runtime dashboard for Node.js backends: every HTTP request, SQL query, Redis command and console.log, streamed live and correlated back into the request that caused it.
6
packages, one frozen protocol
0
bytes of network egress
1.0
with a published stability contract
// stack
// architecture
pnpm + Turborepo monorepo, 6 packages · frozen @wevna/protocol contract · AsyncLocalStorage correlation context · opt-in pg/redis/fetch instrumentation behind a stable plugin API · Fastify server with WebSocket transport · deterministic performance analysis (no LLM) · React dashboard · session record and replay
// overview
Backend debugging usually means scattering console.log calls or tailing a log file, then reconstructing by hand which query belonged to which request and where the time actually went. Wevna gives you that view directly. One call at startup and a dashboard on localhost fills in live: a waterfall per request, an execution graph with real parent/child ordering, time attributed by category, and named insights like "the same query ran four times, 158ms in total". It is a six-package TypeScript monorepo built around a frozen protocol package that defines every event shape, envelope and session format — the SDK, server, intelligence layer and dashboard all conform to that contract rather than to each other. Local-first by design: no agent, no account, no network egress.
// what was built
- ·One call — `await wevna.start()` — and you get a live dashboard, every console.log captured, every HTTP request recorded with method, route, status and duration, and every uncaught exception attached to the request that produced it.
- ·Automatic correlation via AsyncLocalStorage: a SQL query, a Redis command or a log line fired anywhere in the call stack is attributed to the originating request, with no plumbing in application code.
- ·Architected @wevna/protocol as the single typed contract for the whole monorepo — event shapes, envelopes, session and recording file format — so the SDK, server, intelligence package and dashboard cannot drift apart.
- ·@wevna/intelligence performs deterministic analysis rather than LLM guesswork: request timelines, an execution graph with real parent/child ordering, time attribution by category, and repetition detection that names the N+1 query instead of leaving you to spot it.
- ·Database, cache and outgoing-fetch capture are opt-in by design — there is no global hook for "every pg.Pool", so you hand Wevna the client you already made, once, behind a stable plugin API.
- ·Framework enrichment for Express, Fastify and Nest, so route templates and error handling are understood rather than inferred.
- ·Fastify server with a WebSocket transport for live streaming, plus an offline session source that replays a recorded run — so a bug reproduced once can be inspected later.
- ·Local-first: no agent, no account, no network egress, nothing leaving the machine. A published STABILITY.md states exactly what semver covers and what the frozen protocol and plugin API guarantee.
- ·Also contributed the Plugin SDK proposal upstream, and the repo carries a written stability, testing and status contract rather than a roadmap presented as features.
System design
Drawn from the actual source: services, data ownership, message flow and failure paths. Drag to pan, scroll to zoom, or open any diagram fullscreen.
Monorepo architecture around a frozen protocol
Six packages that only agree because one of them is the contract. The protocol package defines every event shape, envelope and session format; the SDK, server, intelligence layer and dashboard all conform to it rather than to each other.
// engineering notes
The decisions worth talking through
The parts of this project where the interesting work was choosing between options, not writing the code.
A protocol package is the only thing that keeps a monorepo honest
Six packages that all touch the same events will drift the moment any two of them agree informally. Making the protocol its own package — with the event shapes, the envelope, and the on-disk recording format — means the SDK, the server, the analysis layer and the dashboard each conform to a contract rather than to each other. It also makes the recording format a first-class artefact, which is what allows offline replay to work at all.
Deterministic analysis, deliberately not an LLM
Every insight the dashboard shows — where the time went, which query repeated, what the execution graph looks like — is computed, not generated. For a debugging tool that is not a stylistic preference: an answer you cannot reproduce is worse than no answer, and a developer staring at a slow endpoint needs the number to be right, not plausible.