<?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: Roney Dsilva</title>
    <description>The latest articles on DEV Community by Roney Dsilva (@roney_dsilva_eca16c889984).</description>
    <link>https://dev.to/roney_dsilva_eca16c889984</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%2F4257783%2Fd98edeb1-e81d-4b96-9ee8-fbdd2fc04054.jpg</url>
      <title>DEV Community: Roney Dsilva</title>
      <link>https://dev.to/roney_dsilva_eca16c889984</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/roney_dsilva_eca16c889984"/>
    <language>en</language>
    <item>
      <title>Why we built our own team AI chat as a 28 MB Go binary</title>
      <dc:creator>Roney Dsilva</dc:creator>
      <pubDate>Sat, 21 Nov 2026 18:14:26 +0000</pubDate>
      <link>https://dev.to/roney_dsilva_eca16c889984/why-we-built-our-own-team-ai-chat-as-a-28-mb-go-binary-13ei</link>
      <guid>https://dev.to/roney_dsilva_eca16c889984/why-we-built-our-own-team-ai-chat-as-a-28-mb-go-binary-13ei</guid>
      <description>&lt;p&gt;We wanted our team to use AI models without pasting company data into a hosted service. Ollama made running the models easy. The part around them was harder: a shared chat with sign-in, permissions, document search, tools and an audit trail.&lt;/p&gt;

&lt;p&gt;Most self-hosted chat UIs we tried needed several moving parts: an app server, Redis, a vector database, a task queue, sometimes more. Each one is another thing to patch, back up and explain to the next admin. So we built &lt;strong&gt;Kera&lt;/strong&gt;, ran it for our own team since November, and have now open-sourced it under Apache-2.0.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/cdmx-in/kera" rel="noopener noreferrer"&gt;https://github.com/cdmx-in/kera&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Container image: &lt;strong&gt;~28 MB&lt;/strong&gt; (distroless, static binary, &lt;code&gt;CGO_ENABLED=0&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Idle memory: &lt;strong&gt;~20 MB&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Required services: &lt;strong&gt;one&lt;/strong&gt;, Postgres 18 with pgvector&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The web app is React and Vite, built into &lt;code&gt;web/dist&lt;/code&gt; and embedded in the binary with &lt;code&gt;embed&lt;/code&gt;. You run one binary and one database.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Postgres replaces the usual stack
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Usually a separate service&lt;/th&gt;
&lt;th&gt;In Kera&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Vector database&lt;/td&gt;
&lt;td&gt;pgvector&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Search engine&lt;/td&gt;
&lt;td&gt;Postgres full-text search, combined with vectors for hybrid search&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Job queue / locks&lt;/td&gt;
&lt;td&gt;Postgres advisory locks (for example, so a scheduled sync and the admin button never overlap)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Session store&lt;/td&gt;
&lt;td&gt;Signed tokens, no external store&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;It is less flexible than a dedicated vector database, but it's far simpler to run. A team of a few hundred people doesn't need more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Boring Go on purpose
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;HTTP is the standard library's &lt;code&gt;net/http&lt;/code&gt; with Go 1.22 route patterns, with no framework.&lt;/li&gt;
&lt;li&gt;The database is pgx with &lt;strong&gt;hand-written SQL&lt;/strong&gt; and goose migrations, with no ORM.&lt;/li&gt;
&lt;li&gt;Sessions and IDs use small in-repo code instead of JWT or UUID libraries.&lt;/li&gt;
&lt;li&gt;Each feature is a package under &lt;code&gt;internal/&lt;/code&gt; that registers itself from &lt;code&gt;init()&lt;/code&gt;. Adding a feature means one package and one blank import.&lt;/li&gt;
&lt;li&gt;Plugins are plain &lt;strong&gt;HTTP services&lt;/strong&gt; (OpenAPI or MCP), not code loaded into the server. A broken plugin can't crash the core.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tests run with &lt;code&gt;-race&lt;/code&gt; against a real Postgres database for each test. CI also runs &lt;code&gt;govulncheck&lt;/code&gt; and a &lt;code&gt;gitleaks&lt;/code&gt; scan of the full history.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Works with Ollama first and any OpenAI-compatible endpoint second, including the Responses API.&lt;/li&gt;
&lt;li&gt;Google and OIDC sign-in, groups, per-resource sharing and API keys.&lt;/li&gt;
&lt;li&gt;Knowledge search over your documents, with optional reranking and OCR for scanned PDFs.&lt;/li&gt;
&lt;li&gt;A code interpreter for Python, Node, Go, Java, R and more, returning files and images.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cowork&lt;/strong&gt;, where the model drives a sandboxed Linux desktop that you can watch and take over.&lt;/li&gt;
&lt;li&gt;Scheduled Google Workspace directory sync: users in, departments as groups, leavers disabled.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Guardrails on every model call
&lt;/h2&gt;

&lt;p&gt;This was a requirement from day one, because our team handles payments data. Every call to a model goes through one guard that can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;redact or block personal data: emails, phone numbers, cards (Luhn check), Indian Aadhaar numbers (Verhoeff check digit), IBANs (mod 97) and SSNs;&lt;/li&gt;
&lt;li&gt;check for prompt-injection phrases and your own blocklist;&lt;/li&gt;
&lt;li&gt;optionally run a moderation model;&lt;/li&gt;
&lt;li&gt;write an audit event that records the rule and the count, &lt;strong&gt;never the matched text&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each mode (&lt;code&gt;off&lt;/code&gt;, &lt;code&gt;log&lt;/code&gt;, &lt;code&gt;redact&lt;/code&gt;, &lt;code&gt;block&lt;/code&gt;) can be set per model. Local Ollama models can be exempted if you trust them more than hosted ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/cdmx-in/kera &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd&lt;/span&gt; kera/deploy
cp .env.example .env     &lt;span class="c"&gt;# set KERA_SECRET_KEY and KERA_DB_PASSWORD&lt;/span&gt;
docker compose up -d
docker compose &lt;span class="nb"&gt;exec&lt;/span&gt; kera kera user login-link you@example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On an empty install, &lt;code&gt;login-link&lt;/code&gt; creates the first admin, so you can get in before setting up any sign-in provider. Then add Google or OIDC sign-in in the admin console.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>backend</category>
      <category>go</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
