<?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: Berryhub.app</title>
    <description>The latest articles on DEV Community by Berryhub.app (@berryecosystem).</description>
    <link>https://dev.to/berryecosystem</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4169366%2F706e8c6c-7caf-41d2-94f2-a8cae571be85.jpg</url>
      <title>DEV Community: Berryhub.app</title>
      <link>https://dev.to/berryecosystem</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/berryecosystem"/>
    <language>en</language>
    <item>
      <title>Why We Built an Open-Source, Native macOS Database Client in Swift (And Skipped Electron)</title>
      <dc:creator>Berryhub.app</dc:creator>
      <pubDate>Wed, 07 Oct 2026 15:44:37 +0000</pubDate>
      <link>https://dev.to/berryecosystem/why-we-built-an-open-source-native-macos-database-client-in-swift-and-skipped-electron-1bg4</link>
      <guid>https://dev.to/berryecosystem/why-we-built-an-open-source-native-macos-database-client-in-swift-and-skipped-electron-1bg4</guid>
      <description>&lt;p&gt;If you’re a developer working on a Mac, you probably know this feeling:&lt;/p&gt;

&lt;p&gt;You sit down in the morning, open your code editor, Slack, Docker, a browser with 20 tabs, and your database GUI. Before you even run your first query of the day, your &lt;strong&gt;Activity Monitor&lt;/strong&gt; already looks like a crime scene: 8+ GB of RAM devoured by background Chromium runtimes.&lt;/p&gt;

&lt;p&gt;When it comes to database GUIs on macOS, developers have essentially been forced to choose between two extremes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Electron / Java Giants:&lt;/strong&gt; Powerful and feature-rich, but they take 5–10 seconds to cold-boot, idle at &lt;strong&gt;800MB–1.2GB RAM&lt;/strong&gt;, and drop frames when scrolling through large query dumps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fast Native Clients:&lt;/strong&gt; Fast and responsive, but either locked behind costly yearly subscriptions or crippled on the free tier (like being limited to 2 open tabs).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We wanted a third option: &lt;strong&gt;A blazing-fast, 100% open-source, native macOS database client that treats your system resources with respect.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That’s why we built &lt;strong&gt;&lt;a href="https://github.com/berry-apps/berrydb-desktop" rel="noopener noreferrer"&gt;BerryDB Desktop&lt;/a&gt;&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# You can install it right now via Homebrew:&lt;/span&gt;
brew &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--cask&lt;/span&gt; berry-apps/tap/berrydb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is a look under the hood at why we decided to write it completely in &lt;strong&gt;Swift and AppKit&lt;/strong&gt;, how we solved large-table rendering at 120 FPS, and the engineering tradeoffs we made along the way.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚡ The Benchmark: Native vs Electron
&lt;/h2&gt;

&lt;p&gt;Before writing a single line of application code, we set clear architectural targets. Here is how BerryDB compares in everyday usage:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;BerryDB Desktop&lt;/th&gt;
&lt;th&gt;Electron Clients&lt;/th&gt;
&lt;th&gt;Proprietary Native&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Idle Memory (RAM)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~45 MB&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;700 MB – 1.2 GB&lt;/td&gt;
&lt;td&gt;~60 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cold Startup Time&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&amp;lt; 200 ms&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;4 – 8 seconds&lt;/td&gt;
&lt;td&gt;~300 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Scrolling Performance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;120 FPS (ProMotion)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;30 – 60 FPS (DOM lag)&lt;/td&gt;
&lt;td&gt;120 FPS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Free Tier Restrictions&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;None (Unlimited)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Mixed&lt;/td&gt;
&lt;td&gt;2 Tabs / 2 Workspaces&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;License&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Apache 2.0 (Open Source)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Open / Freemium&lt;/td&gt;
&lt;td&gt;Closed Source Proprietary&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🛠️ Deep Dive: The Engineering Decisions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Skipping Electron for Pure AppKit &amp;amp; Swift
&lt;/h3&gt;

&lt;p&gt;Electron is incredible for cross-platform velocity. But for a mission-critical utility that lives in your dock all day, bundling an entire Chromium browser and Node runtime per app comes with steep penalties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Garbage Collection Pressure:&lt;/strong&gt; Rendering 100 columns × 50,000 rows in HTML/CSS strains browser GC engines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Non-Native UX:&lt;/strong&gt; Keyboard navigation, trackpad momentum scrolling, and macOS menu bars rarely feel seamless in web wrappers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By using &lt;strong&gt;pure Swift and Apple's native AppKit&lt;/strong&gt;, BerryDB boots instantaneously and requires &lt;strong&gt;zero web runtimes&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Solving Table Rendering: &lt;code&gt;NSTableView&lt;/code&gt; Row Virtualization &amp;amp; Binary Streaming
&lt;/h3&gt;

&lt;p&gt;A database client is only as good as its performance when inspecting real-world datasets.&lt;/p&gt;

&lt;p&gt;Instead of parsing bulky JSON payloads inside WebViews, BerryDB implements:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Direct Socket Binary Streaming:&lt;/strong&gt; Results are streamed directly from database engine sockets into native Swift memory structs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Row Virtualization:&lt;/strong&gt; Using Apple’s native &lt;code&gt;NSTableView&lt;/code&gt;, only the rows currently visible on your retina display are instantiated in memory.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Whether your query returns 50 rows or 2,000,000 rows, scrolling stays locked at &lt;strong&gt;120 FPS on Apple ProMotion displays&lt;/strong&gt; with virtually flat memory usage.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. One Unified Window for SQL, Cache, and NoSQL
&lt;/h3&gt;

&lt;p&gt;In modern full-stack development, a single project rarely uses just one database:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PostgreSQL / MySQL / SQLite / MSSQL&lt;/strong&gt; for relational models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Redis / Valkey&lt;/strong&gt; for cache, rate-limiting, and queues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MongoDB / DynamoDB&lt;/strong&gt; for flexible document stores.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Qdrant / Elasticsearch&lt;/strong&gt; for vector embeddings and search.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Switching between 3 or 4 separate client applications breaks flow state. BerryDB unifies all of them in a tabbed workspace with consistent shortcuts and native dark/light themes.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Privacy-First Local AI SQL Copilot
&lt;/h3&gt;

&lt;p&gt;AI query assistance is genuinely useful for prototyping complex joins and analyzing slow indexes—&lt;strong&gt;provided your company's schema never leaves your machine.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Many newer tools pipe your table schemas to third-party cloud APIs. BerryDB takes a strict &lt;strong&gt;local-first approach&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Autocompletion and query explanation run &lt;strong&gt;100% on-device&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Zero telemetry, zero cloud data transfer.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;SSH private keys and database credentials reside safely in your Mac's &lt;strong&gt;Apple Keychain &amp;amp; Secure Enclave&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚀 Quick Install (macOS Sequoia 15+)
&lt;/h2&gt;

&lt;p&gt;BerryDB is completely free and licensed under &lt;strong&gt;Apache 2.0&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Via Homebrew (Easiest):
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--cask&lt;/span&gt; berry-apps/tap/berrydb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Or download the pre-built DMG:
&lt;/h3&gt;

&lt;p&gt;Head over to the &lt;a href="https://github.com/berry-apps/berrydb-desktop/releases/latest" rel="noopener noreferrer"&gt;GitHub Releases page&lt;/a&gt; and grab the latest &lt;code&gt;.dmg&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🤝 Open Source &amp;amp; Community
&lt;/h2&gt;

&lt;p&gt;BerryDB is an active, open-source project. Whether you want to request a driver, report a bug, or inspect how the Swift AppKit architecture is structured:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⭐️ &lt;strong&gt;GitHub Repo:&lt;/strong&gt; &lt;a href="https://github.com/berry-apps/berrydb-desktop" rel="noopener noreferrer"&gt;https://github.com/berry-apps/berrydb-desktop&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🌐 &lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="https://db.berryhub.app" rel="noopener noreferrer"&gt;https://db.berryhub.app&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  💬 Discussion
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What database client are you currently using on macOS, and what is your biggest pet peeve with it?&lt;/strong&gt; (RAM usage? Tab restrictions? Sluggish queries?) Let's discuss in the comments below!&lt;/p&gt;

</description>
      <category>macos</category>
      <category>opensource</category>
      <category>database</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
