- a dashboard served by the local collector;
stacknextCLI commands for status, coverage, diagnostics, snapshots and regression records;- a read-only MCP server for AI coding agents;
- redacted snapshots and regression records stored under
.stacknext.
Data flow
Fig 0.1Local data flow
Your app
- Next.js
- Drizzle
- Prisma
plus custom spans and manual action helpers
spans · query events · errors
Instrumentation
redact@stacknext/next
redacts in the app · sends asynchronously, off the request path
loopback only · bearer token
Collector · one Node process
redact127.0.0.1:4400
validates every envelope · never blocks a request
in-memory sample
5,000 spans · 10-minute window
capacity limits · drop counters
same sample · read-only
Dashboard
requests · traces · queries
CLI + export
coverage · diagnose · snapshot
MCP server
read-only tools · GET only
only on an explicit save
Local records · redacted
snapshotsrunsbaselinescomparisons
.stacknext/ · 0600 files · never uploaded or auto-deleted
stacknext dev starts the collector and runs your app’s own dev script. It
writes the collector URL and a short-lived bearer token to
.stacknext/run.json and passes them to the Next.js process. The app sends
telemetry over loopback only.
What you can answer
Local-first by design
Runtime evidence often contains enough information to identify a bug, but sending it to a hosted service adds an account, a network boundary and a new privacy decision. StackNext binds the collector to127.0.0.1, requires a
bearer token for ingestion, stores telemetry in memory with capacity and
retention limits, and keeps explicit records in redacted local files.
The result is a debugging loop that works offline and never needs an AI API key.
The MCP client you connect may still send tool results to a hosted model; that
is the client’s policy, not a StackNext network path.
What it deliberately does not do
- It does not capture bodies, headers, cookies, URL query values or SQL bind parameters.
- It does not support the Edge runtime, production instrumentation or frameworks other than Next.js App Router.
- It does not run SQL or
EXPLAIN, edit source code or recommend indexes from telemetry alone. - It does not treat a heuristic finding as a confirmed root cause or a comparison as a statistical test.
- It does not replace an existing OpenTelemetry provider.