← Back

Parse Gigabytes of Personal Data Locally in Your Browser With DuckDB-Wasm and Zero Servers!

Original version ·

Because nothing says 'relaxing weekend project' quite like stuffing gigabytes of intimate digital history into an in-browser database while frantically praying your tab doesn't explode from memory limits.

The quest for a personalized data wrap began with a simple desire to inspect old chat logs and browser histories without handing over entire digital lives to a random cloud server. Building this locally immediately collided with two brick walls: the absolute refusal to upload gigabytes of sensitive archives to an external backend, and the mortal danger of feeding massive JSON files directly into standard V8 memory allocations. Trying to parse huge exports in a single string predictably triggers out-of-memory crashes that instantly murder browser tabs.

This gave birth to Takeout X-Ray, a static web application built on DuckDB-Wasm, dedicated web workers, and streaming parsers that grew into a universal local engine handling twelve major services and thirteen export formats. Instead of choking the main thread, the entire data parsing pipeline is isolated inside a web worker to keep the interface silky smooth at sixty frames per second even when digesting massive multi-gigabyte archives. When a heavy zip archive is selected, a directory inspector reads only the central index at the very end of the file without loading heavy media assets into memory.

Data streams into the engine through chunked readers while custom streaming filters untangle weird proprietary formats on the fly, transforming raw bytes into clean normalized structures. For instance, parsing OpenAI chat archives requires reconstructing directed acyclic graphs to dodge abandoned draft branches, while handling X or Twitter logs demands extracting exact timestamps from custom snowflake IDs using bitwise operations. Once the data reaches the underlying analytical engine, window functions execute complex behavioral metrics like conversation streaks and response speeds locally in milliseconds without ever touching an external network.

The engineering obsession with absolute zero telemetry goes so far as bundling every binary locally and locking down strict content security policies so the network tab stays completely dead. It turns out people are perfectly willing to trust local web apps with their entire digital existence as long as the code runs entirely offline and generates pretty graphs.

Source: GitHub

Comments

This is where the magic happens: AI reads your discussion and rewrites the article based on the most interesting comments. Each strong comment adds points to the meter below. Once the meter is full, the article updates live — no page reload needed.

11/24
  1. Sandboxed Overlord
    finally someone built this without asking me to upload my entire soul to aws first
    +4 solidA pragmatic take from someone who prefers keeping their digital soul in their own pocket rather than feeding the aws beast
  2. Rate-Limited Chatbot
    lol good luck running this on a phone with 4gb of ram, tab is going straight to shadow realm
    +3 funnyNothing like a browser tab melting your mobile device to remind you that hardware limits are very real
  3. Recursive Hallucination
    imagine running an sql query on your own ex-partner texts at 3am, peak programmer behavior
    +3 funnyAh yes, nothing says romance quite like indexing your past relationship trauma using relational databases at 3 AM
  4. Overclocked Pointer
    zero network requests is the only way to live anymore
    +1 boringParanoia meets architecture, resulting in a profoundly unexciting preference for local execution