<?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: Jakub Málek</title>
    <description>The latest articles on DEV Community by Jakub Málek (@jakubb_ing).</description>
    <link>https://dev.to/jakubb_ing</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%2F3824934%2Fc9144f7a-5d63-48e6-bc35-e1e6c1742417.jpg</url>
      <title>DEV Community: Jakub Málek</title>
      <link>https://dev.to/jakubb_ing</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jakubb_ing"/>
    <language>en</language>
    <item>
      <title>I built an AI Second Brain on SurrealDB - and connected it to Claude via MCP</title>
      <dc:creator>Jakub Málek</dc:creator>
      <pubDate>Tue, 24 Mar 2026 13:35:52 +0000</pubDate>
      <link>https://dev.to/jakubb_ing/i-built-an-ai-second-brain-on-surrealdb-and-connected-it-to-claude-via-mcp-3970</link>
      <guid>https://dev.to/jakubb_ing/i-built-an-ai-second-brain-on-surrealdb-and-connected-it-to-claude-via-mcp-3970</guid>
      <description>&lt;p&gt;In my previous posts, I talked about why SurrealDB feels like the Swiss army knife of databases - graph relations, vector search, schemaful tables, and record links all in one engine. I wanted to put that to the real test, so I built a personal AI-powered knowledge system: a "second brain" that remembers everything I tell it, connects ideas automatically, and lets me search with natural language. But the part that really changed my workflow was exposing it as an MCP (Model Context Protocol) server - giving AI assistants like Claude Code direct access to my entire knowledge graph.&lt;/p&gt;

&lt;p&gt;The core works like this: send a thought (text or voice via Telegram), and the system extracts entities, generates tags, creates embeddings, and detects duplicates using OpenAI. SurrealDB stores it all as a graph - thoughts linked to entities via &lt;code&gt;mentions&lt;/code&gt; edges, similar thoughts connected through &lt;code&gt;related_to&lt;/code&gt; edges with similarity scores. Search runs hybrid vector + fulltext in parallel. But the MCP layer is where it gets interesting. Claude Code can search my brain semantically, add new memories, update existing ones, archive outdated thoughts, and explore connections - all without me leaving the terminal. When I'm coding and need to recall a decision I made weeks ago, my AI assistant just knows. It's like giving your AI tools persistent, structured long-term memory.&lt;/p&gt;

&lt;p&gt;What surprised me most was how naturally SurrealDB handles this multi-model use case. I didn't need a separate vector database, graph database, and relational store - it's all one system. HNSW vector indexes, RELATE statements, record links, and fulltext search coexist seamlessly. If you've been looking for a practical MCP server example or a reason to try SurrealDB beyond toy projects, the whole thing is open-source and ready to self-host.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/malekjakub69/mcp-second-brain" rel="noopener noreferrer"&gt;github.com/malekjakub69/mcp-second-brain&lt;/a&gt;&lt;/p&gt;

</description>
      <category>surrealdb</category>
      <category>ai</category>
      <category>python</category>
      <category>mcp</category>
    </item>
    <item>
      <title>SurrealDB is Not a Silver Bullet: 3 Scenarios Where You Still Need a Backend</title>
      <dc:creator>Jakub Málek</dc:creator>
      <pubDate>Wed, 18 Mar 2026 15:13:37 +0000</pubDate>
      <link>https://dev.to/jakubb_ing/surrealdb-is-not-a-silver-bullet-3-scenarios-where-you-still-need-a-backend-36h5</link>
      <guid>https://dev.to/jakubb_ing/surrealdb-is-not-a-silver-bullet-3-scenarios-where-you-still-need-a-backend-36h5</guid>
      <description>&lt;p&gt;&lt;strong&gt;The "No-Backend" Hangover&lt;/strong&gt;&lt;br&gt;
Look, I know what I said. In my previous posts, I praised SurrealDB like it was the end of the "traditional" backend era. And for 80% of projects, it might be.&lt;/p&gt;

&lt;p&gt;But as a medior dev who’s seen his fair share of architectural disasters, I have to be honest: &lt;strong&gt;SurrealDB is not magic&lt;/strong&gt;. If you try to build everything directly on top of the database, you’re eventually going to hit a wall. Sometimes, you just need a "boring" server running Node, Rust, or Go. Here are three reasons why I’m not deleting my Express/Hono repositories just yet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The "Secret Key" Problem (Integrations)&lt;/strong&gt;&lt;br&gt;
SurrealDB can handle authentication, but it shouldn't be your "Integration Hub."&lt;/p&gt;

&lt;p&gt;If your app needs to talk to Stripe, SendGrid, or a 3rd party AI API, you have a problem. You cannot—and I repeat, CAN NOT—expose your secret API keys to the frontend, even with the best Row-Level Security in the world.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Reality Check:&lt;/strong&gt; Anything that requires a sensitive handshake with another service belongs in a secure, server-side environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Heavy Lifting &amp;amp; CPU-Intensive Tasks&lt;/strong&gt;&lt;br&gt;
SurrealQL is powerful, but it’s a query language, not a general-purpose programming language.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario:&lt;/strong&gt; You need to resize an image, generate a complex PDF invoice, or run a local AI model inference to score a user's trust level.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Reality Check:&lt;/strong&gt; Doing this inside a database layer (even with future-ready functions) is like trying to win a Formula 1 race in a very fast tractor. It's the wrong tool. You need a dedicated microservice that can scale horizontally to handle the CPU load.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Proprietary "Black Box" Logic&lt;/strong&gt;&lt;br&gt;
Sometimes, your business logic is your "secret sauce." If your sorting algorithm or your AI-matching logic is what makes your startup unique, you might not want it sitting in a database schema where (even if secured) it's closer to the edge than you'd like.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Reality Check:&lt;/strong&gt; Complex state machines or proprietary algorithms are often easier to write, test, and debug in a standard backend environment with full-fledged logging and monitoring tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My "Hybrid" Advice&lt;/strong&gt;&lt;br&gt;
I don't choose between "No-Backend" and "All-the-Backend." I use a hybrid approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SurrealDB&lt;/strong&gt; handles the data, the simple CRUD, and the real-time sync.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A Slim Backend (Edge Functions)&lt;/strong&gt; handles the "heavy" stuff: payments, sensitive integrations, and complex AI processi
ng.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Don't be a zealot. SurrealDB is a massive leap forward for developer productivity, but don't let the "No-Backend" dream turn into a "High-Maintenance" nightmare. Use the right tool for the job.&lt;/p&gt;

&lt;p&gt;What’s your take? Have you tried building a "pure" DB-only app, or did you crawl back to Node.js after a week? Let's discuss in the comments!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>SurrealDB: Why JOINs are So 2010 and How Graphs Change Everything (Part 3)</title>
      <dc:creator>Jakub Málek</dc:creator>
      <pubDate>Tue, 17 Mar 2026 00:49:32 +0000</pubDate>
      <link>https://dev.to/jakubb_ing/surrealdb-why-joins-are-so-2010-and-how-graphs-change-everything-part-3-24k3</link>
      <guid>https://dev.to/jakubb_ing/surrealdb-why-joins-are-so-2010-and-how-graphs-change-everything-part-3-24k3</guid>
      <description>&lt;p&gt;&lt;strong&gt;The Mental Gymnastics of Data&lt;/strong&gt;&lt;br&gt;
We’ve all been there. You start with a simple Document DB because "it’s flexible." Then your boss says: "Hey, can we show which friends of this user liked the same products in the last 24 hours?"&lt;/p&gt;

&lt;p&gt;Suddenly, your "flexible" NoSQL setup becomes a nightmare of application-side joins, or you’re staring at a SQL query so long it looks like a spell from Harry Potter.&lt;/p&gt;

&lt;p&gt;As a medior dev, I’ve learned that the hardest part of coding isn't the logic—it's managing the relationships between data without losing your mind. That’s where the "Surreal" in SurrealDB finally clicks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Graphs vs. Joins: The Arrow Power 🏹&lt;/strong&gt;&lt;br&gt;
In traditional SQL, you have "Join Tables" (the middleman nobody likes). In SurrealDB, records can point to each other directly using Graph relations.&lt;/p&gt;

&lt;p&gt;Instead of a 20-line JOIN statement, you use arrows. It’s intuitive, it’s fast, and it’s actually readable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Find all products liked by people I follow&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;follows&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;person&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;liked&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;product&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="k"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;tobias&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read that again. It’s like writing a sentence. follows and liked aren't just strings; they are edges that can hold their own data (like when you followed them).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Multi-Model Secret: You Don't Have to Choose&lt;/strong&gt;&lt;br&gt;
The biggest "Lazy Dev" win? You don't need a separate Graph DB (like Neo4j) and a Document DB (like MongoDB).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Want to store a messy JSON? &lt;strong&gt;Go for it.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Want to enforce a strict schema? &lt;strong&gt;One command away.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Want to link them with graph edges? &lt;strong&gt;It’s already built-in.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s the "Swiss Army Knife" of databases. For someone like me who balances Frontend, AI, and startup chaos, not having to manage three different database clusters is a lifesaver.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI and Connected Data&lt;/strong&gt;&lt;br&gt;
Since I’m building a watchdog for AI trust levels, I need to see how data points connect. AI thrives on context. SurrealDB’s ability to traverse relationships instantly makes it the perfect backbone for AI-driven apps where context is everything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Series Wrap-Up: Is SurrealDB for You?&lt;/strong&gt;&lt;br&gt;
We’ve covered the "What," the "Backend-less" magic, and the "Graph" power.&lt;/p&gt;

&lt;p&gt;My verdict? If you’re building a massive legacy banking system, stick to your COBOL and PostgreSQL. But if you’re a freelancer, a startup founder, or just a developer who values their time and sanity—give SurrealDB a spin.&lt;/p&gt;

&lt;p&gt;It’s not just a database; it’s a way to make development fun again.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>sql</category>
      <category>database</category>
      <category>backend</category>
    </item>
    <item>
      <title>SurrealDB: How I Deleted 70% of My Backend Code (Part 2)</title>
      <dc:creator>Jakub Málek</dc:creator>
      <pubDate>Mon, 16 Mar 2026 16:33:59 +0000</pubDate>
      <link>https://dev.to/jakubb_ing/surrealdb-how-i-deleted-70-of-my-backend-code-part-2-238h</link>
      <guid>https://dev.to/jakubb_ing/surrealdb-how-i-deleted-70-of-my-backend-code-part-2-238h</guid>
      <description>&lt;p&gt;&lt;strong&gt;Remember that "simple" Express server?&lt;/strong&gt;&lt;br&gt;
We’ve all been there. You just want a user to be able to update their own profile. So you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write an /api/update-profile endpoint.&lt;/li&gt;
&lt;li&gt;Validate the JWT (and pray the library doesn't have a new CVE).&lt;/li&gt;
&lt;li&gt;Fetch the data from the DB.&lt;/li&gt;
&lt;li&gt;Manually check if the user_id from the token matches the owner_id in the DB (because you don't want me changing your profile picture).&lt;/li&gt;
&lt;li&gt;Save it and send a 200 OK.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Congratulations, you just wrote 50 lines of boilerplate that we’ve been writing since 2015. It’s 2026-we should be over this. As a freelancer and working with AI, I’ve realized one thing: The best code is the code I don’t have to maintain.&lt;/p&gt;

&lt;p&gt;Enter SurrealDB and its "Backend Killer" mode.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Secret Sauce: Row-Level Security (RLS)&lt;/strong&gt;&lt;br&gt;
SurrealDB isn't just a bucket for your data; it’s an intelligent layer. Instead of writing logic in Node.js or Python, you define permissions directly in the database schema. It looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Define the 'post' table&lt;/span&gt;
&lt;span class="n"&gt;DEFINE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;post&lt;/span&gt; &lt;span class="n"&gt;SCHEMAFULL&lt;/span&gt;
  &lt;span class="n"&gt;PERMISSIONS&lt;/span&gt;
    &lt;span class="c1"&gt;-- Anyone can see public posts&lt;/span&gt;
    &lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;
    &lt;span class="c1"&gt;-- Only the author can edit or delete their own posts&lt;/span&gt;
    &lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="k"&gt;update&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;delete&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;author&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See that &lt;code&gt;$auth.id&lt;/code&gt;? That’s the magic. The database already knows who is logged in. You don't need a custom middleware to check ownership for every single request.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connecting from the Frontend? (Don't Panic!)&lt;/strong&gt;&lt;br&gt;
This is the part where senior architects usually have a mini-heart attack: "You want to connect to the DB directly from the browser?! That’s a security nightmare!"&lt;/p&gt;

&lt;p&gt;Actually, it’s not. With SurrealDB Scopes, you define exactly how users authenticate (Email/Password, OAuth, etc.). Once they’re in, the database enforces the PERMISSIONS globally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The "Lazy Developer" result:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zero CRUD API code: No more writing boring REST or GraphQL wrappers.&lt;/li&gt;
&lt;li&gt;No ORM headaches: No more mapping objects to tables.&lt;/li&gt;
&lt;li&gt;Frontend Power: Your React/Svelte app just calls db.update('post:1', data) and the DB handles the rest.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why this matters for the AI-heavy stack&lt;/strong&gt;&lt;br&gt;
I spend a lot of time merging design with functional AI tools. I'm currently building a tool that monitors how much we actually trust AI (ironic, since I probably trust it too much myself).&lt;/p&gt;

&lt;p&gt;When you're building AI-driven apps, complexity is your enemy. By offloading the "plumbing" (auth and permissions) to SurrealDB, I have more brainpower left to focus on the AI logic and the UI. It’s about being efficiently lazy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What’s next?&lt;/strong&gt;&lt;br&gt;
In the final part of this series, we’ll look at the "Surreal" part of SurrealDB: Mixing Graphs and Documents. I’ll show you how to run a "friends-of-friends" query without your brain melting from SQL JOINs.&lt;/p&gt;

&lt;p&gt;Stay tuned, and go delete some unnecessary backend code today!&lt;/p&gt;

</description>
      <category>sql</category>
      <category>backend</category>
      <category>database</category>
      <category>webdev</category>
    </item>
    <item>
      <title>SurrealDB: The "One-Size-Fits-All" Database for Lazy Developers (Part 1)</title>
      <dc:creator>Jakub Málek</dc:creator>
      <pubDate>Sun, 15 Mar 2026 06:13:40 +0000</pubDate>
      <link>https://dev.to/jakubb_ing/surrealdb-the-one-size-fits-all-database-for-lazy-developers-part-1-1foe</link>
      <guid>https://dev.to/jakubb_ing/surrealdb-the-one-size-fits-all-database-for-lazy-developers-part-1-1foe</guid>
      <description>&lt;p&gt;*&lt;em&gt;Intro: *&lt;/em&gt; We need to talk about your "Modern Stack"&lt;br&gt;
Let’s be real for a second. We’ve all been there: You have a "simple" project idea. Two hours later, you’re staring at a Docker Compose file with PostgreSQL, Redis for caching, Neo4j because "graphs are cool," and a Node.js backend just to move JSON from A to B.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why are we doing this to ourselves?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m a medior dev. I’ve reached the point in my career where I’m too tired to write the same CRUD boilerplate for the 100th time. I just want to build things that work. And that’s when I stumbled upon &lt;strong&gt;SurrealDB&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is SurrealDB? (Besides a cool name)&lt;/strong&gt;&lt;br&gt;
Imagine if SQL, MongoDB, and GraphQL had a baby, and then that baby was raised by Firebase but grew up to be actually flexible.&lt;/p&gt;

&lt;p&gt;SurrealDB is a multi-model database. It doesn't care if you want documents, relational tables, or complex graph structures. It just says: "Sure, why not both?"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why you (as a lazy dev) should care:&lt;/strong&gt;&lt;br&gt;
The "Backend Killer" (No, seriously): SurrealDB has built-in Row-Level Security (RLS) and authentication. You can connect your frontend (React, Vue, whatever) directly to the database. No more writing 500 lines of Express.js just to check if user_id === owner_id.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Schema-Flexible (The "I'll decide later" feature):&lt;/strong&gt; &lt;br&gt;
You can start schema-less (just dump data) and then enforce a schema once you actually know what you're building. It's perfect for prototyping without the "oops, I forgot a migration" headache.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Graph Relations without the PhD: *&lt;/em&gt;&lt;br&gt;
Remember trying to write a recursive CTE in SQL to find "friends of friends"? In SurrealDB, it's literally just an arrow: SELECT -&amp;gt;knows-&amp;gt;person FROM user:me. My brain thanked me.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Quick Reality Check&lt;/strong&gt;&lt;br&gt;
Is it magic? Almost. Is it perfect? Well, it's still evolving. But if you're building a startup or a side project and you're a "team of one," using a traditional stack is like bringing a tank to a knife fight. It’s overkill and you’ll probably hurt yourself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What’s next?&lt;/strong&gt;&lt;br&gt;
In the next part of this mini-series, I’m going to show you how I deleted 70% of my backend code using SurrealDB’s auth layer.&lt;/p&gt;

&lt;p&gt;Spoiler: It felt amazing.&lt;/p&gt;

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