<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dencio</title>
    <description>The latest articles on DEV Community by Dencio (@akosidencio).</description>
    <link>https://dev.to/akosidencio</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3238382%2Fc1293f33-333e-44e0-aec0-85c2a3506cf5.jpg</url>
      <title>DEV Community: Dencio</title>
      <link>https://dev.to/akosidencio</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/akosidencio"/>
    <language>en</language>
    <item>
      <title>Local-First Vectors: How to Build Privacy-Preserving AI Apps without the Cloud</title>
      <dc:creator>Dencio</dc:creator>
      <pubDate>Fri, 10 Apr 2026 11:32:37 +0000</pubDate>
      <link>https://dev.to/akosidencio/local-first-vectors-how-to-build-privacy-preserving-ai-apps-without-the-cloud-4lih</link>
      <guid>https://dev.to/akosidencio/local-first-vectors-how-to-build-privacy-preserving-ai-apps-without-the-cloud-4lih</guid>
      <description>&lt;h2&gt;
  
  
  The Missing Piece for On-Device AI
&lt;/h2&gt;

&lt;p&gt;The world of AI is moving to the edge. With the rise of on-device models like &lt;strong&gt;Transformers.js&lt;/strong&gt;, &lt;strong&gt;Gemma&lt;/strong&gt;, and &lt;strong&gt;Phind&lt;/strong&gt;, we are closer than ever to a truly "dark" application architecture—one where zero data leaves the user's device.&lt;/p&gt;

&lt;p&gt;However, there’s a paradox: while we have the models running on-device, we are still sending our sensitive data to cloud-based vector databases like Pinecone or Weaviate to perform similarity searches. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I wanted to solve this paradox.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve been building &lt;strong&gt;TalaDB&lt;/strong&gt;: an open-source, local-first document and vector database built in Rust that runs identically across the Browser (WASM), Node.js, and React Native.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Multi-Platform Problem
&lt;/h2&gt;

&lt;p&gt;If you've ever tried to build a cross-platform, local-first app, you know the pain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Developing for the browser?&lt;/strong&gt; You're likely stuck with IndexedDB or a complex WASM-SQL setup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Developing for Mobile?&lt;/strong&gt; You're probably using SQLite.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Developer Experience (DX) Hell:&lt;/strong&gt; Managing separate drivers, binary extensions for vector search (&lt;code&gt;sqlite-vss&lt;/code&gt;), and split business logic is a nightmare.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wanted a single, unified API. &lt;strong&gt;One core to rule them all.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing TalaDB: A Unified Engine
&lt;/h2&gt;

&lt;p&gt;TalaDB provides a familiar, MongoDB-like API for both document filtering and vector similarity search. Whether you are in a React Native app or a Chrome SharedWorker, the code looks exactly the same:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;articles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findNearest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;embedding&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;category&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;support&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;locale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;en&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One call. Metadata filter + Vector ranking. No cloud round-trips.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deep Dive: Under the Hood
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why Rust + redb?
&lt;/h3&gt;

&lt;p&gt;I chose a pure-Rust architecture because of the safety and performance guarantees. For the storage engine, I use &lt;a href="https://github.com/cberner/redb" rel="noopener noreferrer"&gt;redb&lt;/a&gt;—a high-performance B-tree store that provides ACID transactions without the overhead of a full SQL engine.&lt;/p&gt;

&lt;h3&gt;
  
  
  WASM + OPFS: The Bleeding Edge
&lt;/h3&gt;

&lt;p&gt;In the browser, TalaDB leverages the &lt;strong&gt;Origin Private File System (OPFS)&lt;/strong&gt;. By running the database inside a &lt;code&gt;SharedWorker&lt;/code&gt;, I can achieve near-native performance while keeping the main UI thread completely free.&lt;/p&gt;

&lt;h3&gt;
  
  
  Binary Compactness
&lt;/h3&gt;

&lt;p&gt;By using &lt;code&gt;postcard&lt;/code&gt; for binary serialization, TalaDB keeps data footprints extremely small—often smaller and faster than traditional JSON-based stores. The entire WASM bundle is sub-400KB.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical Example: Offline Semantic Search
&lt;/h2&gt;

&lt;p&gt;Imagine building a support app that works 100% offline. Here is how you'd handle a hybrid query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;openDB&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;taladb&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;openDB&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;docs.db&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;articles&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;collection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;articles&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Find the 5 most relevant articles for a given embedding&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;articles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findNearest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;embedding&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;userVector&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(({&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;score&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`[&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toFixed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;] &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Future of Local-First
&lt;/h2&gt;

&lt;p&gt;TalaDB is currently in &lt;strong&gt;Alpha (v0.3.0)&lt;/strong&gt;. My goal is to bridge the gap between human privacy and machine-learning intelligence. &lt;/p&gt;

&lt;p&gt;I’m currently focused on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⚡ Further optimizations for React Native JSI.&lt;/li&gt;
&lt;li&gt;📡 Adding atomic sync and multi-user capabilities.&lt;/li&gt;
&lt;li&gt;🧠 Expanding the query operator library.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;TalaDB is open-source and MIT licensed.&lt;/strong&gt; I’d love for you to try the alpha, give me some feedback, or even &lt;a href="https://github.com/thinkgrid-labs/taladb" rel="noopener noreferrer"&gt;give the project a star&lt;/a&gt; if you find it useful.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Links:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/thinkgrid-labs/taladb" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://taladb-playground.vercel.app/" rel="noopener noreferrer"&gt;Live Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://thinkgrid-labs.github.io/taladb/" rel="noopener noreferrer"&gt;Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>rust</category>
      <category>webassembly</category>
      <category>reactnative</category>
      <category>database</category>
    </item>
  </channel>
</rss>
