The 8-Hour "Please Work" Marathon
We’ve all been there. You have a vision. You want to build a completely free, local-first, privacy-respecting PWA toolkit (NeatKit). Everything is running smoothly until you decide to implement client-side video processing using ffmpeg.wasm.
Suddenly, you are slapped in the face by browser security rules, SharedArrayBuffer requirements, and Cross-Origin Isolation blockades.
Yesterday, my repo was sitting at a comfortable 47 commits. Today? 75 commits.
By commit #65, my commit messages literally just said "please please work."
Grasping at Straws (and breaking my own site)
When you're 6 hours deep into a web worker security issue, you start losing your mind. I questioned everything I knew about how Cloudflare handles routing, headers, and workers. I convinced myself that my entire deployment pipeline was fundamentally broken.
In a moment of pure desperation, I did the unthinkable: I deleted the deployment files on Cloudflare entirely to rebuild from scratch.
For 30 terrifying minutes, the live production site was a completely empty void. No tools. No layout. Just blank space.
The Twist Ending
After tearing down the infrastructure and treating the codebase like a crime scene, the culprit wasn't a massive structural flaw. It was a configuration issue inside the _headers file the entire time.
Cloudflare Pages handles headers brilliantly, but if your syntax or placement is even slightly off when trying to pass strict Cross-Origin-Opener-Policy (COOP) and Cross-Origin-Embedder-Policy (COEP) rules, the browser tab silently sandboxes your workers into oblivion.
My 2 Big Takeaways From the Trenches:
Local-first WASM has strict boundaries: Client-side processing means ultimate privacy, but it also means dealing with strict browser sandboxing. For heavy files, cloud servers win. For small, quick utility trims, local WASM is amazing—but you have to play by the browser's origin rules.
Walk away sooner: If I had stepped away at commit #55 instead of nuking my environment, I probably would have found the file syntax error in 10 minutes instead of 3 hours.
The site is finally back up, the video trimmer is fully functional for short clips, and I am going to sleep for a week.
Check out the final, working product here: NeatKit












