Urgent.News

What's breaking now, across thousands of outlets.

Tech

Privacy-First Architecture: Building Web Tools That Never See Your Data

In Turkey, legal documents are protected under KVKK (the Turkish equivalent of GDPR). Uploading a court petition to a random web service isn't just risky — it could be illegal. Here's the architecture pattern we use for building document processing tools that are physically incapable of leaking data. The Core Principle If data never leaves the browser, it can never be intercepted, stored, or…

In Turkey, legal documents are safeguarded by KVKK, similar to GDPR. Storing a court petition on an arbitrary web service is not only risky but also potentially illegal. The following architecture pattern ensures document processing tools are built in a way that prevents any data leakage.

The foundational principle is that if data remains within the browser, it cannot be intercepted, stored, or breached. This isn't simply a matter of privacy policy assurances; it's about robust architectural safeguards.

The architecture diagram consists of the following components:

- User's Browser

- File API (ArrayBuffer)

- JSZip (ZIP parse)

- DOMParser (XML parse)

- Converter (XML to Markdown)

- Blob/Download

Implementation steps include:

1. Avoiding fetch() or XMLHttpRequest for user data.

2. Utilizing File.arrayBuffer() instead of FileReader for a more modern approach.

3. Generating downloads using Blob and URL.createObjectURL, which are local-only.

4. Employing navigator.clipboard for copy functionality, maintaining local-only functionality.

Verification for users involves opening DevTools and checking the Network tab to confirm there are no requests made during document processing. This provides a strong signal of trust.

There are trade-offs between client-side and server-side approaches. While client-side processing guarantees privacy but is limited by device CPU and has practical file size limits, server-side processing can leverage powerful servers and handle larger files. Offline support is available with client-side tools, but maintenance is simpler with a static hosting setup.

Our two open-source tools, udf2md and uyap-web-udf-editor, are designed to convert UDF documents to Markdown and offer full UDF editing capabilities with PDF, DOCX, and TIFF imports. Both tools ensure zero server-side processing, aligning with the client-side architecture principles.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Monday 21 September →