StructraHow It Works
ZERO-SERVER ARCHITECTURETechnical Deep Dive

How Structra processes your data without a server

A technical walkthrough of the client-side CSV repair pipeline. For engineers who need to verify trust claims before deploying tools to their teams.

Processing Pipeline

6-phase client-side repair engine

Every step executes in your browser's JavaScript runtime. Network: zero calls.

01

File Read

FileReader API · ArrayBuffer

Your file is read using the browser's native FileReader API as an ArrayBuffer. The bytes never cross a network boundary — they stay in your device's RAM.

IMPLEMENTATION
We use readAsArrayBuffer() for binary-safe analysis. No fetch(), no XMLHttpRequest, no WebSocket. Zero network calls.
02

Encoding Detection

Byte-pattern heuristics

The raw bytes are analyzed for encoding signatures: UTF-8 BOM (EF BB BF), UTF-16 LE/BE BOM, and Windows-1252 byte ranges (0x80–0xFF).

IMPLEMENTATION
If CP-1252 smart quotes (0x93, 0x94) or accented characters are detected, we transcode byte-by-byte to valid UTF-8.
03

Delimiter Analysis

Frequency matrix · RFC 4180

We build a frequency matrix of candidate delimiters (comma, semicolon, tab, pipe) against the first N rows. The delimiter with the most consistent column count wins.

IMPLEMENTATION
Handles edge cases: quoted fields containing delimiters, mixed-newline files (\r\n vs \n), and Excel's semicolon-as-default for European locales.
04

State Machine Parser

Character-by-character · Quote-aware

A hand-written state machine parses the CSV character-by-character. It tracks whether the cursor is inside a quoted field, handling escaped quotes ("") and multi-line values.

IMPLEMENTATION
The parser only enters quote-mode at exact field boundaries, preventing unescaped mid-field quotes from causing row-count bleeding.
05

Normalization & Repair

Quote escaping · Whitespace trim · BOM strip

Smart quotes (Unicode curly quotes) are converted to straight ASCII quotes. Unescaped quotes inside fields are escaped per RFC 4180. BOMs, null bytes, and control characters are stripped.

IMPLEMENTATION
Each repair operation is tracked and counted, giving you a complete audit trail of exactly what changed in your file.
06

Clean CSV Output

Blob API · Download via URL.createObjectURL

The repaired data is serialized back to RFC 4180 compliant CSV. A Blob is created in-memory, and a download link is generated using URL.createObjectURL() — still zero network.

IMPLEMENTATION
The Blob is released from memory after download via URL.revokeObjectURL(). No data persists anywhere.

Verify, don't trust

Trust proofs you can verify yourself

Every claim has a reproducible verification step. Open DevTools and check.

No file uploads

Open DevTools → Network tab → drag a file. You'll see zero POST requests. The File object is read locally via FileReader.

No analytics on file content

We use Plausible Analytics (plausible.io) — cookieless, GDPR-compliant. It tracks page views only, not file content, names, or sizes.

No server-side database

Structra is deployed as a static Next.js export. There is no API server, no database connection string, no server-side runtime for user files.

Offline capable

A Service Worker caches the application shell. After first load, the CSV repair engine works completely offline — verify by toggling Airplane Mode.

Stateless architecture

No cookies store file data. No localStorage persists your CSV. No IndexedDB. The file exists only in JavaScript heap memory during processing and is garbage-collected after.

Open for inspection

View the processing engine in DevTools → Sources → lib/csv-fixer.ts. The entire parser is ~400 lines of TypeScript compiled to client-side JavaScript.

Seen enough? Try it.

Drop a CSV and watch the Network tab. Zero outbound requests.

Fix My CSV Free →← Back to Home