<?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>Forem: Caio Ricciuti</title>
    <description>The latest articles on Forem by Caio Ricciuti (@caioricciuti).</description>
    <link>https://forem.com/caioricciuti</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%2F3796228%2Fe274af91-95ce-4f49-8de4-912e2e4f230d.jpeg</url>
      <title>Forem: Caio Ricciuti</title>
      <link>https://forem.com/caioricciuti</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/caioricciuti"/>
    <language>en</language>
    <item>
      <title>Introducing Duck-UI 0.0.32: A Streamlined Web Interface for DuckDB</title>
      <dc:creator>Caio Ricciuti</dc:creator>
      <pubDate>Sat, 28 Feb 2026 12:47:00 +0000</pubDate>
      <link>https://forem.com/caioricciuti/introducing-duck-ui-0032-a-streamlined-web-interface-for-duckdb-27mk</link>
      <guid>https://forem.com/caioricciuti/introducing-duck-ui-0032-a-streamlined-web-interface-for-duckdb-27mk</guid>
      <description>&lt;p&gt;In the evolving landscape of data analytics, the ability to efficiently interact with databases is paramount. Enter &lt;strong&gt;Duck-UI&lt;/strong&gt;, a powerful web-based interface designed specifically for DuckDB, a high-performance analytical database system. With the recent release of version &lt;strong&gt;0.0.32&lt;/strong&gt;, Duck-UI introduces a suite of enhancements that streamline user experience while bolstering security and performance. Let's dive into what's new and how it can transform your data interaction processes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Duck-UI?
&lt;/h2&gt;

&lt;p&gt;Duck-UI is a sophisticated user interface that leverages DuckDB's &lt;strong&gt;WebAssembly (WASM)&lt;/strong&gt; capabilities, allowing users to execute complex SQL queries directly from the web browser. Whether you're a data scientist, developer, or business analyst, Duck-UI sets out to make data manipulation accessible and user-friendly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Features of Duck-UI
&lt;/h2&gt;

&lt;p&gt;The updated Duck-UI retains its core features while adding new functionalities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SQL Editor&lt;/strong&gt;: An intuitive environment to write and execute SQL queries with syntax highlighting and auto-completion for enhanced productivity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Import/Export&lt;/strong&gt;: Seamlessly import data from various formats like CSV, JSON, Parquet, and Arrow files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Explorer&lt;/strong&gt;: A robust node structure to navigate through databases and tables.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Query History&lt;/strong&gt;: Easy access to execute and manage your previous SQL queries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Theme Toggle and Keyboard Shortcuts&lt;/strong&gt;: Personalized usability that caters to your workflow.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Major Updates in Version 0.0.32
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Code Refactor and Readability&lt;/strong&gt;: A significant refactoring has improved the codebase's readability by fine-tuning the handling of multi-line queries and string formatting. Clearer code not only aids maintainability but also sets the stage for future enhancements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enhanced SQL Sanitization&lt;/strong&gt;: Security is paramount, especially when it comes to database interactions. The introduction of two key functions, &lt;code&gt;sqlEscapeString&lt;/code&gt; and &lt;code&gt;sqlEscapeIdentifier&lt;/code&gt;, fortifies SQL queries against injection attacks. This enhancement ensures that inputs are sanitized effectively, making your database interactions safer.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For instance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;   &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;safeString&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;sqlEscapeString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userInput&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;safeIdentifier&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;sqlEscapeIdentifier&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userTable&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The new &lt;code&gt;schemaFetcher&lt;/code&gt; and &lt;code&gt;wasmConnection&lt;/code&gt; implementations also utilize these sanitization functions, further reinforcing security throughout the application. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Refactoring Persistence Repositories&lt;/strong&gt;: The persistence repositories including &lt;code&gt;aiConfig&lt;/code&gt;, &lt;code&gt;connection&lt;/code&gt;, &lt;code&gt;profile&lt;/code&gt;, and others, now utilize &lt;code&gt;sqlQuote&lt;/code&gt; for constructing safer SQL statements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved Error Handling&lt;/strong&gt;: Error management has been enhanced in &lt;code&gt;crypto.ts&lt;/code&gt; concerning IndexedDB transactions, providing more robust feedback when issues arise during data handling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Auto-save Functionality&lt;/strong&gt;: The auto-save feature has been optimized to prevent duplicate subscriptions, ensuring a smoother user experience and reducing the chances of data loss while working on queries.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Transaction Management&lt;/strong&gt;: The addition of transaction management in &lt;code&gt;profileRepository&lt;/code&gt; allows for cascading deletes, ensuring data integrity and control over complex operations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Updated Vite Configuration&lt;/strong&gt;: Enhancements in the Vite configuration restrict the exposure of environment variables, minimizing security risks during application deployment.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Getting Started with Duck-UI
&lt;/h2&gt;

&lt;p&gt;Getting started with Duck-UI is simple, thanks to the dockerized deployment method. Here’s how you can run Duck-UI in your local environment:&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing via Docker
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-p&lt;/span&gt; 5522:5522 ghcr.io/caioricciuti/duck-ui:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just navigate to &lt;code&gt;http://localhost:5522&lt;/code&gt; in your web browser, and you're all set! For those needing external connections, the setup can be customized with environment variables as shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-p&lt;/span&gt; 5522:5522 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;DUCK_UI_EXTERNAL_CONNECTION_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"My DuckDB Server"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;DUCK_UI_EXTERNAL_HOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"http://duckdb-server"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;DUCK_UI_EXTERNAL_PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"8000"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;DUCK_UI_EXTERNAL_USER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"username"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;DUCK_UI_EXTERNAL_PASS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"password"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;DUCK_UI_EXTERNAL_DATABASE_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"my_database"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;DUCK_UI_ALLOW_UNSIGNED_EXTENSIONS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"true"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  ghcr.io/caioricciuti/duck-ui:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These options make Duck-UI highly adaptable, allowing users to work with their specific database environments effectively.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;With version 0.0.32, Duck-UI has taken significant strides to enhance usability, security, and performance. For developers and analysts alike, it presents an invaluable tool for interacting with DuckDB. If you're intrigued by the features or want to see them in action, check out the &lt;a href="https://duckui.com?utm_source=github&amp;amp;utm_medium=readme" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt; or explore the &lt;a href="https://demo.duckui.com?utm_source=github&amp;amp;utm_medium=readme" rel="noopener noreferrer"&gt;live demo&lt;/a&gt;. Join the community and take control of your data analytics with Duck-UI!&lt;/p&gt;

</description>
      <category>database</category>
      <category>sql</category>
      <category>ui</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
