Developer Tool · Protocol Buffers · Browser-local · 2026 · Solo — pure TypeScript decoder architecture, wire-type interpretation, .proto schema regex parser, TDD, GitHub+Vercel exact-SHA deployment

Proto Scope

A browser-local protobuf binary inspector: pure TypeScript varint/wire decoder, .proto schema regex parser, zigzag/float/bool/UTF-8 interpretation, hex dump for binaries ≤256 bytes — no protobufjs, no WASM, no server.

The problem

Protocol buffer binaries are opaque bytes unless you have the exact .proto schema and a working protobuf toolchain. Engineers debugging wire-level data — from gRPC traces, Kafka messages, or internal service logs — need a zero-install, zero-upload way to decode any captured binary against an optional schema, with full field-type interpretation (zigzag integers, floats, booleans, UTF-8 strings).

Architecture

Key decisions

01

Pure TypeScript decoder — no protobufjs, no WASM

The varint decoder, wire-tag reader, and fixed-width field handlers are implemented from the protobuf binary format spec in ~200 lines of TypeScript with zero runtime dependencies. This keeps the decoder fully unit-testable, eliminates build complexity, and works in any browser that supports BigInt and DataView.

02

Regex .proto parser for schema-matched field names

A small regex parser extracts message-name, field-number, type, and repeated/optional markers from .proto source without a full parser generator. Field numbers from the decoded binary are joined to schema names at render time. Unknown fields are shown with their wire type so nothing is hidden.

03

Wire type 2 UTF-8 preview with fatal: true

Length-delimited fields (wire type 2) include an attempted UTF-8 decode via TextDecoder with fatal:true. If the bytes are not valid UTF-8, the preview is omitted and the raw hex is shown instead. This prevents silent mojibake while still making string fields immediately readable.

04

TDD — 27 tests written and confirmed failing before implementation

All decoder functions (decodeVarint, readWireTag, decodeProtoMessage, parseProtoSchema, annotateFields) were specified as tests first. The test suite covers single/multi-byte varints, non-zero offsets, wire-type enumeration, nested message fields, schema matching, zigzag decode, float interpretation, and round-trip invariants. Each test was run and confirmed to fail before the corresponding function was written.

Metrics

27 TDD tests
All pass
0 lint errors
ESLint clean
0 build errors
Next.js production build
0/10
Slop audit score