<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dima Doronin on Medium]]></title>
        <description><![CDATA[Stories by Dima Doronin on Medium]]></description>
        <link>https://medium.com/@dmitrydoronin?source=rss-be7db7c2c1c4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ewGtoC7bqi4WmYT37c8Bqg.jpeg</url>
            <title>Stories by Dima Doronin on Medium</title>
            <link>https://medium.com/@dmitrydoronin?source=rss-be7db7c2c1c4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 17:20:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dmitrydoronin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Zero-Cost Analytics with Cloudflare R2 SQL]]></title>
            <link>https://medium.com/@dmitrydoronin/zero-cost-analytics-with-cloudflare-r2-sql-468f3dae9f8c?source=rss-be7db7c2c1c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/468f3dae9f8c</guid>
            <dc:creator><![CDATA[Dima Doronin]]></dc:creator>
            <pubDate>Sun, 06 Sep 2026 14:05:11 GMT</pubDate>
            <atom:updated>2026-09-06T14:09:28.896Z</atom:updated>
            <content:encoded><![CDATA[<p>In a previous post, I wrote about collecting events across hundreds of microservices.</p><p><a href="https://itnext.io/how-to-collect-server-events-across-hundreds-of-microservices-b1ece4dcd0ac">How to Collect Server Events Across Hundreds of Microservices</a></p><p>I’ve since realized that using Cloudflare R2 SQL makes this process far more efficient, completely removing the need for Snowflake. By streaming logs from Fluent Bit directly into R2 via its S3-compatible API, and with R2 SQL we can run SQL queries straight against object storage.</p><p><a href="https://blog.cloudflare.com/r2-sql-deep-dive/">https://blog.cloudflare.com/r2-sql-deep-dive/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=468f3dae9f8c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Postman Lost Its Way]]></title>
            <link>https://medium.com/@dmitrydoronin/postman-lost-its-way-f1bbd1fca2b0?source=rss-be7db7c2c1c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1bbd1fca2b0</guid>
            <category><![CDATA[postman]]></category>
            <dc:creator><![CDATA[Dima Doronin]]></dc:creator>
            <pubDate>Sun, 30 Aug 2026 21:59:59 GMT</pubDate>
            <atom:updated>2026-08-30T21:59:59.416Z</atom:updated>
            <content:encoded><![CDATA[<p>Postman was one of the most beloved developer tools of the last decade. It solved a simple but painful problem: making API requests easy, understandable and safe. Developers could explore APIs, debug requests, share collections and collaborate with teammates without fighting curl commands or custom scripts.</p><p>Over time, however, Postman expanded far beyond its original mission. Support for additional protocols, collaboration features, unit testing, monitoring, Flows, Notebooks, AI capabilities and countless enterprise features transformed the platform into something much larger.</p><p>Every new feature increases complexity, operating costs and maintenance burden. Postman continuously added surface area losing focus on the workflows that made users love the product in the first place.</p><p>Instead of building dozens of adjacent products, Postman should have invested heavily in performance, reliability and developer experience. The most valuable strategy may not have been building more products, but continuing to build the best API client in the world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1bbd1fca2b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Built OneMCP to Make Large MCP Toolsets Usable]]></title>
            <link>https://medium.com/@dmitrydoronin/i-built-onemcp-to-make-large-mcp-toolsets-usable-6018826fc8d6?source=rss-be7db7c2c1c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/6018826fc8d6</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[mcp-server]]></category>
            <dc:creator><![CDATA[Dima Doronin]]></dc:creator>
            <pubDate>Thu, 27 Aug 2026 03:14:36 GMT</pubDate>
            <atom:updated>2026-08-28T01:48:13.786Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0tHccS4opOYgS5_4JtVq3g.png" /></figure><p><em>How I used Cloudflare Workers, Durable Objects, MCP portals, and Code Mode to turn many MCP servers into one practical endpoint.</em></p><p>Every MCP server is useful right up until you connect a few of them.</p><p>A GitHub server, a project-management server, a database server, Slack, observability, cloud infrastructure. Individually, each one gives an AI client new capabilities. Together, they create a quieter problem: every server brings its own connection, OAuth flow, tool schemas, naming conventions, and long list of definitions that the model must consider.</p><p>That is why I built <a href="https://onemcp.dev/">onemcp.dev</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M6fr14cMSbSgmCMFjxBenA.png" /></figure><p>OneMCP is a hosted MCP portal layer. You add remote MCP servers to a portal, authenticate them, and connect your AI client to one endpoint. Behind that endpoint, OneMCP discovers and connects to the upstream servers. The client gets a compact interface for finding, understanding, and executing the capabilities it needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pBGlhcEFwQepiE7jmpY5TQ.png" /></figure><p>The goal is not to replace MCP servers. It is to make a growing MCP estate manageable for both people and models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ou-4yorBJos5r-Fau35V7g.png" /></figure><h3>The problem is not just connection count</h3><p>The obvious issue with multiple MCP servers is setup. A developer may need to paste several URLs into Claude, Cursor, VS Code, or another MCP client. Each service may require a different OAuth consent flow or API token. Repeating that setup across clients is annoying, but it is solvable.</p><p>The more consequential problem is context.</p><p>A conventional MCP client asks servers for their tool definitions and sends those definitions to the model. Once a connected environment contains dozens or hundreds of tools, their names, descriptions, and JSON schemas become part of the working context before the model has done useful work.</p><p>That creates several costs:</p><ul><li>Larger prompts and more token spend</li><li>More irrelevant tools competing for the model’s attention</li><li>More client configuration to maintain</li><li>A worse experience whenever a tool is renamed, added, or removed</li><li>Repeated authentication and connection work across clients</li></ul><p>Cloudflare’s own <a href="https://developers.cloudflare.com/cloudflare-one/access-controls/ai-controls/mcp-portals/">MCP server portals</a> address the same structural problem: centralize multiple MCP servers behind one HTTP endpoint, apply authentication at the portal layer, and control the tools a client can access.</p><p>I wanted to build a developer-friendly version of that pattern on Cloudflare’s platform, while making context efficiency the main product constraint.</p><h3>The core idea: a portal is an MCP control plane</h3><p>In OneMCP, a portal is a curated collection of upstream MCP servers.</p><p>For example, an “Engineering” portal might include GitHub, Linear, Sentry, a Postgres MCP server, and Cloudflare’s own MCP server. A “Support” portal might expose Slack, Notion, and a customer-data service instead.</p><p>The AI client does not need a separate connection for each upstream. It connects to one endpoint:</p><p>The portal is then responsible for:</p><ol><li>Resolving the upstream servers included in that portal</li><li>Applying the correct credentials and custom headers for each server</li><li>Connecting over Streamable HTTP or SSE</li><li>Discovering available tools</li><li>Providing a stable interface to the AI client</li><li>Recording useful request activity without storing secrets in logs</li></ol><p>This is deliberately close to the MCP portal model Cloudflare documents, but OneMCP is an application I can evolve around the workflow I want: reusable server definitions, per-portal credentials, OAuth handling, import/export, and an execution model optimized for large tool catalogs.</p><h3>Why Cloudflare Workers and Durable Objects fit</h3><p>OneMCP is a full-stack Cloudflare Worker application. The frontend is React and Vite; the API and MCP endpoint run in the Worker. Static assets are served through a Worker ASSETS binding.</p><p>The interesting part is state.</p><p>A portal needs durable configuration: which servers belong to it, how each member is authenticated, OAuth state, portal access tokens, and a bounded request log. It also needs an isolated place to coordinate Code Mode runtime state.</p><p>That is where Cloudflare Durable Objects are useful.</p><p>The application has a few deliberately narrow Durable Object ownership boundaries:</p><ul><li>A UserDO owns an account, sessions, and the user’s registries of servers and portals.</li><li>An McpServerDO owns an MCP server definition: name, URL, transport, and description.</li><li>An McpPortalDO owns a portal’s member rows, credentials, custom headers, OAuth state, access token, request log, and Code Mode runtime coordination.</li><li>A small PlatformDO provides an application-wide user index for administration.</li></ul><p>Each object uses Durable Object SQLite storage. The key design decision was to store upstream credentials on the <em>portal membership</em>, rather than globally on the user or server definition.</p><p>That means the same GitHub MCP server can exist in two portals with different credentials, permissions, or custom headers. An engineering portal can use one identity; a personal portal can use another. The server is reusable, but the access context remains scoped.</p><p>That is a more honest data model for real MCP use. The connection target may be shared; the authority to use it usually is not.</p><h3>OAuth has two directions</h3><p>MCP aggregation introduces two separate authentication problems.</p><p>First, an AI client must authenticate to OneMCP’s portal endpoint. Second, OneMCP may need to authenticate to every upstream MCP server on the user’s behalf.</p><p>For the portal-facing side, the Worker uses <a href="https://github.com/cloudflare/workers-oauth-provider">@cloudflare/workers-oauth-provider</a> to act as an OAuth authorization server. A remote MCP client can receive a 401 with resource metadata, discover the authorization endpoints, register as an OAuth client, and complete the authorization flow.</p><p>For headless cases, OneMCP also supports a revocable static token scoped to one portal.</p><p>For the upstream-facing side, OneMCP uses the MCP SDK’s OAuthClientProvider implementation. The portal membership Durable Object persists the OAuth client information, PKCE verifier, authorization state, redirect URL, access token, and refresh token.</p><p>In practical terms, a user clicks Authenticate for an upstream server, completes consent with that provider, and OneMCP stores the resulting credentials host-side. Later tool calls use those credentials without exposing them to the AI client or to generated code.</p><p>This boundary matters. The sandbox should be able to invoke github.create_issue(...); it should never be able to read a bearer token.</p><p>Some upstreams support OAuth Dynamic Client Registration. Others require a manually registered OAuth app. OneMCP supports both paths, including the less glamorous but important reality that OAuth redirect URIs need exact matching and that refresh tokens are not always available.</p><p>Those are the kinds of details that decide whether an MCP integration is a demo or a usable system.</p><h3>Code Mode changes the context equation</h3><p>Cloudflare’s <a href="https://developers.cloudflare.com/agents/tools/codemode/">Code Mode</a> is the key piece of the design.</p><p>Instead of exposing every upstream tool definition directly to the model, OneMCP exposes three small meta-tools:</p><ul><li>search finds relevant tools across every server in the portal.</li><li>describe returns the TypeScript signature and documentation for a selected tool.</li><li>execute runs an async JavaScript function against the selected tools.</li></ul><p>A model can follow a workflow like this:</p><ol><li>Search for “create a pull request”</li><li>Describe github.create_pull_request</li><li>Execute a small function that calls GitHub and perhaps posts the result to Slack</li></ol><pre>async () =&gt; {<br>  const pullRequest = await github.create_pull_request({<br>    owner: &quot;acme&quot;,<br>    repo: &quot;api&quot;,<br>    head: &quot;feature/auth&quot;,<br>    base: &quot;main&quot;,<br>    title: &quot;Add OAuth callback handling&quot;<br>  });<br><br>  await slack.post_message({<br>    channel: &quot;#engineering&quot;,<br>    text: `Pull request created: ${pullRequest.url}`<br>  });<br><br>  return pullRequest.url;<br>}</pre><p>The important property is not that the model writes JavaScript. It is that tool discovery happens progressively.</p><p>Cloudflare describes Code Mode as a pattern where generated code becomes a compact execution plan: it can compose dependent tool calls, loop through results, filter intermediate data, and return only what is needed. For large tool catalogs, search and describe allow the model to retrieve types only when required.</p><p>That means the initial portal interface stays nearly constant as upstream tool count grows. A portal with five tools and a portal with five hundred tools can present the same small entry surface.</p><p>Cloudflare’s MCP portal documentation makes a similar point: Code Mode can replace a large upstream tool list with a compact search-and-execution interface, while generated code runs in an isolated Dynamic Worker environment.</p><h3>Keeping execution useful without leaking secrets</h3><p>OneMCP’s Code Mode runtime is built using @cloudflare/codemode and a LOADER Worker Loader binding.</p><p>Every upstream server becomes a connector with a safe JavaScript namespace, such as:</p><p>The generated code receives those typed methods. The host-side connector owns the actual network connection, OAuth refresh behavior, static bearer token injection, and custom headers.</p><p>This gives the runtime a useful division of responsibility:</p><ul><li>The model chooses tools and writes the control flow.</li><li>The sandbox executes the plan.</li><li>The host owns credentials and upstream transport.</li><li>The portal retains the policy and audit boundary.</li></ul><p>OneMCP also degrades gracefully when one upstream server becomes unavailable or needs reauthentication. A broken member should not make an entire portal unusable. Its tools disappear from discovery until it is fixed, while other portal members continue to work.</p><h3>Observability is part of the product</h3><p>When an agent calls tools through an aggregation layer, debugging cannot stop at “something failed.”</p><p>OneMCP records both inbound portal calls and outbound upstream round trips. The logs capture status, duration, target, request and response metadata, and errors. Sensitive headers such as authorization tokens, cookies, secrets, and API keys are redacted before anything is persisted.</p><p>That lets a user answer practical questions:</p><ul><li>Did the client call search, describe, or execute?</li><li>Which upstream server was contacted?</li><li>Did the upstream reject the credential?</li><li>Was this a timeout, a schema mismatch, or a provider-side failure?</li><li>What did the portal actually return?</li></ul><p>Cloudflare’s managed portals provide portal-level observability and can route traffic through Gateway for richer HTTP logging and DLP inspection. OneMCP’s request log is a smaller application-level version of the same principle: MCP needs operational visibility because it is now part of the path between an agent and production systems.</p><h3>What I learned building OneMCP</h3><p>The main lesson is that MCP scale is a product design problem as much as a protocol problem.</p><p>Adding more servers should not force users to manage more client configuration. Adding more tools should not inflate model context linearly. Adding OAuth should not require putting secrets into an agent’s execution environment.</p><p>Cloudflare Workers made it possible to keep the application, OAuth server, MCP endpoint, and static frontend close together. Durable Objects gave each user and portal a natural state boundary. Cloudflare Code Mode provided the execution model that makes a portal useful when the upstream tool catalog becomes large.</p><p>OneMCP is my attempt to turn that architecture into a practical developer workflow: one endpoint for many MCP servers, credentials kept host-side, and a model that discovers capabilities as it needs them.</p><p>The implementation is still evolving, but the principle is stable:</p><blockquote><em>Give the agent access to many capabilities without making it carry every capability in context all the time.</em></blockquote><p><strong>References</strong></p><ul><li><a href="https://developers.cloudflare.com/agents/tools/codemode/">Cloudflare Code Mode documentation</a></li><li><a href="https://developers.cloudflare.com/cloudflare-one/access-controls/ai-controls/mcp-portals/">Cloudflare MCP server portals documentation</a></li><li><a href="https://developers.cloudflare.com/workers/runtime-apis/bindings/worker-loader/">Cloudflare Worker Loader and Dynamic Worker isolation</a></li><li><a href="https://modelcontextprotocol.io/">Model Context Protocol</a></li><li><a href="https://onemcp.dev/">OneMCP</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6018826fc8d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I'm Joining Cloudflare as a Forward Deployed Engineer]]></title>
            <link>https://medium.com/@dmitrydoronin/why-im-joining-cloudflare-as-a-forward-deployed-engineer-84269de60369?source=rss-be7db7c2c1c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/84269de60369</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[cloudflare]]></category>
            <dc:creator><![CDATA[Dima Doronin]]></dc:creator>
            <pubDate>Sun, 14 Jun 2026 01:01:42 GMT</pubDate>
            <atom:updated>2026-06-14T01:01:42.795Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yRPDptF8h7DU3QlOWysSrA.png" /></figure><h3>Why I’m Joining Cloudflare as a Forward Deployed Engineer</h3><p>My friends keep asking me the same question:</p><p><em>“Are you worried about AI taking your job?”</em></p><p>My answer is always no. But probably not for the reason you’d expect.</p><p>Software engineering was never about writing code for me. It was always about the problem underneath. In high school, that meant mathematical equations. In university, computing high-order differential equations to design optimal physical systems. From analyzing financial instruments at Goldman Sachs to scaling real-time event intelligence at Dataminr and optimizing API networks at Postman, the code was always the medium, not the message. Writing it felt like painting: expressive and joyful. But the hard part was never the brushwork. It was knowing what deserved to be built.</p><p>I’ve come to believe the rarest thing in software is a combination of technical skill and judgment: knowing what to build, where it belongs, and how to make it hold together under the weight of reality.</p><p>That is exactly why I’m joining Cloudflare as a Forward Deployed Engineer.</p><h3>Generating code is becoming commoditized</h3><p>Once requirements are understood, implementation is increasingly automated. An engineer who knows how to prompt well, review critically, and iterate fast can produce in an afternoon what used to take a week. I do this every day. The feedback loop that once spanned hours now spans minutes.</p><p>When code becomes cheap, everything upstream of the code becomes precious. The decision about what to build. The architecture that will still be standing in five years. The distributed systems intuition that prevents cascade failures. None of that lives in a prompt. All of it lives in accumulated scar tissue: production incidents, architecture post-mortems, and the particular education that only comes from owning something that breaks.</p><p>An LLM can generate brilliant code and cover it with unit and end-to-end tests, but you still need someone in the room who has been paged at 2am. Who has watched a data partition skew kill a 50-node Spark cluster. Who knows in their bones that the elegant solution and the correct solution are not always the same thing, and that the gap between them is usually where the outage lives.</p><p>That person is worth more now, because now they can turn a week of work into an afternoon, and spend the time they save on the decisions that actually matter.</p><h3>What drew me to Cloudflare</h3><p>Cloudflare runs one of the largest networks on the planet: serverless compute at the edge, security primitives, observability, storage, databases, Durable Objects. A full stack that touches almost every hard problem in distributed systems, at a scale where those problems are not theoretical.</p><p>The Forward Deployed Engineer role is about being embedded inside a strategic customer’s engineering organization: writing production code, owning the technical relationship end to end, and carrying real-world product gaps back to Cloudflare’s own engineering teams. It sits at the intersection of the two things I’ve always cared most about: going deep technically, and operating at a scale where architectural decisions have real impact.</p><p>I’ve spent my career building toward that. At Reonomy, I built pipelines that compressed weeks of analyst work into five hours of computation. At Dataminr, I architected fault-tolerant systems designed to keep running when individual nodes failed. At Postman, I designed systems adopted by teams across the organization. Different companies, different domains, but the same pattern every time: the hard part was never the code.</p><p>The hardest problems in software are never inside a single service. They live at the boundaries: between services, between teams, between what a platform promises and what a system actually needs when it’s running at scale under pressure.</p><p>Cloudflare has chosen to live in those seams. It’s a company built on the proposition that the hard infrastructure problems (performance, security, resilience, global distribution) shouldn’t be something every engineering team has to solve from scratch. They absorb the complexity so their customers don’t have to.</p><p>That’s exactly where I want to be. And honestly? I’ve been reading Cloudflare’s engineering blog for years, using their infrastructure as a user. Now I get to find out what all of it feels like from the inside.</p><p>Cloudflare’s platform is where some of the hardest distributed systems problems in the world get solved. The FDE function is how those solutions reach the people who need them most. And the moment we’re standing in is where nearly every company is rebuilding its stack to be AI-native, and the edge has quietly become critical infrastructure.</p><p>I couldn’t be more excited to be joining Cloudflare. Let’s build.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84269de60369" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Build a Safe App That Never Asks Who You Are]]></title>
            <link>https://medium.com/@dmitrydoronin/how-to-build-a-safe-app-that-never-asks-who-you-are-81deb08dec19?source=rss-be7db7c2c1c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/81deb08dec19</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Dima Doronin]]></dc:creator>
            <pubDate>Thu, 11 Jun 2026 02:07:15 GMT</pubDate>
            <atom:updated>2026-06-11T02:10:22.398Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nrK9aFhyH97hIE97Q1N0ng.png" /></figure><p><em>What if “log in” didn’t exist? No email, no phone number, no password, no “Sign in with Google.” Just an app that knows exactly what you’re allowed to do, and nothing about who you are.</em></p><p><a href="https://just-call.app/blog/authorization-without-authentication">https://just-call.app/blog/authorization-without-authentication</a></p><p>Almost every app starts the same way. Before you can do anything, you have to prove who you are: type an email, get a code, pick a password, click a magic link. We call this authentication. It’s how you establish your identity against some central authority that holds a record of you.</p><p>Then, and only then, the app decides what you’re allowed to do. That’s authorization.</p><p>We’ve collapsed these two ideas together so thoroughly that most engineers treat them as one step. “Auth.” But they aren’t the same thing, and the moment you pull them apart, something surprising falls out:</p><blockquote><strong><em>You don’t actually need to know who a user is in order to know what they’re allowed to do.</em></strong></blockquote><p>I want to walk through a working implementation of that idea: a calling and messaging app where there’s no sign-up, no account table, no password hash, and no personal information on the server at all. Authorization is everything; authentication, in the traditional sense, simply doesn’t exist.</p><p>The whole system rests on three things: a private key, a public key, and a special role we’ll call the master key.</p><p><a href="https://just-call.app/">JustCall - Reliable International Video Calling</a></p><h3>The core trick: your identity is your public key</h3><p>Here’s the single idea the entire architecture is built on.</p><p>When a user opens the app for the first time, the client generates a secret locally (in this implementation, just a random UUID) and stores it in the browser. From that secret it deterministically derives an Ed25519 keypair:</p><pre>// The &quot;private key&quot; is a locally generated secret the server never sees.<br>privateKey = crypto.randomUUID();<br>// A deterministic Ed25519 keypair is derived from it.<br>// The PUBLIC half, base64url-encoded, becomes the user&#39;s ID.<br>userId = await derivePublicUserId(privateKey);</pre><p>That last line is the whole game. The user’s ID <em>is</em> their public key. Not a row in a users table that maps to a public key. The ID literally is the key:</p><pre>export async function exportPublicUserId(publicKey: CryptoKey): Promise&lt;string&gt; {<br>  const rawPublicKey = new Uint8Array(<br>    await getSubtleCrypto().exportKey(&quot;raw&quot;, publicKey),<br>  );<br>  return bytesToBase64Url(rawPublicKey);<br>}</pre><p>Think about what this eliminates:</p><ul><li>No registration. There’s nothing to register. The first time the server hears the userId, it just starts honoring requests signed by it.</li><li>No email or phone. The ID isn’t derived from any personal identifier. It’s derived from a random secret that exists only on the user’s device.</li><li>No password. There’s no shared secret to store, hash, salt, or leak. The server only ever sees the public key.</li><li>No “forgot password” flow, no account-recovery attack surface, no credential-stuffing. There are no credentials, in the classic sense, to stuff.</li></ul><p>The user never tells the server who they are. They just prove, with math, that they hold the private key corresponding to a public key, and that proof is all the authorization the server needs.</p><h3>How a request gets authorized</h3><p>If there’s no session and no token, what does a request look like? Every state-changing action carries its own proof. The client builds a payload, signs it with the private key, and sends the payload plus the signature:</p><pre>export async function signChatSend(identity, peerUserId, message) {<br>  const payload = { userId: identity.userId, peerUserId, message };<br>  const signature = await signPayload(identity.privateKey, payload);<br>  return { payload, signature };<br>}</pre><p>On the server, “authorization” is one function call. There’s no session lookup, no token decode, no database round-trip to a credentials store:</p><pre>const isValid = await verifyPayload(<br>  sendRequest.userId,                       // the public key = the claimed identity<br>  chatSendVerificationPayload(sendRequest), // exactly what was signed<br>  sendRequest.signature,<br>);<br><br>if (!isValid) {<br>  return jsonResponse({ message: &quot;invalid signature&quot; }, 401);<br>}</pre><p>And verifyPayload is exactly what it sounds like. It imports the userId <em>as a public key</em> and checks the signature against it:</p><pre>export async function verifyPayload(userId, payload, signature) {<br>  const publicKey = await importPublicKey(userId);   // userId IS the key<br>  return crypto.subtle.verify(<br>    { name: &quot;Ed25519&quot; },<br>    publicKey,<br>    base64UrlToBytes(signature),<br>    new TextEncoder().encode(canonicalJson(payload)),<br>  );<br>}</pre><p>If the signature verifies, the request is authentic <em>and</em> authorized in a single step. The user has proven possession of the private key behind that public ID, and possession is the entire authority model. Nobody can forge a request for a userId they don&#39;t hold the key for, because they can&#39;t produce a valid signature.</p><p>One subtle but important detail: both sides serialize the payload with canonical JSON (keys sorted, no ambiguity), so the bytes the client signs are exactly the bytes the server verifies:</p><pre>export function canonicalJson(value: unknown): string {<br>  return JSON.stringify(canonicalize(value)); // recursively sorts object keys<br>}</pre><p>Without this, two semantically identical objects could serialize differently and every signature would be a coin flip. Canonicalization is the unglamorous plumbing that makes signature-based auth actually work.</p><h3>Where the “master key” comes in</h3><p>A pure “your device holds the only key” model has an obvious problem: people have more than one device. If your phone holds the only private key for your identity, your laptop is a stranger.</p><p>This is where the master key pattern earns its name. There are two tiers of key:</p><ol><li>The master key. The original secret, the one the userId is derived from. The first device to create the identity holds it. It&#39;s the root of trust.</li><li>Per-device keys. Every device (including the master’s own device) also generates its <em>own</em> independent Ed25519 keypair, from a random seed:</li></ol><pre>deviceSeed = generateRandomSeed();          // 32 random bytes, per device<br>devicePublicKey = await derivePublicKeyFromSeed(deviceSeed);</pre><p>A new device can’t sign as the user. It doesn’t have the master key, and the master key is never copied between devices. Instead, linking works by delegation. The master device signs a small certificate binding the new device’s public key to the userId:</p><pre>export async function signMasterDeviceAuthorization(identity, newDevice) {<br>  if (!identity.isMaster) {<br>    throw new Error(&quot;Only the master device can sign device authorizations&quot;);<br>  }<br>  const authorization = {<br>    action: &quot;device-authorization&quot;,<br>    userId: identity.userId,<br>    deviceId: newDevice.deviceId,<br>    devicePublicKey: newDevice.devicePublicKey, // the new device&#39;s PUBLIC key<br>    label: newDevice.label,<br>    role: newDevice.role,<br>    createdAt: Date.now(),<br>  };<br>  const signature = await signPayload(identity.privateKey, authorization);<br>  return { authorization, signature };<br>}</pre><p>The server accepts this delegation only if it was signed by the master, i.e. it verifies against the user’s own userId:</p><pre>// Registering a device: the authorization must be signed by the master key.<br>const isValid = await verifyPayload(auth.userId, auth, signed.signature);<br>if (!isValid) {<br>  return Response.json({ message: &quot;invalid signature&quot; }, { status: 401 });<br>}</pre><p>After that, the new device signs its own requests with its own device key, and the server verifies against the device’s registered public key. The master has, in effect, issued a credential without ever sharing its secret, the same way a certificate authority vouches for a website it doesn’t own the private key to.</p><p>This gives you a clean, legible permission hierarchy that maps onto real life:</p><ul><li>The master can revoke any device. Revocation is just flipping a revokedAt timestamp; the next signed request from that device fails the &quot;is this device still valid?&quot; check and its live WebSockets are force-closed (close(4002, &quot;device revoked&quot;)).</li><li>A device can only act for itself unless it’s the master:</li></ul><pre>const isMaster = signerRow.role === &quot;master&quot;;<br>// ...<br>if (!isMaster) {<br>  return Response.json({ message: &quot;forbidden&quot; }, { status: 403 });<br>}</pre><p>Roles, delegation, revocation, least-privilege: the entire vocabulary of a serious authorization system, all expressed in signatures, with not a single password or session token in sight.</p><h3>What the server actually stores (almost nothing)</h3><p>Step back and look at what’s in the database. Each user is a small isolated state container (a Cloudflare Durable Object), addressed by their userId:</p><pre>export function getUserAccountStub(env, userId) {<br>  return env.USER.get(env.USER.idFromName(userId));<br>}</pre><p>The “account” record holds a display name the user chose, an optional avatar, a list of <em>public</em> device keys, and push-subscription endpoints. That’s it. Read the device table schema and notice what’s <em>not</em> there:</p><pre>CREATE TABLE devices (<br>  deviceId        TEXT PRIMARY KEY,<br>  devicePublicKey TEXT NOT NULL,   -- public, by definition<br>  label           TEXT NOT NULL,<br>  role            TEXT NOT NULL,<br>  ...<br>);</pre><p>No email. No phone. No password hash. No security questions. No private keys; those never leave the user’s devices.</p><p>Now run the classic thought experiment: the entire database is leaked. What did the attacker get? A pile of public keys (which are public by definition and useless without the matching secrets), some self-chosen display names, and avatar images. They can’t impersonate anyone, because impersonation requires a private key the server never had. They can’t cross-reference users against a password dump, because there are no passwords. They can’t phish anyone via “your email,” because the system never collected one.</p><p>You can’t leak what you never stored. The most reliable way to protect personal information is to never possess it in the first place, and an identity model where the ID is a public key lets you mean that literally.</p><h3>Why this is safer, not just clever</h3><p>It’s tempting to file this under “neat cryptography demo.” It’s more than that. Compare the attack surfaces.</p><p>A traditional email-and-password app has to defend a credentials database (the perennial breach headline), password-reset flows (a favorite account-takeover vector), email/SMS delivery for codes (SIM-swap, interception, deliverability), session tokens (theft, fixation, replay), and a pile of regulated PII it’s now legally responsible for.</p><p>This model has to defend the user keeping their key. That’s the real trade-off, and there’s no central authority to reset a lost key. It’s a genuine product constraint, not a footnote. But notice that every item on the first list is gone. There’s no credential store to breach, no reset flow to abuse, no PII to regulate, and no shared secret in flight to intercept. The blast radius of a server compromise shrinks to “an attacker can read public keys and display names,” which is information that was never sensitive in the first place.</p><p>You’ve moved trust from “a server that promises to guard your secret” to “math the user already controls.” That’s a strictly smaller thing to get wrong.</p><h3>How to use this pattern more widely</h3><p>The app here happens to do calls and chat, but nothing about the pattern is specific to messaging. The same shape works in a lot of places:</p><p><strong>1. Make the identity a keypair, and make the ID the public key.</strong> Generate it on the client. Derive a stable, shareable identifier from the public half. Never transmit the private half. The user’s “account” is conjured into existence the first time the server sees a valid signature from a new public key, and registration becomes a no-op.</p><p><strong>2. Authorize by verifying signatures, not by checking sessions.</strong> Every meaningful action carries { payload, signature }. The server&#39;s authorization logic collapses to: does this signature verify against the public key claiming to perform the action, and does that key have the right role? Sign over canonical bytes so client and server agree on exactly what was signed.</p><p><strong>3. Use a master key to delegate, not to share.</strong> When a principal needs to extend trust (a second device, a teammate, a service account, an API client) have the root key sign a certificate granting specific, role-scoped, revocable authority to a <em>new</em> key. The root secret never moves. This is how you get teams, devices, and machine clients without ever building a password system. It’s the same shape as SSH certificate authorities, Macaroons, and the device-trust models inside Signal and WhatsApp. This post is just the small, readable version.</p><p><strong>4. Store only public material.</strong> If the server only ever holds public keys and user-chosen labels, then “what happens when we get breached?” has a boring answer. That’s the goal.</p><p>A few caveats worth flagging before you ship something like this. Key custody becomes the hard problem; losing the key means losing the identity, so production systems layer on recovery (social recovery, an optional encrypted cloud backup of the key, a hardware key). Signed-but-replayable requests want a nonce or timestamp window (this codebase already puts ts and createdAt into its payloads for exactly this reason). And &quot;no identity&quot; means no built-in spam gate, so abuse prevention moves to proof-of-work, rate limits, or invitations rather than email verification. None of these undo the model. They&#39;re the same problems every system has, just without a password database sitting in the middle of them.</p><h3>The takeaway</h3><p>We’ve spent two decades conflating <em>“who are you?”</em> with <em>“what may you do?”</em>, and paying for it with breach after breach of data we only collected to answer the first question.</p><p>But the first question was never the point. An app doesn’t need your name, your email, or your phone number to let you send a message, join a call, or edit a document. It needs to know you’re allowed to. A keypair answers that completely: possession of the private key is the authorization, and the public key is the only thing the world ever needs to see.</p><p>Authentication asks you to prove who you are to someone who will then hold that information, and the liability, forever. Authorization, done with keys, asks only that you prove you’re allowed, and lets everyone forget the rest.</p><p>Most apps don’t need to know who you are. They’ve just never been built to admit it.</p><p><em>The code in this post is from a production calling app built on Cloudflare Workers and Durable Objects. The identity layer is roughly 180 lines of Ed25519 signing and verification. There’s no auth service, no user database, and no password anywhere in the codebase.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81deb08dec19" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Atlas: What I Learned Building an AI Crawler for API Discovery]]></title>
            <link>https://medium.com/@dmitrydoronin/atlas-what-i-learned-building-an-ai-crawler-for-api-discovery-012613fd183b?source=rss-be7db7c2c1c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/012613fd183b</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[developer-tools]]></category>
            <dc:creator><![CDATA[Dima Doronin]]></dc:creator>
            <pubDate>Wed, 27 May 2026 14:55:37 GMT</pubDate>
            <atom:updated>2026-05-27T16:28:52.650Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rxdafCP2oPbr0OVw-fFFfg.png" /></figure><p><em>The story of an AI crawler for API discovery, and an insight that arrived too late.</em></p><h4>The Eureka Moment That Arrived After I Got Laid Off</h4><p>A few weeks ago I was reading a completely unrelated article about how Claude Code handles MCP servers, specifically how it generates parser code on the fly rather than hardcoding integration logic:<br><a href="https://www.anthropic.com/engineering/code-execution-with-mcp">https://www.anthropic.com/engineering/code-execution-with-mcp</a></p><p>And I had one of those moments where you stare at the ceiling and mutter something to yourself. That was the answer to the problem I’d been wrestling with for weeks while building <a href="https://www.postman.com/postman-atlas">Atlas</a> at Postman. The irony is I no longer worked there.</p><p>Let me back up.</p><h4>Joining Postman and the Public API Network</h4><p>I joined Postman in 2024 as part of the PAN org (Public API Network). Honestly, when I came in, my mental model of what PAN actually was remained a bit fuzzy. I’d heard phrases like “network effect” and “API publishers” tossed around, and I understood the rough shape of the vision: Postman wanted to be the place where the world’s APIs lived. Not just used, but discovered.</p><p>The numbers behind that vision are striking. Postman has 50 million active users and 300,000 teams. Out of those, my rough estimate put around 7,000 companies actively trying to distribute their APIs on the network. The business model is subscription-based, and the real revenue engine is enterprise. The vast majority of those 50 million users, something like 49 million of them , use Postman completely for free.</p><p>So there’s this interesting tension baked into the product: the platform’s value comes from the network of APIs, but the people who most benefit from that network (individual developers) aren’t the ones paying for it. The companies whose APIs live on the network are. To grow revenue, you need to grow the quality and breadth of the API catalog. To grow the catalog, you need to dramatically lower the friction of getting an API onto the network.</p><p>That friction was enormous.</p><h4>The Problem Nobody Was Solving Well</h4><p>Getting an API published on Postman wasn’t easy. A company needed to upload their API specification, create meaningful examples, organize collections, document edge cases, all before a developer even arrived to explore it. For most API teams, this was a manual, time-consuming chore. And once it was done, keeping it up-to-date was another chore entirely.</p><p>Meanwhile, I kept talking to Customer Success and it became clear we shared the same read: Postman had real value for both sides of this marketplace. Engineers building on top of an API love a well-organized, interactive Postman collection. Companies building APIs want developers to actually adopt them. We just needed to connect the two sides, and the connection required removing the manual work in the middle.</p><p>Around this time, I watched a few other internal initiatives come and go. There were projects like Notebooks, Mock Servers, Monitors, Pull Requests, MCP generators, SDK Code Generators, etc. that never found user adoption, despite continued investment.</p><p>I want to clarify something important: the path forward is not to build more features. It’s to automate a specific, concrete, painful workflow. Pick the right problem, solve it completely.</p><h4>Atlas: The AI Crawler</h4><p>The idea I landed on was simple to describe and surprisingly hard to execute well:</p><blockquote>automatically ingest a company’s API documentation into Postman.</blockquote><p>I named the project Atlas. The concept was an AI-powered crawler built on top of OpenAI’s web_search and Anthropic’s web_fetch tools. It would crawl an API provider’s website, locate all available API definitions and documentation, extract structured data, generate citations, and push everything into Postman via internal APIs , formatted correctly for all the protocols Postman supports.</p><p>I had a working POC within days. MVP followed shortly after. We deployed v1 to production in under a month from when I started.</p><p>The unit economics looked reasonable: roughly $1–$10 to fully onboard one company. For a handful of companies, that’s nothing. But the vision wasn’t a handful, it was tens of thousands of companies, refreshed regularly to stay current. At 10,000 companies refreshed monthly, you’re looking at up to $100,000 per month in inference costs. That’s not a cost that scales with the business in any comfortable way.</p><p>So from the very start, the architectural question I was carrying around was:</p><blockquote>how do you make refresh cost essentially zero?</blockquote><p>I didn’t have the answer when I shipped v1. I was still turning it over when I left for a five-day vacation to decompress. On day three of that vacation, I was laid off.</p><p>The project continued without me, likely under a different set of cost and operational constraints. One thing I still think about is how the architecture could have evolved if refresh costs had been pushed closer to zero.</p><h4>The Insight I Wish I’d Had Earlier</h4><p>Here’s the thing about expensive AI crawlers: you’re paying to do something a computer could do for almost nothing if you knew exactly how to do it.</p><p>When I read about how Claude Code and Cloudflare MCP handle integrations by generating executable code, something clicked. The expensive part of Atlas wasn’t the crawling, it was the reasoning required to figure out how to crawl a given site. What’s the API documentation structure? Where are the OpenAPI specs hidden? How are authentication parameters described?</p><p>An LLM is uniquely good at answering those questions once for any given site.</p><p>Here’s what I’d do differently: instead of using the AI to crawl the site every time a refresh is needed, use the AI to write the executable crawler code. The first time Atlas encounters a new API provider, it reasons through the site structure and generates a parser, a lightweight script that knows exactly where to find the specs, what format they’re in and how to extract the relevant data. Save that script. Then, on every subsequent refresh, just run the script. No LLM required. Near-zero cost.</p><p>The LLM investment happens once per company, not once per company per month.</p><p>This is essentially what code generation tooling does when it generates MCP connectors or API clients, it encodes knowledge about a system into runnable code rather than re-deriving that knowledge every time. Applied to Atlas, it would have turned a $100k/month refresh bill into something closer to a few dollars in compute.</p><h4>What I’d Do Next</h4><p>If I were building Atlas today, a few things would look different:</p><ol><li><strong>Generate crawler code instead of crawling repeatedly.<br></strong>The code-generation insight above isn’t just a cost optimization, it’s a fundamentally more robust approach. A generated parser for a specific site is auditable, testable, and improvable. A black-box AI crawl is opaque and variable.</li><li><strong>Instrument quality more aggressively.</strong> <br>We measured cost and coverage but didn’t build strong enough signals for quality. Did the resulting Postman collection actually feel useful to a developer? That feedback loop would have guided model choices more rigorously than intuition.</li></ol><h3>The Part That Still Stings</h3><p>The version of Atlas that <a href="https://www.postman.com/postman-atlas">exists</a> now isn’t the one I envisioned. That’s fine, software evolves, teams change, priorities shift. What I find myself thinking about isn’t the project that was, but the project that could have been: a system that made every public API in the world instantly discoverable and usable in Postman, maintained automatically, at a cost that made the economics straightforward.</p><p>The technical path to that system became clear to me only after I no longer had the seat to build it.</p><p><em>If you’ve built something similar, or have thoughts on the refresh problem, I’d genuinely love to hear from you.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=012613fd183b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Agents.md]]></title>
            <link>https://medium.com/@dmitrydoronin/agents-md-33fb644be7a8?source=rss-be7db7c2c1c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/33fb644be7a8</guid>
            <category><![CDATA[agents]]></category>
            <dc:creator><![CDATA[Dima Doronin]]></dc:creator>
            <pubDate>Wed, 06 May 2026 20:42:56 GMT</pubDate>
            <atom:updated>2026-05-06T20:42:56.008Z</atom:updated>
            <content:encoded><![CDATA[<pre># AGENTS.md<br><br>This document describes how this backend is structured so coding agents can implement changes consistently and safely.<br><br>## Scope<br><br>Focus areas:<br><br>- Awilix container architecture<br>- Endpoint architecture and route loading<br>- Unit/integration test architecture<br><br>Out of scope:<br><br>- Deployment and infrastructure<br>- CI/CD specifics<br><br>## Project Architecture (Execution Flow)<br><br>Runtime flow:<br><br>1. `src/server.ts` creates a Fastify instance by calling `build(...)` from `src/app.ts`.<br>2. `src/app.ts` registers the DI plugin (`src/plugins/container.ts`).<br>3. `src/app.ts` registers `@fastify/autoload` for all route plugins under `src/routes`.<br>4. Route handlers resolve dependencies from `fastify.diContainer` where needed.<br><br>Key rule: keep `src/app.ts` as the single composition root for plugin and route registration.<br><br>## Awilix Container Architecture<br><br>Container setup lives in `src/plugins/container.ts`.<br><br>### What is registered<br><br>- `healthService` -&gt; `asClass(HealthService, { lifetime: Lifetime.SINGLETON })`<br><br>### Cradle typing<br><br>- The `Cradle` interface is augmented via `declare module &quot;@fastify/awilix&quot;`.<br>- Add new dependencies to `Cradle` whenever registering new services so route/service resolution stays typed.<br><br>### Plugin options<br><br>The `fastifyAwilixPlugin` is registered with:<br><br>- `disposeOnClose: true`<br>- `disposeOnResponse: true`<br>- `strictBooleanEnforced: true`<br><br>### Service resolution pattern<br><br>Routes resolve dependencies via:<br><br>- `fastify.diContainer.resolve(&quot;serviceName&quot;)`<br><br>### Adding a new service<br><br>When adding a service, update all of the following:<br><br>1. Create service class in `src/services`.<br>2. Add the service to `Cradle` typing in `src/plugins/container.ts`.<br>3. Register service in `fastify.diContainer.register({...})` in `src/plugins/container.ts`.<br>4. Resolve and use service from route plugin(s) or other consumers.<br>5. Add/adjust tests:<br><br>- direct unit test under `test/services`<br>- route test(s) under `test/routes` if endpoint behavior depends on it<br><br>## Endpoint Architecture<br><br>Routes are plugin files under `src/routes`, auto-loaded by `@fastify/autoload`.<br><br>### Existing endpoints<br><br>- `GET /` in `src/routes/root.ts` -&gt; `{ status: &quot;ok&quot; }`<br>- `GET /hello_world` in `src/routes/root.ts` -&gt; `{ hello: &quot;world&quot; }`<br>- `GET /health` in `src/routes/health.ts` -&gt; `healthService.check()` result<br><br>### Route plugin conventions<br><br>- Export a `FastifyPluginAsync` default plugin.<br>- Register handlers using `fastify.get(...)`/`fastify.post(...)` etc.<br>- Keep handlers small; move domain logic to services.<br>- Prefer DI resolution inside routes for business logic dependencies.<br><br>### Adding a new endpoint<br><br>1. Add or update a plugin file in `src/routes`.<br>2. Use explicit method + path registration in the plugin.<br>3. If business logic is needed, add/resolve service through DI container.<br>4. Return JSON-serializable payloads from handlers.<br>5. Add route tests in `test/routes`.<br><br>## Unit and Integration Test Architecture<br><br>Test stack:<br><br>- Jest (`jest.config.cjs`)<br>- TypeScript via `ts-jest`<br>- Fastify injection for route-level testing<br><br>### Test layout<br><br>- Service unit tests: `test/services/*.spec.ts`<br>- Route integration tests: `test/routes/*.spec.ts`<br>- Shared builder helper: `test/helper.ts`<br><br>### Current patterns<br><br>- Route tests build app with `build({ logger: false })`, call `await app.ready()`, and close in `afterAll`.<br>- Assertions use `app.inject(...)` and `response.json()`.<br>- DI can be stubbed in tests by re-registering container values, e.g. `asValue({ check: jest.fn() })`.<br>- Service tests instantiate classes directly and assert return shape/types.<br><br>### Minimum expectations for new tests<br><br>For any new endpoint/service:<br><br>1. Happy-path test exists.<br>2. Response contract is asserted (status code + payload).<br>3. Service behavior is covered at unit level when logic is non-trivial.<br>4. Dependencies are mocked/stubbed through container where route behavior depends on collaborators.<br><br>## Agent Change Playbooks<br><br>### Playbook: add a new DI-backed endpoint<br><br>1. Implement/extend service in `src/services`.<br>2. Register and type service in `src/plugins/container.ts`.<br>3. Add endpoint in `src/routes` and resolve service from DI.<br>4. Add route tests for HTTP contract and behavior.<br>5. Add service unit tests for logic.<br>6. Run tests.<br><br>### Playbook: modify existing endpoint behavior<br><br>1. Identify whether change is route-level only or service-level.<br>2. Update service first if business logic changes.<br>3. Keep route handler focused on HTTP boundary + dependency calls.<br>4. Update route test assertions and service tests accordingly.<br>5. Run tests.<br><br>### Validation commands<br><br>- `npm test`<br>- `npm run build:ts`<br><br>## Guardrails for Agents<br><br>- Do not bypass the DI container for shared business services.<br>- Do not place non-trivial business logic directly in route handlers.<br>- Keep service APIs deterministic and easy to unit test.<br>- When stubbing collaborators in route tests, prefer container re-registration over monkey-patching modules.<br>- Ensure app instances are closed in tests to prevent open-handle leaks.</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33fb644be7a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Collect Server Events Across Hundreds of Microservices]]></title>
            <link>https://itnext.io/how-to-collect-server-events-across-hundreds-of-microservices-b1ece4dcd0ac?source=rss-be7db7c2c1c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1ece4dcd0ac</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Dima Doronin]]></dc:creator>
            <pubDate>Wed, 06 May 2026 20:18:34 GMT</pubDate>
            <atom:updated>2026-05-11T15:20:12.929Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l1nhPWGii5Yzi7M1jXoYJQ.png" /></figure><p><em>A practical pipeline using Fluent Bit, S3, Redshift and Redash.</em></p><p>Every monitoring system starts at the same place: an event log. You can build dashboards, alerts, billing reports, product analytics and ML pipelines on top of it, but underneath there’s just a stream of records saying “this thing happened at this time.” Sounds simple. It stops being simple the moment you have a few hundred services running across a few dozen environments, each one producing events at different rates, with different lifetimes and different audiences.</p><p>This article is about a pipeline that handles that situation without falling over. It’s the same shape a lot of teams converge on once they hit this scale: write to disk, ship with Fluent Bit, store in S3, load into Redshift, query with Redash. Nothing exotic. The interesting part is why each piece is there.</p><h3>What makes this hard</h3><p>A backend at scale isn’t one program. It’s dozens, sometimes hundreds, of services. Each one runs multiple replicas. On a busy day they collectively produce tens of thousands of events per minute. Some of those events are operational (request received, query ran, cache miss). Others are domain events the product team cares about. Both kinds matter, but they need different homes.</p><p>A naive design ships every log line to one giant destination. You either pay for storage you don’t need, or you drop fidelity you can’t recover. The trick is to keep producers dumb, transport durable, and storage tier-appropriate.</p><p>The pipeline below has one rule baked into it: the application service should never be responsible for delivery guarantees beyond writing to its own disk. Everything else is somebody else’s job.</p><h3>The whole thing in one picture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VocL49kKxIxnbofmotjFJw.png" /></figure><h4>Step 1: write to disk and stop worrying</h4><p>The service does the simplest thing it can. It serializes each event to JSON and appends it to a file on local disk. No network call. No queue. No retry logic. If the rest of the pipeline is on fire, the service neither knows nor cares. As long as the disk has space, the service is healthy.</p><p>This is more important than it sounds. Lots of teams reach for an in-process agent that ships events directly over the network to Kafka or some logging API. The moment you do that, your application’s hot path depends on the availability of something that lives in another data center. Disk is local, fast, and almost always working.</p><p>In Node.js, Pino is a good fit because it produces newline-delimited JSON and is fast enough that you don’t have to think about it.</p><pre>// logger.js<br>import pino from &#39;pino&#39;;<br>import { pid } from &#39;node:process&#39;;<br><br>const logger = pino(<br>  {<br>    base: { service: &#39;workspaces-api&#39;, pid },<br>    timestamp: pino.stdTimeFunctions.isoTime,<br>    formatters: {<br>      level: (label) =&gt; ({ level: label }),<br>    },<br>  },<br>  pino.destination({<br>    dest: &#39;/var/log/app/workspaces-api.log&#39;,<br>    sync: false,<br>  })<br>);<br><br>// Domain event. Note the `event` field.<br>// That single field is what makes the rest of the pipeline work.<br>export function trackWorkspaceCreated({ workspaceId, ownerId, plan }) {<br>  logger.info({<br>    event: &#39;workspace_created&#39;,<br>    workspaceId,<br>    ownerId,<br>    plan,<br>  });<br>}</pre><p>The contract with everything downstream is one field: event. If a record has it, it&#39;s a domain event and gets shipped to the warehouse. If it doesn&#39;t, it&#39;s an operational log and stays on disk (or goes to your usual logging stack). Operational logs and product events can live in the same file, but only one kind makes it into Redshift. This convention is what lets the next stage be picky instead of greedy.</p><h3>Step 2: Fluent Bit does the dirty work</h3><p>Fluent Bit runs as a sidecar, or as a node-level daemon, depending on how you deploy. It tails the log files the service produces. Its job is to read newline JSON, decide which records to keep, add some metadata, and push them to S3.</p><p>Why Fluent Bit? It’s written in C, has a small memory footprint, and ships with a disk-backed buffer that survives crashes. If S3 is unreachable for an hour, Fluent Bit holds records on disk and flushes them when connectivity comes back. You don’t have to write any of that yourself.</p><p>Here’s a config that does the whole job:</p><pre># fluent-bit.conf<br>[SERVICE]<br>    Flush         5<br>    Daemon        Off<br>    Log_Level     info<br>    storage.path  /var/lib/fluent-bit/buffer<br>    storage.sync  normal<br><br>[INPUT]<br>    Name              tail<br>    Path              /var/log/app/*.log<br>    Parser            json<br>    Tag               app.*<br>    DB                /var/lib/fluent-bit/tail.db<br>    Refresh_Interval  5<br>    Skip_Long_Lines   On<br><br># Drop anything that isn&#39;t a domain event.<br># `event` field present =&gt; ship. Missing =&gt; discard.<br>[FILTER]<br>    Name      grep<br>    Match     app.*<br>    Regex     event ^[a-z][a-z0-9_]+$<br><br># Stamp source metadata so we can slice on it later.<br>[FILTER]<br>    Name        record_modifier<br>    Match       app.*<br>    Record      env       ${ENVIRONMENT}<br>    Record      region    ${AWS_REGION}<br>    Record      host      ${HOSTNAME}<br><br>[OUTPUT]<br>    Name                         s3<br>    Match                        app.*<br>    bucket                       my-events-prod<br>    region                       us-east-1<br>    s3_key_format                /events/dt=%Y-%m-%d/hr=%H/$TAG/%Y%m%dT%H%M%S-$UUID.json.gz<br>    use_put_object               Off<br>    upload_chunk_size            8M<br>    total_file_size              128M<br>    upload_timeout               5m<br>    compression                  gzip<br>    json_date_key                ts<br>    json_date_format             iso8601<br>    storage.total_limit_size     5G</pre><p>Two things here matter more than the rest. The grep filter is the event-name gate: anything without a well-formed event field gets dropped before it costs a byte downstream. And the S3 key format embeds date and hour partitions, which matters the moment you want Redshift to load a specific window without scanning the entire bucket.</p><h3>Step 3: S3 is the seam</h3><p>Calling S3 “storage” undersells it. It’s the contract between the operational world and the analytical one. Fluent Bit writes immutable, partitioned objects on one side. Redshift reads those same prefixes on the other. Either side can crash, restart, or be redeployed without dragging the other down.</p><p>Three properties make this work. Objects are immutable, so reprocessing a time window is just pointing a job at a prefix. Storage is cheap, so you can keep months of raw events around without anyone in finance noticing. And lifecycle policies handle the long tail. Events older than 90 days move to colder storage, events older than a year go to the freezer, and the warehouse only pays for the slice it’s actively querying.</p><p>There’s a subtler benefit too. Once events live in S3, any number of consumers can read them. Athena for ad-hoc digging. Spark for big backfills. A feature store for ML. A compliance archive. None of those need to coordinate with the warehouse team. The bucket itself is the published API.</p><h3>Step 4: Redshift loads and serves</h3><p>Redshift pulls in the partitioned objects with a COPY command, usually scheduled hourly by an orchestrator like Airflow or dbt Cloud. COPY reads compressed JSON, applies a JSONPaths spec to flatten records into typed columns, and appends to a wide events table partitioned by date.</p><pre>COPY events.raw<br>FROM &#39;s3://my-events-prod/events/dt=2026-05-06/hr=14/&#39;<br>IAM_ROLE &#39;arn:aws:iam::123456789012:role/redshift-copy&#39;<br>FORMAT AS JSON &#39;s3://my-events-prod/jsonpaths/events.json&#39;<br>GZIP<br>TIMEFORMAT &#39;auto&#39;<br>COMPUPDATE OFF<br>STATUPDATE OFF;</pre><p>Once loaded, the raw table gets projected into per-event-name views. Each view exposes only the columns that event actually populates. dbt or a similar transformation layer keeps those views in sync with the underlying schema.</p><h3>Step 5: Redash closes the loop</h3><p>Redash is what engineers and PMs actually touch. It connects to Redshift, lets people write SQL against the views, and pins the result to a dashboard. Why Redash and not something fancier? Because the schema is stable and the cardinality is bounded. When every record has a known event field and a known set of typed columns, SQL is enough. The hard analytical questions become five-line queries.</p><h3>What it costs</h3><p>This pipeline trades a few minutes of latency for a lot of operational calm. End to end, an event lands in Redshift in single-digit minutes. Fast enough for product analytics. Slow enough that nothing has to be tuned for sub-second guarantees.</p><p>The price is real but small. You operate a sidecar per host. You maintain a JSONPaths spec next to your event schema, which means schema changes need a small amount of coordination between application teams and the data platform team. And there’s a temptation, once the pipeline is humming, to push every interesting signal through it. The warehouse bill becomes a function of how disciplined your event taxonomy is.</p><p>That last point is the real lesson hiding in the architecture. The pipeline isn’t what makes any of this work. The contract does. A single field, event, named consistently across hundreds of services, is what turns a firehose of log lines into a queryable record of what your product is doing. Every component in the diagram is replaceable. Pino can become Winston. Fluent Bit can become Vector. Redshift can become BigQuery or Snowflake. Redash can become Metabase or Looker. The contract cannot.</p><p>The pipeline is the easy part. The hard part is keeping the contract honest as your team grows.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1ece4dcd0ac" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/how-to-collect-server-events-across-hundreds-of-microservices-b1ece4dcd0ac">How to Collect Server Events Across Hundreds of Microservices</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best privacy-focused browser video call apps]]></title>
            <link>https://medium.com/@dmitrydoronin/best-privacy-focused-browser-video-call-apps-4992cd912cea?source=rss-be7db7c2c1c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/4992cd912cea</guid>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[webrtc]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[video-conferencing]]></category>
            <dc:creator><![CDATA[Dima Doronin]]></dc:creator>
            <pubDate>Sat, 02 May 2026 20:15:04 GMT</pubDate>
            <atom:updated>2026-05-02T20:15:04.440Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7t_25BDKxDnSsfjZV8P_BQ.png" /></figure><p><em>A tour of what “private” actually means for browser video calls and a peek under the hood of one of them.</em></p><p>There’s a particular kind of friction that hits at the worst possible moment. You want to call your family in a different country, or jump on a quick interview, or talk to a freelancer in another timezone, and instead you spend the first five minutes nudging the other person through an account creation flow, an app install, and a permissions dialog. By the time the camera turns on, half the call is already over.</p><p>Which is fine, until you start asking the second question: <em>where exactly is this video going?</em> Most mainstream tools route media through their own servers, terminate encryption there, and tie every call to an account. That’s a tradeoff some teams need to make. It’s not the only tradeoff available.</p><p>This post is a short field guide to privacy-focused browser video call apps, the ones that lean on the open standard built into your browser, WebRTC, instead of locking you into an account and a binary. Then we’ll go one level deeper and look at how a small one called <a href="https://just-call.app/">JustCall</a> actually wires up a peer-to-peer call, with enough technical detail to be useful and not so much that it stops being readable.</p><h3>What “privacy-focused” should mean in 2026</h3><p>The phrase gets sprinkled on a lot of landing pages, so it’s worth pinning down what’s actually load-bearing.</p><p>A genuinely privacy-focused browser video call app generally has most of these properties: it runs in the browser without a forced app install; it doesn’t require an account to start or join a call; it uses WebRTC’s built-in DTLS-SRTP encryption for media; it prefers a direct peer-to-peer route between participants instead of always tunnelling through a media server; and when a relay server is necessary, it relays opaque encrypted bytes rather than decrypting and re-encoding your video.</p><p>The browser part isn’t a stylistic choice. A native app is a black box you have to trust; a browser-based app inherits the browser’s sandbox, its permission prompts, and a stack of standards you can inspect. That’s a meaningful security boundary, especially when you’re calling someone who isn’t a regular user of “your” tool.</p><p>A few apps in this space worth knowing by name:</p><ul><li><strong>Jitsi Meet</strong>, the long-standing open-source option that you can self-host;</li><li><strong>Brave Talk</strong>, built on Jitsi and integrated into the Brave browser;</li><li><strong>Tox</strong> clients like qTox for the more paranoid;</li><li>and the one I’ll spend the rest of this post on, <a href="https://just-call.app/"><strong>JustCall</strong></a>, which is small, link-based, and free.</li></ul><p>The interesting differences between these tools aren’t really about features. They’re about what happens to your media in the few seconds after you click the green button.</p><h3>A short detour: how a peer-to-peer browser call actually works</h3><p>Before getting into JustCall specifically, here’s the rough shape of a WebRTC call. Skip ahead a section if you already write RTCPeerConnection for fun.</p><p>Two browsers want to send video and audio to each other. They each have a camera, a microphone, and a list of network interfaces. Neither of them knows the other’s IP address yet, and at least one of them is probably hiding behind a NAT or a corporate firewall. WebRTC solves this with three moving parts:</p><ol><li>A <strong>signaling server</strong> — a small piece of infrastructure whose only job is to relay setup messages (offer, answer, and a stream of ICE candidates) between the two browsers. It doesn’t see your media. JustCall, for example, uses a plain WebSocket for this.</li><li><strong>STUN servers</strong>, which a browser can ping to discover its own public IP and port from the outside world’s perspective. The candidates produced this way are how two NATs can introduce themselves.</li><li><strong>TURN servers</strong>, which are the fallback when STUN isn’t enough. If both peers are behind symmetric NATs or restrictive firewalls, the only way to get bytes through is to bounce them off a relay. TURN does that — but, critically, the encrypted DTLS-SRTP layer is end-to-end, so the relay just sees ciphertext.</li></ol><p>Once the two peers exchange enough SDP and ICE candidates, they pick the best path they can find and start streaming. Direct peer-to-peer if possible, relayed if necessary. Either way, the signaling server has long since left the conversation.</p><h3>How JustCall wires this up</h3><p>The core of JustCall’s call session is a single RTCPeerConnection per browser tab, configured roughly like this:</p><pre>const pc = new RTCPeerConnection({<br>  iceServers<br>});</pre><p>Three small details in there matter more than they look.</p><p>The iceServers array is built from a handful of public STUN servers (Google, Cloudflare, Twilio) plus an optional TURN server, configurable per deployment. STUN-only configurations are essentially free; TURN costs bandwidth, which is why most &quot;free, no signup&quot; tools quietly avoid it. JustCall keeps it as an opt-in.</p><p>The iceTransportPolicy: &quot;relay&quot; flag is a knob you don&#39;t see in many consumer apps. By default it&#39;s off, which lets ICE pick the fastest path it can find , usually a direct route. When you flip on VITE_FORCE_TURN, the peer connection refuses everything except relayed candidates. That&#39;s slower, but on a hostile corporate network it&#39;s often the only thing that connects at all. The point is that the choice is exposed, not hidden.</p><p>The signaling layer is, by design, almost embarrassingly simple. There’s a WebSocket per tab that sends and receives JSON like { type: &quot;offer&quot;, roomId, sdp } and { type: &quot;ice-candidate&quot;, roomId, candidate }. The server&#39;s job is to forward these between the two participants in a room. It never touches your video frames.</p><p>Once the connection is up, JustCall does something a lot of tools don’t bother with: it opens two RTCDataChannels alongside the media tracks. One is labeled control and carries small JSON messages (mute state, view changes, that sort of thing). The other is labeled file and carries chat messages and binary file transfers. Because they ride on the same RTCPeerConnection, they get the same DTLS-SRTP encryption and the same direct-peer routing. Your file transfer is as private as your video.</p><h3>The part most apps skip: surviving a flaky network</h3><p>International calls die from a thousand paper cuts. A train enters a tunnel, a flight attendant changes seats, a corporate VPN reconnects. WebRTC has a clean answer for this called ICE restart, and it’s worth knowing whether your tool of choice actually uses it.</p><p>JustCall does. When the underlying connection state flips to disconnected, a timer starts. If things don&#39;t recover in 8 seconds, the initiator builds a new offer with iceRestart: true, ships it over the same signaling channel, and the two peers renegotiate their network paths without tearing down the call. It&#39;s allowed two attempts before it gives up and tells you the connection is lost. Most of the time the second attempt is enough; the underlying media tracks survive, and you don&#39;t notice anything beyond a brief stutter.</p><h3>What you give up</h3><p>A privacy-focused, peer-to-peer architecture is not a free lunch. The honest tradeoffs are worth naming.</p><p>Calls of this kind don’t scale gracefully past a handful of participants, a fully meshed P2P call asks each browser to encode the same video stream once per other participant, and your laptop fan will have opinions. That’s why large meeting tools use SFUs (Selective Forwarding Units) that decrypt-and-re-encode in the middle. JustCall and the other tools in this category lean toward 1:1 use cases on purpose.</p><p>Server-side recording isn’t really a thing without breaking the encryption model. If you need a meeting transcript, this isn’t the tool. And if you need any kind of host-controlled “waiting room” experience, the no-account model fights you on that.</p><p>Finally, “no account” cuts both ways. Nothing remembers you, which means nothing can leak you. It also means you don’t have a contact list, a meeting history, or any of the small comforts that come with persistent identity.</p><h3>Picking one</h3><p>If you want a self-hostable, feature-rich, open-source pick: Jitsi Meet. If you live inside a privacy-leaning browser and want the smallest possible mental shift: Brave Talk. If you mostly need to send a link to one person and have a clean call show up on the other end with no friction and no account: <a href="https://just-call.app/">JustCall</a>.</p><p>The deeper point isn’t about which logo you click. It’s that the browser already ships an entire end-to-end-encrypted real-time stack, for free, with a sane permissions model. Tools that build <em>on</em> it instead of <em>around</em> it tend to feel lighter and reveal less of you to the network in the process. That used to be a niche preference. In 2026, it’s starting to look like the default.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4992cd912cea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Turned a React WebRTC App Into an SEO-Friendly Website]]></title>
            <link>https://medium.com/@dmitrydoronin/how-i-turned-a-react-webrtc-app-into-an-seo-friendly-website-5528330102ae?source=rss-be7db7c2c1c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/5528330102ae</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[webrtc]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[seo]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Dima Doronin]]></dc:creator>
            <pubDate>Tue, 28 Apr 2026 21:06:56 GMT</pubDate>
            <atom:updated>2026-04-28T21:06:56.104Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qG9Mll8iK0o2npEJQIhkLQ.png" /></figure><p>When I started building <a href="https://just-call.app/">JustCall</a>, I made a product decision that was great for users and awkward for SEO.</p><p>The whole point of the app is that it feels instant. You open the site, create a call link, send it to someone and start talking.</p><blockquote><a href="https://just-call.app/blog/video-call-without-login">No login. No download. No “set up your meeting” ceremony.</a></blockquote><p>That kind of experience pushes you toward a browser-first React architecture, which is fine until you remember that fast client apps tend to ship an SEO story that’s incomplete, fragile, or held together by hand.</p><p>I really did not want JustCall to become one of those projects where the marketing pages, metadata, sitemap files, and localized routes all quietly drift apart over six months. So instead of bolting SEO on top of the app, I moved it into the same system that already defines the public routes.</p><p>This is a write-up of the choices I made, why I made them, and which ones turned out to matter most.</p><h3>A browser app still needs crawlable pages</h3><p>JustCall is not a content site cosplaying as a product. It’s a real-time <a href="https://just-call.app/blog/video-call-without-app">browser app</a> built around WebRTC. But search engines don’t grade you on the elegance of your runtime if your public pages all look like a generic shell, you lose.</p><p>For SEO to actually work, I needed each public route to ship with real HTML, route-specific titles and descriptions, stable canonical URLs, Open Graph and Twitter metadata, structured data, sitemaps that reflect the real public surface, and multilingual discoverability that wouldn’t trigger duplicate-content confusion.</p><p>That list immediately rules out the simplest possible SPA setup. So I went looking for the smallest amount of architecture that would make the rest fall into place.</p><h3>1. Build-time prerendering instead of a client-only shell</h3><p>The first decision was to render every public route as real HTML during the build.</p><p>The build script does five things in sequence: typecheck, generate sitemap files, build the client bundle, build the SSR bundle, and prerender each public route into its own HTML file. That sequence lives directly in the build pipeline, which means SEO is part of the normal deploy, not a side process I have to remember to run.</p><p>The SSR entry exports three things that matter here: a render function for route HTML, a page metadata resolver, and a structured data generator. During prerendering, the script renders each route, injects the HTML into the root element, then replaces the title, meta description, keywords, Open Graph tags, Twitter tags, canonical link, and JSON-LD before writing the final file to dist.</p><p>The property I was after is simple: if a route exists publicly, it ships as a real document with the correct head tags already in place.</p><p>That also killed off a recurring source of ambiguity. I no longer have to wonder whether the metadata is only correct <em>after</em> hydration. The client still updates metadata during navigation, but the initial HTML already carries the SEO payload.</p><h3>2. One catalog instead of scattered metadata</h3><p>The biggest architectural improvement wasn’t prerendering by itself. It was choosing a single source of truth for public page metadata.</p><p>I built a catalog that defines the public surface of the site. Each entry has a path, a label, a description, lastmod, changefreq, priority, and the SEO metadata — title, description, keywords, canonical URL, Open Graph fields, Twitter fields.</p><p>That did two things at once.</p><p>It made route metadata explicit instead of hiding it across components, conditionals, and one-off files. And it let the same source feed multiple systems: prerender route selection, page metadata lookup, sitemap generation, and the blog index.</p><p>That alignment matters more than people give it credit for. Most SEO regressions on small product sites aren’t caused by a missing meta description. They’re caused by drift. A route gets added in one place, renamed in another, localized somewhere else, and forgotten in the sitemap. By centralizing the catalog, I cut down the number of places where SEO state can go stale.</p><h3>3. The same metadata works in prerendered HTML and during client navigation</h3><p>Once the catalog existed, the next problem was consistency. Route metadata had to behave correctly both on the initial request , when a prerendered HTML document is served, and during client-side navigation, after React takes over.</p><p>The base HTML template includes data-page-meta markers for the fields I want to control. The prerender step replaces those values at build time, and the client updates the exact same elements later, after navigation.</p><p>That gave me a clean split of responsibilities. The HTML template defines the metadata slots. The prerender step fills them for the first page load. The client metadata hook keeps them correct after hydration.</p><p>I like this pattern because it avoids two bad extremes: making the SEO story depend entirely on JavaScript runtime behavior, or duplicating metadata logic into separate SSR-only and client-only systems. Both paths now share the same route metadata lookup.</p><h3>4. Canonical URLs as a routing problem, not a content-editing problem</h3><p>Canonical handling gets messy fast once multilingual routes show up.</p><p>In JustCall, the English blog path is canonical at the root-style route, for example, /blog/video-call-link. Localized versions live under locale prefixes: /de/blog/video-call-link, /fr/blog/video-call-link, /ja/blog/video-call-link, and so on.</p><p>The route metadata layer resolves the locale prefix, maps the request back to the canonical shape, and then produces localized canonical and Open Graph URLs where appropriate for blog pages. That’s a small implementation detail with a large practical payoff: canonical logic is attached to route resolution, not repeated across content files.</p><p>It also keeps the multilingual setup honest. If a locale-prefixed blog page exists, its metadata can be generated systematically rather than assembled ad hoc.</p><h3>5. Multilingual sitemaps built around the actual route tree</h3><p>The multilingual work was the part where the architecture started feeling worth it.</p><p>JustCall currently supports English plus nine non-default locales for the blog. Instead of maintaining one giant sitemap or curating locale pages by hand, the generator produces a sitemap index, a pages sitemap for non-blog public pages, one blog sitemap for English, one blog sitemap per localized language, and a recent.xml for newly updated pages.</p><p>The detail that makes this work is that localized blog paths aren’t hardcoded into a spreadsheet somewhere. The build scripts inspect the blog component structure, detect which locale files actually exist, and expand the route set from there.</p><p>So if a localized article exists in the codebase, it gets included. If it doesn’t exist yet, it doesn’t get advertised prematurely.</p><p>I also generate hreflang alternate links for blog entries directly inside the sitemap XML. Each localized cluster lists all sibling language versions plus x-default, which gives search engines a clear map of which pages represent the same content family across languages.</p><p>The recent.xml is a smaller thing I&#39;m fond of. It collects pages updated recently based on lastmod values and file timestamps. It&#39;s not a replacement for the main sitemap structure, but it&#39;s a useful freshness signal and trivial to keep going once the rest of the pipeline exists.</p><h3>6. Robots and sitemap discovery, kept boring on purpose</h3><p>Some SEO wins come from sophistication. Others come from refusing to be clever.</p><p>The robots.txt for JustCall does one important thing cleanly: it points crawlers to the canonical sitemap index on the correct production domain. That sounds trivial, but it matters. If the sitemap host and the canonical domain ever drift apart, everything downstream becomes harder to trust. I would rather have a boring robots file that&#39;s consistently correct than an over-engineered one that creates ambiguity.</p><h3>7. Structured data tied to route type, not a single global schema</h3><p>Structured data is another area where small projects tend to stop too early.</p><p>Dropping one Organization schema block site-wide is better than nothing, but it skips the chance to describe page intent more precisely. For JustCall, I generate Organization schema for the site identity, CollectionPage for collection-like routes (blog index, sitemap page), BlogPosting for article routes, and WebPage for standard pages.</p><p>The schema type is chosen from the resolved canonical route, serialized into JSON-LD, and inserted into the document head during prerendering.</p><p>Two things fall out of this. The structured data stays consistent with the route metadata and canonical URL system, and it scales naturally as the public content surface grows. I don’t have to remember which schema block belongs on which page.</p><h3>8. Internationalization affects the document, not just the UI strings</h3><p>A multilingual SEO setup is incomplete if localization only swaps visible copy.</p><p>In the JustCall i18n provider, the app updates the document language and text direction based on the active locale. Arabic flips the page to RTL. Other locales stay LTR.</p><p>Part of that is accessibility and usability, but it also fits the broader principle behind this whole effort: the public document should reflect the actual route and language context, not just the hydrated React view.</p><h3>The real win was reducing SEO drift</h3><p>If I had to compress the most important optimization into a single sentence, it would be this: I stopped maintaining SEO as a set of parallel manual systems.</p><p>The pieces now reinforce each other. The public page catalog defines the route surface. Route metadata resolves canonicals and social URLs. The prerender pipeline writes route-specific HTML. Sitemap generation expands the same route model into XML outputs. Structured data follows the same canonical logic.</p><p>The result is that adding or updating a public page is much less likely to create hidden SEO debt. For a small product team, that’s the kind of optimization that compounds. It doesn’t just improve one page — it makes the entire surface easier to keep correct over time.</p><h3>What I’m not claiming</h3><p>This work proves that JustCall now has a coherent technical SEO foundation. It doesn’t, on its own, prove ranking outcomes.</p><p>I’m deliberately not claiming traffic growth, ranking improvements, Core Web Vitals wins, backlink effects, or Search Console results. Those are all worth measuring, but they’re a separate story from the architecture. I’d rather keep the engineering side precise than dress it up with numbers I’m not actually showing.</p><h3>What I’d tell other builders</h3><p>If you’re building a product site on top of a React app, three things are worth keeping in mind.</p><ul><li>Make public route metadata a first-class part of the codebase. If titles, canonicals, and sitemap data live in unrelated places, they will drift — not maybe, will.</li><li>Prerender any route that’s meant to rank for a specific intent. Even if the app is heavily client-driven after load, the first HTML document should already describe the page correctly.</li><li>And let international SEO derive from the actual route tree and localized content files. Manual locale bookkeeping does not scale.</li></ul><p>For JustCall, those choices turned SEO from an afterthought into infrastructure. That was the real optimization.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5528330102ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>