<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: arun rajkumar</title>
    <description>The latest articles on DEV Community by arun rajkumar (@mickyarun).</description>
    <link>https://dev.to/mickyarun</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3835684%2F4771b603-8faa-42b1-9e0e-0687faea63a3.jpg</url>
      <title>DEV Community: arun rajkumar</title>
      <link>https://dev.to/mickyarun</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mickyarun"/>
    <language>en</language>
    <item>
      <title>We Built an Open-Source Coding Exam Platform Because Every Vendor Let Us Down</title>
      <dc:creator>arun rajkumar</dc:creator>
      <pubDate>Sat, 11 Apr 2026 01:05:35 +0000</pubDate>
      <link>https://dev.to/mickyarun/we-built-an-open-source-coding-exam-platform-because-every-vendor-let-us-down-a7m</link>
      <guid>https://dev.to/mickyarun/we-built-an-open-source-coding-exam-platform-because-every-vendor-let-us-down-a7m</guid>
      <description>&lt;p&gt;Every year, our team visits engineering colleges across India to hire freshers. The first round is always an online coding test — 300+ students, one shot at finding the ones who can actually think.&lt;/p&gt;

&lt;p&gt;We tried Coderbyte. Fifty concurrent user limit. So we'd split students into batches, stagger timings, juggle schedules between college coordinators and our engineers.&lt;/p&gt;

&lt;p&gt;We tried HackerRank's community edition. Different tool, different headache.&lt;/p&gt;

&lt;p&gt;Every vendor had a ceiling — concurrency limits, inflexible problem formats, generic DSA questions that tested memorization over problem-solving. And the pricing? Designed for companies ten times our size.&lt;/p&gt;

&lt;p&gt;I was ranting about this to my engineering team. Out loud. In our standup. Trying to find yet another vendor to evaluate.&lt;/p&gt;

&lt;p&gt;My engineers — most of them freshers themselves just a couple years ago — went quiet. Said nothing for a few days.&lt;/p&gt;

&lt;p&gt;Then they shipped a product. Two engineers. One weekend. AI-assisted development. And two days of intensive testing before it went live.&lt;/p&gt;




&lt;h2&gt;
  
  
  What They Built
&lt;/h2&gt;

&lt;p&gt;A full-stack, self-hosted coding exam platform. Not a toy. Not a prototype. A production system we ran 300+ students through this hiring season.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiyvl3yshlh9suzimdvts.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiyvl3yshlh9suzimdvts.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn6qwhxaxfkjr2k7gup70.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn6qwhxaxfkjr2k7gup70.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's what's under the hood:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monaco Editor&lt;/strong&gt; — the same engine that powers VS Code. Syntax highlighting, autocomplete, multi-language support. Students write real code, not paste answers into a textarea.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Judge0 Sandboxed Execution&lt;/strong&gt; — every submission runs inside a sandboxed Judge0 instance. Test cases execute in parallel with automatic batching. Students get instant, per-test-case verdicts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ICPC-Style Scoring&lt;/strong&gt; — not just pass/fail. Penalty points for wrong attempts. Time-based ranking. Race-condition-safe writes to the database. The leaderboard feels like a competitive programming contest, not a homework checker.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live Leaderboard&lt;/strong&gt; — backed by a PostgreSQL materialized view that refreshes after every accepted submission. O(1) rank queries. Students watch themselves climb in real-time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;API-Based Challenges&lt;/strong&gt; — beyond traditional stdin/stdout problems, we built support for API-format challenges where students interact with real endpoints. This lets us test how candidates think about integration, not just algorithms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Server-Synced Timer&lt;/strong&gt; — the countdown runs on server time, not the client clock. No inspect-element tricks. Configurable start/end windows with server-enforced access guards.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Autosave&lt;/strong&gt; — code drafts are debounce-saved to the server every few seconds. Browser crash? Tab closed? The student picks up right where they left off.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;White-Label Ready&lt;/strong&gt; — app name, logo, brand colors, copyright — all configurable via environment variables. Zero code changes. We use it as our own branded platform; anyone can make it theirs.&lt;/p&gt;




&lt;h2&gt;
  
  
  Architecture at a Glance
&lt;/h2&gt;

&lt;p&gt;The platform is a monorepo with two core applications:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;client/   → Vue 3 SPA (student exam UI + admin panel)
server/   → NestJS REST API (auth, exam logic, code execution, scoring)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In production, the server compiles and serves the client's static build directly — no separate web server or CDN needed.&lt;/p&gt;

&lt;p&gt;The submission flow works like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Student writes code in the Monaco editor and hits Submit&lt;/li&gt;
&lt;li&gt;The Vue client POSTs to the API with the code and language&lt;/li&gt;
&lt;li&gt;The SubmissionsService fetches all test cases and sends batch requests to Judge0, automatically chunking to stay within limits&lt;/li&gt;
&lt;li&gt;The server polls Judge0 tokens until all results resolve&lt;/li&gt;
&lt;li&gt;The ScoringService applies the ICPC penalty formula and updates the score using a pessimistic database lock&lt;/li&gt;
&lt;li&gt;The LeaderboardService refreshes the materialized view&lt;/li&gt;
&lt;li&gt;Results return to the client with per-test-case verdicts and an updated leaderboard&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All of this happens in seconds, even under load.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Tech Stack
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Frontend:&lt;/strong&gt; Vue 3 (Composition API), Vite 8, TypeScript 5.9, Pinia 3 for state, Monaco Editor 0.55, Brotli compression&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backend:&lt;/strong&gt; NestJS 11, TypeScript 5.7, TypeORM 0.3, Passport JWT, Swagger/OpenAPI docs, rate limiting via @nestjs/throttler&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Database:&lt;/strong&gt; PostgreSQL 17 for the application, PostgreSQL 16 + Redis 7.2 for Judge0's internal queue&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Infrastructure:&lt;/strong&gt; Docker Compose orchestrates six services — app, app-db, judge0-server, judge0-worker, judge0-db, and judge0-redis. Multi-stage Dockerfile produces a minimal Node 22-alpine image running as a non-root user.&lt;/p&gt;




&lt;h2&gt;
  
  
  Features That Matter
&lt;/h2&gt;

&lt;p&gt;Here's what we built because we needed it, not because a product manager spec'd it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multiple concurrent exams&lt;/strong&gt; — run several exams at once; students pick which to enter&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mixed formats&lt;/strong&gt; — MCQs alongside coding problems in the same exam&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Admin panel&lt;/strong&gt; — create exams, duplicate them, manage problems with visible/hidden test cases, configure weights&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safe Exam Browser detection&lt;/strong&gt; — a composable detects whether students are in a locked-down browser&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built-in API docs&lt;/strong&gt; — interactive API reference baked right into the student UI for API-format challenges&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;QA role opt-in&lt;/strong&gt; — students can flag interest in QA engineering during registration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run mode&lt;/strong&gt; — execute code against sample inputs without scoring; lets students experiment before committing&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why Open Source?
&lt;/h2&gt;

&lt;p&gt;We're a fintech startup. Thirty-odd people. We didn't build this to sell it.&lt;/p&gt;

&lt;p&gt;We built it because we were tired of bending our hiring process around someone else's product limitations. And once we had it, we realized every small company visiting colleges faces the exact same problem.&lt;/p&gt;

&lt;p&gt;Here's the thing that makes this story worth telling: two engineers built this in a weekend, with AI doing the heavy lifting on scaffolding, boilerplate, and iteration. Then two days of intensive testing to harden it for production. That's the power of AI-assisted development — it doesn't replace engineers, it turns two of them into ten.&lt;/p&gt;

&lt;p&gt;In the AI era, expensive hiring software shouldn't be a gate that keeps small teams from finding great talent. If two engineers with AI tools can build a platform that handles 300+ concurrent students with ICPC scoring and sandboxed execution in a weekend, there's no reason that capability should be locked behind enterprise pricing.&lt;/p&gt;

&lt;p&gt;The whole thing is AGPL-3.0 licensed. Fork it, brand it, run it on your own infrastructure — just keep your modifications open too.&lt;/p&gt;




&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;The fastest path is Docker Compose:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cp&lt;/span&gt; .env.example .env
&lt;span class="c"&gt;# Set DB_PASSWORD, JWT_SECRET, ADMIN_SETUP_KEY&lt;/span&gt;
docker compose up &lt;span class="nt"&gt;--build&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Six services start in dependency order. The app waits for the database health check, runs migrations automatically, and you're live.&lt;/p&gt;

&lt;p&gt;For local development without Docker, you'll need PostgreSQL 17 and a Judge0 instance. The README walks through every step — database creation, migrations, environment variables, and running the frontend and backend separately.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;We're cleaning up a few things before the public launch:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Finishing the test suite (Jest is installed and configured, specs are being added)&lt;/li&gt;
&lt;li&gt;Polishing the contributor docs&lt;/li&gt;
&lt;li&gt;Adding a demo mode so people can try it without setting up Judge0&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're interested, &lt;strong&gt;follow me here&lt;/strong&gt; — I'll drop the GitHub link as soon as the repo goes public.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Bigger Lesson
&lt;/h2&gt;

&lt;p&gt;I went looking for a vendor. My team handed me a product.&lt;/p&gt;

&lt;p&gt;Two engineers. One weekend of building. Two days of intensive testing. Powered by AI-assisted development. A platform that replaced two commercial tools and produced measurably better candidate quality in round two.&lt;/p&gt;

&lt;p&gt;That's what happens when you hire people for intent over resumes — and then get out of their way.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built with Vue 3, NestJS, PostgreSQL, Judge0, and a healthy disregard for vendor lock-in.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Star the repo when it drops. Or better yet — fork it and run your own hiring season on it.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>hiring</category>
      <category>webdev</category>
      <category>ai</category>
    </item>
    <item>
      <title>Open Banking Was Built for the Wrong Future — and That's Why It's Perfect for AI Agents</title>
      <dc:creator>arun rajkumar</dc:creator>
      <pubDate>Tue, 07 Apr 2026 19:35:42 +0000</pubDate>
      <link>https://dev.to/mickyarun/open-banking-was-built-for-the-wrong-future-and-thats-why-its-perfect-for-ai-agents-4oha</link>
      <guid>https://dev.to/mickyarun/open-banking-was-built-for-the-wrong-future-and-thats-why-its-perfect-for-ai-agents-4oha</guid>
      <description>&lt;p&gt;Visa announced infrastructure for AI agents to make payments without asking you first.&lt;/p&gt;

&lt;p&gt;GoCardless shipped an MCP server in February so developers can talk to their payment platform in natural language.&lt;/p&gt;

&lt;p&gt;I build open banking payment infrastructure for the UK. I've been watching both of these announcements very closely.&lt;/p&gt;

&lt;p&gt;And I have a counterintuitive take: &lt;strong&gt;the payment rail everyone called "too complicated for normal users" might be the only one that actually works for AI agents.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem With Cards and AI Agents
&lt;/h2&gt;

&lt;p&gt;When an AI agent needs to make a payment on your behalf, the obvious infrastructure is what already exists. Cards. Stored credentials. The same rails your Netflix subscription uses.&lt;/p&gt;

&lt;p&gt;Here's the problem.&lt;/p&gt;

&lt;p&gt;Card authorisation is broad. When you give Stripe a card token, you're essentially giving that token permission to charge whatever you've authorised — subject to 3DS, fraud rules, and limits. But the authorisation scope isn't bound to a specific action.&lt;/p&gt;

&lt;p&gt;For an AI agent, that's dangerous.&lt;/p&gt;

&lt;p&gt;You want an agent to book a flight. It has your card token. Nothing technically stops it from booking the wrong flight, adding seat upgrades you didn't ask for, or — if the prompt is maliciously crafted — doing something you absolutely didn't intend.&lt;/p&gt;

&lt;p&gt;Visa understands this. Their Trusted Agent Protocol exists precisely to solve it: a way for merchants to verify that an agent is legitimate and acting within its authorised scope. It's clever engineering. But it's being bolted onto rails that weren't designed for it.&lt;/p&gt;

&lt;p&gt;Open banking wasn't designed for AI agents either. But its constraints happen to be exactly the right shape.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Open Banking Consent Actually Looks Like
&lt;/h2&gt;

&lt;p&gt;When a customer pays via open banking — the way Atoa processes payments — here's what actually happens under the hood:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Merchant creates a payment consent object
   → amount: £49.99
   → merchant: Atoa test merchant
   → purpose: "Coffee subscription - April"

2. Customer is redirected to their bank
   → Bank shows: "Atoa wants to take £49.99 from your account"
   → Customer approves or declines
   → Bank issues a single-use authorisation code

3. Atoa exchanges the code for the payment
   → One payment. Specific amount. Specific purpose.
   → The authorisation is consumed. It cannot be reused.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every payment is its own consent event. Every consent is scoped to a specific amount and purpose. You can't overcharge. You can't quietly add extras. You can't reuse the authorisation.&lt;/p&gt;

&lt;p&gt;For a human user, this is friction. That's why open banking adoption was slow. Nobody wants to log into their banking app every time they buy something.&lt;/p&gt;

&lt;p&gt;For an AI agent, this friction is a feature.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why the Consent Model Fits AI Agents
&lt;/h2&gt;

&lt;p&gt;Think about what you actually want when an AI agent makes a payment on your behalf.&lt;/p&gt;

&lt;p&gt;You want:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It to charge exactly the amount you authorised&lt;/li&gt;
&lt;li&gt;The scope to be limited to what you asked it to do&lt;/li&gt;
&lt;li&gt;The ability to revoke access without cancelling your card&lt;/li&gt;
&lt;li&gt;A clear audit trail showing what was authorised and when&lt;/li&gt;
&lt;li&gt;The payment to fail loudly if anything is out of scope — not silently proceed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Open banking gives you all of that by default.&lt;/p&gt;

&lt;p&gt;Cards give you none of it by default, and you have to engineer it in.&lt;/p&gt;

&lt;p&gt;The FCA even made it better recently. They removed the 90-day re-authentication requirement that was causing 20-40% customer drop-off for third-party payment providers. Persistent consent — once granted to an agent — can now remain valid without forcing a re-authentication loop.&lt;/p&gt;

&lt;p&gt;That's a massive unlock for agentic payment flows.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Real Engineering Challenge: Consent Lifecycle for Agents
&lt;/h2&gt;

&lt;p&gt;Here's where it gets genuinely hard.&lt;/p&gt;

&lt;p&gt;When a human completes an open banking payment, the flow is synchronous: they go to the bank, they approve, they come back. Done.&lt;/p&gt;

&lt;p&gt;When an AI agent initiates a payment, the flow might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User: "Book the Bangalore to London flight if the price drops below £600"

Agent: [Monitors prices for 3 days]
Agent: [Price hits £598 on a Wednesday morning]
Agent: [Attempts to initiate payment]
         → But the user's open banking consent was granted for a specific session
         → That session token expired 6 hours ago
         → Payment fails

Result: Agent missed the window. User wakes up to a "couldn't book your flight" message.
        Price is now £640.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Consent that's synchronous and session-bound doesn't work for agents that act asynchronously.&lt;/p&gt;

&lt;p&gt;This is the real engineering problem. Not "can AI agents make payments?" — they clearly can. But "what does the consent model look like for an agent that might act hours or days after the user gave permission?"&lt;/p&gt;

&lt;p&gt;There are a few approaches:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option 1: Pre-authorised payment mandates&lt;/strong&gt;&lt;br&gt;
Open banking supports Variable Recurring Payments (VRPs) — essentially mandates where the user sets a maximum amount and time window, and the payment provider can initiate within those bounds without re-authentication.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Conceptual structure of a VRP mandate for an agent&lt;/span&gt;
&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;AgentPaymentMandate&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;agentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;maxAmountPence&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;      &lt;span class="c1"&gt;// Agent cannot exceed this&lt;/span&gt;
  &lt;span class="nl"&gt;validUntil&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;           &lt;span class="c1"&gt;// Time-bounded consent&lt;/span&gt;
  &lt;span class="nl"&gt;allowedMerchants&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[];&lt;/span&gt; &lt;span class="c1"&gt;// Scope: only these merchants&lt;/span&gt;
  &lt;span class="nl"&gt;purpose&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;            &lt;span class="c1"&gt;// What this mandate is for&lt;/span&gt;
  &lt;span class="nl"&gt;requiresConfirmation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Some actions still need approval&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent operates within a pre-defined envelope. The user sets the boundaries once. The agent acts within them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option 2: Payment intent + human gate&lt;/strong&gt;&lt;br&gt;
Agent identifies a payment opportunity, creates a payment intent, notifies the user. User approves in one tap. Agent executes.&lt;/p&gt;

&lt;p&gt;This is the pattern we're building toward at Atoa — merchant describes what they need in natural language, agent proposes the payment, human approves in one tap, open banking rails execute it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// What an agent workflow might look like&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;intent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;paymentAgent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;proposePayment&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;merchant&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;flight-booking-service&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;59800&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// £598.00 in pence&lt;/span&gt;
  &lt;span class="na"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;BLR→LHR flight, price hit target of £600&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;expiresAt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="c1"&gt;// 30 min window&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// User gets notified: "Your agent wants to book your flight for £598. Approve?"&lt;/span&gt;
&lt;span class="c1"&gt;// One tap. Payment executes.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Option 3: Programmatic consent with audit trail&lt;/strong&gt;&lt;br&gt;
For fully autonomous agents — the Visa Intelligent Commerce model — the agent holds delegated credentials scoped to specific actions, with every payment logged against the authorisation that permitted it.&lt;/p&gt;

&lt;p&gt;We're not here yet in open banking. But the architecture exists to get there.&lt;/p&gt;




&lt;h2&gt;
  
  
  What We're Thinking About at Atoa
&lt;/h2&gt;

&lt;p&gt;We build open banking payment infrastructure. POS terminals, payment links, invoicing, online checkouts. Everything goes through bank payment rails.&lt;/p&gt;

&lt;p&gt;We're thinking about this differently to most — our payment surfaces each have different agent-readiness, and that's shaped how we're approaching the consent problem. When Visa announced Intelligent Commerce, our first question wasn't "can we compete with this?" It was: "which of our surfaces are ready right now, and which ones need the architecture to change?"&lt;/p&gt;

&lt;p&gt;Here's our honest assessment:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pay by Link — probably the most agent-ready thing we have.&lt;/strong&gt; An agent could generate a payment link, send it to a customer, and monitor completion. The consent event is triggered by the link recipient, not the agent. The agent just facilitates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Payment Pages — also strong.&lt;/strong&gt; A merchant's agent could build and publish a payment page with specific parameters. No card infrastructure needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;POS Terminal — hardest.&lt;/strong&gt; The consent flow requires physical presence for SCA. An agent isn't physically present. This one needs new thinking.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Invoicing — interesting.&lt;/strong&gt; An agent managing a merchant's books could issue invoices and track payment status. The open banking payment confirmation is machine-readable. This is real today.&lt;/p&gt;

&lt;p&gt;The shape of "agentic commerce" looks different for each surface. There's no one-size-fits-all answer.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Question Every Open Banking Developer Should Be Asking
&lt;/h2&gt;

&lt;p&gt;GoCardless shipping an MCP server tells you something important: &lt;strong&gt;payment infrastructure companies are now thinking about developers' AI workflows as a first-class use case.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not just "can humans use our API?" but "can an AI agent use our API safely?"&lt;/p&gt;

&lt;p&gt;That's a different design question. An API designed for humans assumes there's a human reading error messages, handling edge cases, making judgment calls. An API designed for agents needs those things to be machine-readable, scoped, and predictable.&lt;/p&gt;

&lt;p&gt;Open banking has a head start here. The consent model is explicit. The amounts are bounded. The authorisation chain is auditable. Every payment has a "why" attached to it.&lt;/p&gt;

&lt;p&gt;The engineers who figure out the consent lifecycle problem — how do you grant an agent payment permissions that are time-bounded, amount-bounded, and purpose-bounded, without requiring the human to be present at the moment of execution — will be building the infrastructure that the next decade of agentic commerce runs on.&lt;/p&gt;

&lt;p&gt;That's the problem I'm thinking about.&lt;/p&gt;

&lt;p&gt;What's your take — does the card world catch up to open banking here, or does the consent model give open banking a structural advantage in the agent era?&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Arun Rajkumar is CTO &amp;amp; Co-Founder of &lt;a href="https://paywithatoa.co.uk" rel="noopener noreferrer"&gt;Atoa&lt;/a&gt;, an FCA-authorised open banking payments platform in the UK. He writes about payments, fintech engineering, and building for the UK from India. &lt;a href="https://dev.to/mickyarun"&gt;@mickyarun&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>openbanking</category>
      <category>fintech</category>
    </item>
    <item>
      <title>How Open Banking APIs Actually Work — A Developer's Guide</title>
      <dc:creator>arun rajkumar</dc:creator>
      <pubDate>Wed, 01 Apr 2026 15:41:55 +0000</pubDate>
      <link>https://dev.to/mickyarun/how-open-banking-apis-actually-work-a-developers-guide-4mio</link>
      <guid>https://dev.to/mickyarun/how-open-banking-apis-actually-work-a-developers-guide-4mio</guid>
      <description>&lt;p&gt;You've integrated Stripe. You've wired up PayPal. You've copy-pasted card tokenisation code from Stack Overflow at 2am.&lt;/p&gt;

&lt;p&gt;But have you ever looked at what happens when a customer pays directly from their bank account — no card network, no Visa, no Mastercard — just a bank-to-bank transfer that settles in seconds?&lt;/p&gt;

&lt;p&gt;That's open banking. And if you're building for the UK market, you need to understand how it works under the hood. Not the marketing version. The API version.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Architecture in 30 Seconds
&lt;/h2&gt;

&lt;p&gt;Open banking in the UK follows a simple three-party model:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;ASPSP&lt;/strong&gt; (Account Servicing Payment Service Provider) — the customer's bank (Barclays, Monzo, Revolut, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TPP&lt;/strong&gt; (Third Party Provider) — that's you (or the payment platform you integrate with)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open Banking Directory&lt;/strong&gt; — the trust layer that verifies everyone is who they say they are&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When a customer initiates a payment, the flow looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Your App → TPP (e.g. Atoa) → Open Banking API → Customer's Bank → Auth (SCA) → Payment Executed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every connection is secured with mutual TLS certificates and OAuth 2.0. The Open Banking Directory acts as the certificate authority. If you're not in the directory, you don't get to play.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Payment Initiation Flow (PISP)
&lt;/h2&gt;

&lt;p&gt;Here's what actually happens when you trigger an open banking payment. I'll walk through it step by step because this is where most developers get confused.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Create a Payment Consent
&lt;/h3&gt;

&lt;p&gt;Before you can move money, you need consent. This isn't a form checkbox — it's a structured API request that tells the bank exactly what's about to happen.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;POST&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/open-banking/v&lt;/span&gt;&lt;span class="mf"&gt;3.1&lt;/span&gt;&lt;span class="err"&gt;/pisp/domestic-payment-consents&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Initiation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"InstructionIdentification"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ACME-PAY-001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"EndToEndIdentification"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"E2E-REF-12345"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"InstructedAmount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"49.99"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Currency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"GBP"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"CreditorAccount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"SchemeName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"UK.OBIE.SortCodeAccountNumber"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Identification"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"11223312345678"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ACME Coffee Ltd"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Risk"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"PaymentContextCode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"EcommerceGoods"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The bank returns a &lt;code&gt;ConsentId\&lt;/code&gt;. You'll need this for the next step.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Redirect for Strong Customer Authentication (SCA)
&lt;/h3&gt;

&lt;p&gt;This is the part that trips up developers coming from card-land. There's no "enter your card number" form. Instead, you redirect the customer to their bank's authentication page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET https://auth.bank.co.uk/authorize?
  response_type=code
  &amp;amp;client_id=your-tpp-client-id
  &amp;amp;redirect_uri=https://yourapp.com/callback
  &amp;amp;scope=payments
  &amp;amp;state=random-csrf-token
  &amp;amp;request=&amp;lt;signed-JWT-with-consent-id&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The customer logs into their bank. Approves the payment. Gets redirected back to your app with an authorization code. Standard OAuth 2.0 — nothing exotic.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Execute the Payment
&lt;/h3&gt;

&lt;p&gt;Exchange the auth code for an access token, then hit the payment execution endpoint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;POST&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/open-banking/v&lt;/span&gt;&lt;span class="mf"&gt;3.1&lt;/span&gt;&lt;span class="err"&gt;/pisp/domestic-payments&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;Authorization:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Bearer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;access-token&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"ConsentId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"58923"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Initiation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;same&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;consent&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;*/&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. The bank debits the customer. The money lands in the merchant's account. No interchange fee. No scheme fee. No acquirer. No gateway skimming a percentage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters (The Developer Economics)
&lt;/h2&gt;

&lt;p&gt;Here's the part I care about as a CTO running a payments company.&lt;/p&gt;

&lt;p&gt;Card payments involve four intermediaries, each taking a cut. Open banking has one: the payment initiation service. At Atoa, we charge roughly half what card processors do. That's not a marketing claim — it's structural. When you remove Visa and Mastercard from the equation, the cost drops.&lt;/p&gt;

&lt;p&gt;For developers, the integration is actually simpler than cards. No PCI-DSS compliance headaches. No storing card numbers. No dealing with 3D Secure failures. The bank handles all the authentication.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Even Simpler Path: Using a Payment API
&lt;/h2&gt;

&lt;p&gt;Now, you &lt;em&gt;could&lt;/em&gt; register as a PISP with the FCA, get your certificates, integrate with every UK bank individually, and handle all the consent management yourself.&lt;/p&gt;

&lt;p&gt;Or you could use a payment initiation API that abstracts all of that.&lt;/p&gt;

&lt;p&gt;Here's what a payment request looks like with Atoa's API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST https://api.atoa.me/api/payments/process-payment &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer YOUR_API_KEY"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "amount": 49.99,
    "currency": "GBP",
    "reference": "Order-12345",
    "redirectUrl": "https://yourapp.com/payment-complete",
    "customerEmail": "customer@example.com"
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Five fields. One API call. The customer gets redirected to their bank, authenticates, and the payment is done. You get a webhook when the money lands.&lt;/p&gt;

&lt;p&gt;No card numbers to tokenise. No PCI audit. No 3D Secure fallback logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Coming: Variable Recurring Payments
&lt;/h2&gt;

&lt;p&gt;Here's what's got me excited right now. The first wave of commercial Variable Recurring Payments (cVRPs) went live in Q1 2026. This is the open banking equivalent of Direct Debits — but better.&lt;/p&gt;

&lt;p&gt;With cVRPs, a customer authorises a payment mandate once, and you can collect future payments within agreed limits without redirecting them to their bank every time. Think subscription billing, utility payments, or regular top-ups — all via bank transfer, no card-on-file needed.&lt;/p&gt;

&lt;p&gt;The FCA and PSR are watching adoption closely. By end of 2026, they'll evaluate whether industry-led cVRP adoption needs regulatory nudges. If you're building subscription infrastructure for the UK market, this is the API to watch.&lt;/p&gt;

&lt;h2&gt;
  
  
  The TL;DR for Developers
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Open banking payments are OAuth 2.0 + bank redirects.&lt;/strong&gt; If you've built a "Login with Google" flow, you understand 70% of it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No card data means no PCI-DSS scope.&lt;/strong&gt; Your security surface shrinks dramatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Settlement is near-instant.&lt;/strong&gt; No T+2 waiting for card settlements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Costs are structurally lower.&lt;/strong&gt; No interchange, no scheme fees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VRPs are the next frontier.&lt;/strong&gt; Recurring bank payments without the friction of Direct Debit mandates.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want to try it yourself, Atoa has a sandbox environment where you can test the full payment flow without moving real money. The API docs are at &lt;a href="https://docs.atoa.me" rel="noopener noreferrer"&gt;docs.atoa.me&lt;/a&gt; — the payment initiation endpoint is the one you want to start with.&lt;/p&gt;

&lt;p&gt;Build something. Break something. Ship it.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Arun Rajkumar is Co-Founder &amp;amp; CTO of Atoa, a UK open banking payments platform. He writes about payments infrastructure, developer experience, and building fintech from India for the UK market. Follow him on X &lt;a href="https://x.com/mickyarun" rel="noopener noreferrer"&gt;@mickyarun&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>openbanking</category>
      <category>api</category>
      <category>fintech</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Why Open Banking Is Eating Card Payments in the UK (And the Numbers Prove It)</title>
      <dc:creator>arun rajkumar</dc:creator>
      <pubDate>Tue, 31 Mar 2026 18:01:30 +0000</pubDate>
      <link>https://dev.to/mickyarun/why-open-banking-is-eating-card-payments-in-the-uk-and-the-numbers-prove-it-34bo</link>
      <guid>https://dev.to/mickyarun/why-open-banking-is-eating-card-payments-in-the-uk-and-the-numbers-prove-it-34bo</guid>
      <description>&lt;p&gt;I've been building payment infrastructure for the last few years. Cards were the default. Visa, Mastercard, Stripe — the holy trinity of "just make it work."&lt;/p&gt;

&lt;p&gt;Then I looked at the numbers.&lt;/p&gt;

&lt;p&gt;53% growth in open banking payments year-on-year. 351 million payments in 2025 alone. 33.1 million users expected by 2026 — that's over 60% of UK adults. And account-to-account payments are projected to grow at 13.63% CAGR through 2031 — the fastest of any payment method in the UK.&lt;/p&gt;

&lt;p&gt;Meanwhile, card transaction growth has flatlined. Debit cards still hold about 42% of the UK market, but merchants are quietly migrating away. The reason isn't complicated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It's the fees.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Tax You Don't See
&lt;/h2&gt;

&lt;p&gt;Here's what actually happens when a customer taps their card at your checkout:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Interchange fee&lt;/strong&gt; → goes to the card-issuing bank (0.2–0.3% for UK debit, 0.3% for credit)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scheme fee&lt;/strong&gt; → goes to Visa or Mastercard (0.02–0.15% plus per-transaction)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Acquirer fee&lt;/strong&gt; → goes to your payment processor&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gateway fee&lt;/strong&gt; → goes to your payment gateway&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Stack all of that up and you're looking at around 2.8% per transaction. On a £100 sale, that's £2.80 gone before you've paid rent.&lt;/p&gt;

&lt;p&gt;For a small UK business doing £50K/month in card payments, that's £1,400/month in processing fees. £16,800 a year. Just for moving money from point A to point B.&lt;/p&gt;

&lt;p&gt;I kept staring at that number. There had to be a better way.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Open Banking Actually Works (Developer Edition)
&lt;/h2&gt;

&lt;p&gt;Open banking cuts out the middlemen. No card networks. No interchange. No scheme fees. The money moves directly from the customer's bank account to yours via the UK's Faster Payments rails.&lt;/p&gt;

&lt;p&gt;Here's the flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Customer → Clicks "Pay by Bank" → Redirected to their bank app
→ Authenticates (biometrics/PIN) → Confirms payment
→ Funds move instantly via Faster Payments → Merchant receives funds
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From a developer's perspective, the integration looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Initiate a payment via open banking API&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;payment&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://api.youropenbanking.provider/v1/payments&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Authorization&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;`Bearer &lt;/span&gt;&lt;span class="se"&gt;\$&lt;/span&gt;&lt;span class="s2"&gt;{access_token}&lt;/span&gt;&lt;span class="se"&gt;\`&lt;/span&gt;&lt;span class="s2"&gt;,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    amount: {
      currency: 'GBP',
      value: '49.99'
    },
    creditor: {
      account: {
        sortCode: '123456',
        accountNumber: '12345678'
      },
      name: 'Your Business Ltd'
    },
    reference: 'ORDER-2026-0331',
    redirect_url: 'https://yoursite.com/payment/callback'
  })
});

// Response includes a bank authorization URL
const { authorizationUrl, paymentId } = await payment.json();
// Redirect customer to their bank for SCA
window.location.href = authorizationUrl;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The customer gets redirected to their bank, authenticates with Strong Customer Authentication (usually biometrics on their phone), confirms the payment, and gets redirected back. The whole flow takes under 10 seconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cost?&lt;/strong&gt; Around 0.8%. On that same £100 transaction, you're paying £0.80 instead of £2.80.&lt;/p&gt;

&lt;p&gt;That's not an optimisation. That's different economics entirely.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Developer Experience Gap (And Why It's Closing)
&lt;/h2&gt;

&lt;p&gt;I'll be honest — two years ago, integrating open banking was painful. Multiple bank APIs, inconsistent standards, redirect flows that broke on mobile. Stripe was easier, and "easier" wins in developer land.&lt;/p&gt;

&lt;p&gt;That's changed. Fast.&lt;/p&gt;

&lt;p&gt;The UK Open Banking Standard (maintained by the OBIE) has matured. Payment Initiation Service Provider (PISP) APIs now follow consistent patterns. You don't need to integrate with each bank individually — providers aggregate the bank connections and give you a single API.&lt;/p&gt;

&lt;p&gt;At Atoa, this is exactly what we built. One API. All UK banks. Pay by Link, QR code, eCommerce checkout, even POS terminals. We're FCA-authorised, ISO-27001 and SOC2 certified, because when you're moving money, "it works on my machine" doesn't cut it.&lt;/p&gt;

&lt;p&gt;Here's what our integration looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create a payment link via Atoa API&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST https://api.atoa.me/api/v1/payments &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer YOUR_API_KEY"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "amount": 49.99,
    "currency": "GBP",
    "description": "Order #2026-0331",
    "redirectUrl": "https://yoursite.com/thanks",
    "customerEmail": "customer@example.com"
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. No card tokenisation. No PCI-DSS scope expansion. No 3D Secure headaches. The customer pays directly from their bank.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Developers Get Wrong About Open Banking
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Myth 1: "Customers won't trust it."&lt;/strong&gt;&lt;br&gt;
33 million UK adults are already using it. Every major UK bank supports it. The authentication happens inside your own banking app — it's actually &lt;em&gt;more&lt;/em&gt; secure than typing card numbers into a web form.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Myth 2: "It's only for big transactions."&lt;/strong&gt;&lt;br&gt;
Wrong. The fastest growth is in everyday payments. Coffee shops, retail, subscriptions. The flat-fee model makes it &lt;em&gt;more&lt;/em&gt; cost-effective for small transactions than cards.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Myth 3: "The UX is worse than cards."&lt;/strong&gt;&lt;br&gt;
Have you tried Apple Pay recently? Open banking checkout is the same number of taps. Select bank → authenticate → done. No card number entry. No expiry dates. No CVV.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Myth 4: "It's a UK-only thing."&lt;/strong&gt;&lt;br&gt;
PSD2 covers all of Europe. Open banking frameworks are launching in Brazil, Australia, India (UPI is essentially open banking on steroids), Saudi Arabia, and Nigeria. If you build for open banking now, you're building for the global rails of tomorrow.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Numbers That Changed My Mind
&lt;/h2&gt;

&lt;p&gt;Let me put this plainly:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Card Payments&lt;/th&gt;
&lt;th&gt;Open Banking&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cost per £100 txn&lt;/td&gt;
&lt;td&gt;£2.80 (2.8%)&lt;/td&gt;
&lt;td&gt;£0.80 (0.8%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Settlement time&lt;/td&gt;
&lt;td&gt;1–3 business days&lt;/td&gt;
&lt;td&gt;Instant&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chargebacks&lt;/td&gt;
&lt;td&gt;Yes (costly)&lt;/td&gt;
&lt;td&gt;No (irrevocable)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PCI-DSS scope&lt;/td&gt;
&lt;td&gt;Full&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Failed payment rate&lt;/td&gt;
&lt;td&gt;5–15% (expired cards)&lt;/td&gt;
&lt;td&gt;&amp;lt;2%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Integration complexity&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;Simple (single API)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The chargeback point alone is massive. If you've ever dealt with friendly fraud on card payments, you know how much time, money, and sanity it costs. Open banking payments are irrevocable — once the customer authenticates with their bank, the payment is final.&lt;/p&gt;

&lt;h2&gt;
  
  
  So Why Hasn't Everyone Switched?
&lt;/h2&gt;

&lt;p&gt;Awareness. That's the honest answer.&lt;/p&gt;

&lt;p&gt;Here's a stat that blew my mind: only 38% of UK consumers recognise the phrase "Pay by Bank" — &lt;em&gt;down&lt;/em&gt; from 55% in 2025. Usage is up 53%, but brand recognition is falling. The payments industry has a marketing problem, not a technology problem.&lt;/p&gt;

&lt;p&gt;And that's actually the opportunity for developers. The infrastructure is ready. The economics are compelling. The UX is mature. What's missing is more developers building with it, more merchants offering it, and more consumers seeing it at checkout.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;If you want to try this yourself:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Sandbox first:&lt;/strong&gt; Most open banking providers offer sandbox environments. At Atoa, ours is at &lt;a href="https://docs.atoa.me" rel="noopener noreferrer"&gt;docs.atoa.me&lt;/a&gt; — you can test payment flows without moving real money.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Start with Pay by Link:&lt;/strong&gt; It's the simplest integration. Generate a link, send it to a customer, they pay. No frontend changes needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add to checkout:&lt;/strong&gt; Once you're comfortable, add a "Pay by Bank" button alongside your card option. A/B test it. Watch the conversion rates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Go deeper:&lt;/strong&gt; Webhooks for real-time payment notifications, recurring payments via Variable Recurring Payments (VRP), and batch payments for payroll or marketplace payouts.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The docs are at &lt;a href="https://docs.atoa.me/api-reference/Payment/process-payment" rel="noopener noreferrer"&gt;docs.atoa.me/api-reference&lt;/a&gt;. If you're on WordPress/WooCommerce, there's a plugin that takes about 5 minutes to set up.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bottom Line
&lt;/h2&gt;

&lt;p&gt;Card payments aren't going to vanish overnight. But the trajectory is clear. 53% growth. Instant settlement. 0.8% vs 2.8%. No chargebacks. Simpler compliance.&lt;/p&gt;

&lt;p&gt;I'm biased — I've spent the last few years building this. But the numbers aren't biased. They just are.&lt;/p&gt;

&lt;p&gt;If you're building payments in the UK and you're still defaulting to cards, you're leaving money on the table. Literally.&lt;/p&gt;

&lt;p&gt;Try the sandbox. Run the numbers for your use case. Then decide.&lt;/p&gt;

&lt;p&gt;→ &lt;strong&gt;&lt;a href="https://docs.atoa.me" rel="noopener noreferrer"&gt;docs.atoa.me&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Arun Rajkumar is Co-Founder &amp;amp; CTO of Atoa, a UK open banking payments platform backed by a16z. He writes about payments, developer experience, and building fintech from India for the UK market. Follow him on X &lt;a href="https://x.com/mickyarun" rel="noopener noreferrer"&gt;@mickyarun&lt;/a&gt; and &lt;a href="https://dev.to/mickyarun"&gt;dev.to/mickyarun&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>openbanking</category>
      <category>fintech</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How We Built Atoa's Payment Infrastructure with 15 NestJS Microservices (And What Took the Most Figuring Out)</title>
      <dc:creator>arun rajkumar</dc:creator>
      <pubDate>Wed, 25 Mar 2026 05:44:58 +0000</pubDate>
      <link>https://dev.to/mickyarun/how-we-built-atoas-payment-infrastructure-with-15-nestjs-microservices-and-what-took-the-most-3ob6</link>
      <guid>https://dev.to/mickyarun/how-we-built-atoas-payment-infrastructure-with-15-nestjs-microservices-and-what-took-the-most-3ob6</guid>
      <description>&lt;p&gt;Open banking in the UK just crossed 24 billion successful API calls in 2025. Payment initiation grew 53% year-on-year. That's not a trend — that's a tectonic shift.&lt;/p&gt;

&lt;p&gt;We've been building in this space for years now. Atoa processes open banking payments for UK merchants — Pay by Link, QR codes, POS terminals, online checkouts. Half the cost of card payments. Instant settlement. No Visa or Mastercard in the middle.&lt;/p&gt;

&lt;p&gt;And our entire payment infrastructure runs on 15 NestJS microservices.&lt;/p&gt;

&lt;p&gt;Here's what we got right. And what took the most figuring out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why NestJS for Payments
&lt;/h2&gt;

&lt;p&gt;When I started architecting Atoa's backend, the decision came down to two things: developer velocity and reliability.&lt;/p&gt;

&lt;p&gt;We were a small team. Mostly freshers and interns — people I'd bet on because of intent, not because of their resume. One of our earliest hires joined as a fresher. Five years later, he's our Technology Architect making every major tech decision. Another started as an intern. He coded our Open Banking module end-to-end.&lt;/p&gt;

&lt;p&gt;These people needed a framework that was opinionated enough to enforce structure but flexible enough to let them move fast. NestJS gave us that. Decorators, dependency injection, modular architecture — it reads like a blueprint, not spaghetti.&lt;/p&gt;

&lt;p&gt;We chose TypeScript everywhere. Zod for runtime validation. If a payment request hits our API with a malformed amount or missing merchant ID, it dies at the gate. In payments, a silent failure isn't a bug — it's someone's revenue disappearing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 15-Service Architecture
&lt;/h2&gt;

&lt;p&gt;Here's a simplified view of our service boundaries:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────┐
│                API Gateway                   │
│            (Traefik v3 + Auth)               │
└──────────┬──────────┬──────────┬────────────┘
           │          │          │
    ┌──────▼──┐ ┌─────▼────┐ ┌──▼──────────┐
    │ Payment │ │ Merchant │ │ Notification │
    │ Service │ │ Service  │ │   Service    │
    └──────┬──┘ └──────────┘ └─────────────┘
           │
    ┌──────▼──────────────────────────────┐
    │        Open Banking Gateway          │
    │  (Bank API adapters, token mgmt,     │
    │   consent flows, SCA handling)       │
    └──────┬──────────────────────────────┘
           │
    ┌──────▼──┐ ┌──────────┐ ┌────────────┐
    │ Ledger  │ │ Webhook  │ │ Settlement │
    │ Service │ │ Service  │ │  Service   │
    └─────────┘ └──────────┘ └────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each service owns its domain. The Payment Service doesn't know how settlements work. The Merchant Service doesn't touch bank APIs. Clean boundaries.&lt;/p&gt;

&lt;p&gt;We use Traefik v3 as our API gateway — routing, rate limiting, TLS termination, health checks. It plays beautifully with Docker and our Kubernetes setup. Our DevOps lead (Kubestronaut certified, by the way) architected the infra. The only downtime we've ever had? AWS London went down during the UK heatwave about two years ago. That wasn't on us. Everything else — 100% uptime.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hard Part: Every Bank is Different
&lt;/h2&gt;

&lt;p&gt;Here's what the "open banking is easy" crowd doesn't tell you.&lt;/p&gt;

&lt;p&gt;Every UK bank implements authentication differently. What works in sandbox breaks in production. Extra consent screens. Different redirect logic. Strong Customer Authentication flows that behave one way on mobile, another on desktop.&lt;/p&gt;

&lt;p&gt;We built an adapter layer inside our Open Banking Gateway. Each bank gets its own adapter that normalises the authentication flow into a consistent interface. When a merchant's customer pays via Atoa, they don't know (or care) that Barclays handles redirects differently than Monzo.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Simplified bank adapter pattern&lt;/span&gt;
&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;BankAdapter&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;initiatePayment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PaymentInitParams&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ConsentUrl&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;handleCallback&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bankResponse&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;unknown&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;PaymentResult&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;getPaymentStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;paymentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;PaymentStatus&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Each bank gets its own implementation&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;BarclaysAdapter&lt;/span&gt; &lt;span class="k"&gt;implements&lt;/span&gt; &lt;span class="nx"&gt;BankAdapter&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;initiatePayment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PaymentInitParams&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Barclays-specific consent flow&lt;/span&gt;
    &lt;span class="c1"&gt;// Handles their unique SCA requirements&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;validated&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;PaymentInitSchema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Zod validation&lt;/span&gt;
    &lt;span class="c1"&gt;// ... bank-specific logic&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This adapter pattern saved us hundreds of hours. New bank? New adapter. Same interface. No touching the Payment Service.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Took the Most Figuring Out: Local Development
&lt;/h2&gt;

&lt;p&gt;Fifteen microservices. Each with its own database connection, environment variables, and dependencies. Onboarding a new developer used to take two weeks. Two weeks of "why isn't this service connecting" and "which env file do I need."&lt;/p&gt;

&lt;p&gt;We fixed this. I wrote about it in detail on dev.to — &lt;a href="https://dev.to/mickyarun/we-had-15-microservices-and-it-took-2-weeks-to-onboard-a-developer-heres-how-we-fixed-it-in-a-258a"&gt;how we went from 2 weeks to 1 day for developer onboarding&lt;/a&gt;. The short version: Docker Compose orchestration, shared environment templates, and a single &lt;code&gt;make dev&lt;/code&gt; command that spins up the entire stack.&lt;/p&gt;

&lt;p&gt;One of our developers joined with a B.Sc and "Googling" as his only listed skill. He was shipping code within days, not weeks. That's the real test of your developer experience. Not whether your senior architect can navigate it. Whether someone brand new can.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons for Developers Building Payment Systems
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Validate at every boundary.&lt;/strong&gt; Zod on the API layer. Zod between services. Payments don't forgive data inconsistencies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Idempotency is not optional.&lt;/strong&gt; Network retries happen. Bank callbacks come twice. Every payment mutation needs an idempotency key. We learned this the hard way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Treat webhooks as first-class citizens.&lt;/strong&gt; Merchants need real-time payment status. We built a dedicated Webhook Service with retry logic, dead-letter queues, and delivery receipts. It's not glamorous. It's essential.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Abstract your bank integrations.&lt;/strong&gt; The adapter pattern isn't clever engineering — it's survival. Banks change APIs. New banks join. Your payment logic should never care.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Invest in local dev early.&lt;/strong&gt; The time you save on onboarding compounds. Every developer you hire benefits. Every feature ships faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Open Banking Over Cards
&lt;/h2&gt;

&lt;p&gt;I'll be direct. If you're building a payment flow for the UK market in 2026, you should seriously consider open banking.&lt;/p&gt;

&lt;p&gt;Card payments: ~1.5-2.5% processing fees, T+2 settlement, chargebacks, PCI-DSS compliance overhead.&lt;/p&gt;

&lt;p&gt;Open banking via Atoa: lower fees, instant settlement, no chargebacks (because the customer authenticates with their bank), and simpler compliance.&lt;/p&gt;

&lt;p&gt;We're FCA-authorised. ISO-27001 and SOC2 certified. We have SDKs for Flutter (&lt;code&gt;atoa_sdk&lt;/code&gt;, &lt;code&gt;atoa_flutter_sdk&lt;/code&gt;), a Vue-based Web Client SDK, a WooCommerce plugin, and full API docs at &lt;a href="https://docs.atoa.me" rel="noopener noreferrer"&gt;docs.atoa.me&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you want to test it yourself: &lt;a href="https://docs.atoa.me/api-reference/Payment/process-payment" rel="noopener noreferrer"&gt;docs.atoa.me/api-reference/Payment/process-payment&lt;/a&gt;. Sandbox is free. Takes about 10 minutes to get your first payment flowing.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;We're investing heavily in AI-assisted code migration and developer tooling. The 15-service architecture is growing. But the principles stay the same: clean boundaries, validate everything, and build for the developer who joins tomorrow, not just the one who built it yesterday.&lt;/p&gt;

&lt;p&gt;If you're building in payments — especially in the UK open banking space — I'd love to hear how you're approaching it. Drop a comment or find me on X: &lt;a href="https://x.com/mickyarun" rel="noopener noreferrer"&gt;@mickyarun&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>nestjs</category>
      <category>microservices</category>
      <category>openbanking</category>
      <category>fintech</category>
    </item>
    <item>
      <title>We Had 15 Microservices and It Took 2 Weeks to Onboard a Developer. Here's How We Fixed It in a Weekend.</title>
      <dc:creator>arun rajkumar</dc:creator>
      <pubDate>Tue, 24 Mar 2026 07:29:26 +0000</pubDate>
      <link>https://dev.to/mickyarun/we-had-15-microservices-and-it-took-2-weeks-to-onboard-a-developer-heres-how-we-fixed-it-in-a-258a</link>
      <guid>https://dev.to/mickyarun/we-had-15-microservices-and-it-took-2-weeks-to-onboard-a-developer-heres-how-we-fixed-it-in-a-258a</guid>
      <description>&lt;p&gt;&lt;em&gt;How we went from "ask someone for the .env" to one-click local development for our entire microservice stack.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;If you're running microservices, you've probably been here:&lt;/p&gt;

&lt;p&gt;A new developer joins. You point them at the repos. Then begins the ritual. Clone this. Run migrations on that. Ask Slack for the latest &lt;code&gt;.env&lt;/code&gt;. Debug why nginx isn't routing. Realize they're on Node 20 but this service needs Node 23. Spend two hours figuring out why the queue consumer isn't connecting.&lt;/p&gt;

&lt;p&gt;Two weeks later, they write their first line of actual code.&lt;/p&gt;

&lt;p&gt;We had 15 NestJS microservices. Each with its own repo, its own &lt;code&gt;.env&lt;/code&gt;, its own database schema, migrations, queues, and inter-service dependencies. Every developer had their own frankensteined local setup — commented-out code, hardcoded URLs, an nginx config held together with hope.&lt;/p&gt;

&lt;p&gt;Integration testing? People just tested directly against the shared dev database. New joiners spent their first week or two just getting things running.&lt;/p&gt;

&lt;p&gt;I'm the CTO. I'm hands-on, but lately I only code two or three times a month. The last time I tried to pick up a feature, I had to pull the code, run migrations, ask someone for the latest env vars, debug why things weren't connecting, fix my local nginx config — and by the time I had a working setup, I'd lost half a day and gotten pulled into something else.&lt;/p&gt;

&lt;p&gt;That weekend, I decided to fix this. For everyone. Forever.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem Isn't Microservices. It's Environment Chaos.
&lt;/h2&gt;

&lt;p&gt;Here's what we found when we audited our 15 repos:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Env variable naming was a mess.&lt;/strong&gt; The same database connection string was called &lt;code&gt;DB_HOST&lt;/code&gt; in one repo, &lt;code&gt;DATABASE_HOST&lt;/code&gt; in another, and &lt;code&gt;POSTGRES_HOST&lt;/code&gt; in a third. Some were just plural changes — &lt;code&gt;QUEUE_URL&lt;/code&gt; vs &lt;code&gt;QUEUES_URL&lt;/code&gt;. One service used &lt;code&gt;DB_HOST_CREDENTIALS&lt;/code&gt; for a secondary database, another used &lt;code&gt;DB_HOST_CREDENTIAL&lt;/code&gt; (singular). Multiply this across 15 repos and you get a combinatorial nightmare.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. No single source of truth.&lt;/strong&gt; Each repo had its own &lt;code&gt;.env.example&lt;/code&gt; that was perpetually outdated. Developers copied &lt;code&gt;.env&lt;/code&gt; files from each other over Slack. Some had AWS credentials hardcoded. Others had localhost URLs that only worked on one person's machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Node version drift.&lt;/strong&gt; Some services were on Node 20, others on Node 23. The &lt;code&gt;package.json&lt;/code&gt; didn't enforce this, so things would break silently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. AWS services in local dev.&lt;/strong&gt; Some services connected to real AWS SQS queues locally. Others mocked them. There was no standard.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Nginx configuration hell.&lt;/strong&gt; Every developer maintained their own nginx config to route between services. One person's config looked nothing like another's. New joiners spent days getting this right.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: A Shared Env Schema with Zod (The Hard Part)
&lt;/h2&gt;

&lt;p&gt;The first thing we built was a centralized env schema package — a single source of truth for every environment variable across all services.&lt;/p&gt;

&lt;p&gt;Sounds simple. It wasn't.&lt;/p&gt;

&lt;p&gt;We had to map every &lt;code&gt;.env&lt;/code&gt; file across 15 repos, find the overlaps, resolve the naming conflicts, and split variables into shared building blocks and service-specific schemas.&lt;/p&gt;

&lt;p&gt;This is where AI agents saved us hours. I spawned multiple agents to do a retrospective across all repos — mapping every env variable, finding common ones, identifying naming conflicts, and generating a unified schema. What would have taken a team days of grep-and-spreadsheet work took a couple of hours.&lt;/p&gt;

&lt;p&gt;The result: a shared npm package using &lt;strong&gt;Zod&lt;/strong&gt; for runtime validation. Here's the actual pattern:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// shared.schema.ts — Reusable building blocks&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;DatabaseConfigSchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;DB_HOST&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;localhost&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;DB_PORT&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;coerce&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;number&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5432&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;DB_USER&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;postgres&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;DB_PASSWORD&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="na"&gt;DB_NAME&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;RedisConfigSchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;REDIS_HOST&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;localhost&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;REDIS_PORT&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;coerce&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;number&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6379&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;REDIS_PASSWORD&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;optional&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;QueueConfigSchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;SQS_ENDPOINT&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;http://localhost:9324&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;SQS_REGION&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;us-east-1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;AWS_ACCESS_KEY_ID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;AWS_SECRET_ACCESS_KEY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;JWTConfigSchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;JWT_SECRET&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="na"&gt;JWT_ACCESS_TOKEN_EXPIRY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;15m&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;InterServiceAuthSchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;INTER_SERVICE_SECRET&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Base schema every backend service inherits&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SharedBackendSchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;NODE_ENV&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;enum&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dev-local&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dev&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;uat&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;production&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt;
  &lt;span class="na"&gt;PORT&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;coerce&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;number&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;DatabaseConfigSchema&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;RedisConfigSchema&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JWTConfigSchema&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each service &lt;strong&gt;composes&lt;/strong&gt; its schema from these shared blocks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// services/payments.schema.ts&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;PaymentsEnvSchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;SharedBackendSchema&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;QueueConfigSchema&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;InterServiceAuthSchema&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;PAYMENT_PROVIDER_API_KEY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="na"&gt;PAYMENT_ENCRYPTION_KEY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="na"&gt;WEBHOOK_SIGNING_SECRET&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="p"&gt;}));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key insight: &lt;strong&gt;composition via &lt;code&gt;.merge()&lt;/code&gt;&lt;/strong&gt;. When we renamed &lt;code&gt;DATABASE_HOST&lt;/code&gt; to &lt;code&gt;DB_HOST&lt;/code&gt;, we only changed it in one place. Every service that imports &lt;code&gt;DatabaseConfigSchema&lt;/code&gt; gets the fix automatically.&lt;/p&gt;

&lt;p&gt;We published this as an internal npm package. Each service declares it as a dependency and validates on startup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Any service's index.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;validateEnv&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@company/env-schema&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;validateEnv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;payments&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Throws with clear error messages if anything is missing&lt;/span&gt;
&lt;span class="c1"&gt;// Returns a frozen, type-safe env object&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Environment-aware strictness&lt;/strong&gt; was crucial. In &lt;code&gt;dev-local&lt;/code&gt; mode, missing optional vars log warnings but don't block startup — so developers can run just the services they need. In &lt;code&gt;dev&lt;/code&gt;, &lt;code&gt;uat&lt;/code&gt;, and &lt;code&gt;production&lt;/code&gt;, missing required vars call &lt;code&gt;process.exit(1)&lt;/code&gt;. No silent failures in deployed environments.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Auto-Generate .env Files (The CLI)
&lt;/h2&gt;

&lt;p&gt;Having a schema is useless if developers still have to manually create &lt;code&gt;.env&lt;/code&gt; files. So we built a CLI that generates them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Generate .env for all 15 services&lt;/span&gt;
npx env-schema init &lt;span class="nt"&gt;--all&lt;/span&gt; &lt;span class="nt"&gt;--base-path&lt;/span&gt; ~/code

&lt;span class="c"&gt;# Generate for a single service&lt;/span&gt;
npx env-schema init &lt;span class="nt"&gt;--service&lt;/span&gt; payments

&lt;span class="c"&gt;# Preview without writing&lt;/span&gt;
npx env-schema init &lt;span class="nt"&gt;--service&lt;/span&gt; payments &lt;span class="nt"&gt;--stdout&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The generator:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fills in &lt;strong&gt;safe local defaults&lt;/strong&gt; (localhost URLs, local Redis passwords, sandbox API keys)&lt;/li&gt;
&lt;li&gt;Reuses &lt;strong&gt;shared secrets&lt;/strong&gt; across services (same JWT secret, same inter-service auth token)&lt;/li&gt;
&lt;li&gt;Comments out &lt;strong&gt;optional fields&lt;/strong&gt; so developers know they exist&lt;/li&gt;
&lt;li&gt;Is &lt;strong&gt;idempotent&lt;/strong&gt; — safe to re-run, merges new keys without overwriting existing values&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No more Slack messages asking "can someone send me the .env for the notification service?"&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3: Prevent Future Drift (The Regex Scanner)
&lt;/h2&gt;

&lt;p&gt;Fixing the current mess was one thing. Preventing it from coming back was another.&lt;/p&gt;

&lt;p&gt;We built a &lt;strong&gt;drift checker&lt;/strong&gt; that scans source code for &lt;code&gt;process.env&lt;/code&gt; references and compares them against the schema registry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// check-drift.ts — simplified version&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;extractEnvVars&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;filePath&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;filePath&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;utf-8&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;matches&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;matchAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/process&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="sr"&gt;.env&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="sr"&gt;.&lt;/span&gt;&lt;span class="se"&gt;(\\&lt;/span&gt;&lt;span class="sr"&gt;w+&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;/g&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;matchAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/process&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="sr"&gt;.env&lt;/span&gt;&lt;span class="se"&gt;\\[&lt;/span&gt;&lt;span class="sr"&gt;'(&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="sr"&gt;w+)'&lt;/span&gt;&lt;span class="se"&gt;\\]&lt;/span&gt;&lt;span class="sr"&gt;/g&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;];&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;matches&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;checkDrift&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;serviceId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;schemaKeys&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;schemaRegistry&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;serviceId&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;codeKeys&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;walkDir&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;src/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;flatMap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;extractEnvVars&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;unregistered&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;codeKeys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;k&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;schemaKeys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;k&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;IGNORED_VARS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;k&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;unregistered&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Env drift detected! Unregistered vars: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;unregistered&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This runs as:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pre-commit hook&lt;/strong&gt; — blocks commits with unregistered env vars&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI check&lt;/strong&gt; — PRs can't merge if drift is detected&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-startup check&lt;/strong&gt; — each service runs &lt;code&gt;npm run check-env&lt;/code&gt; before starting
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;package.json&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;any&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;service&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"check-env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx env-schema check payments"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"check-infra"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx env-schema infra"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"start:local"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm run check-env &amp;amp;&amp;amp; npm run check-infra &amp;amp;&amp;amp; cross-env NODE_ENV=dev-local tsnd src/index.ts"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We know how teams work. Lint rules get ignored, pre-commit hooks get bypassed with &lt;code&gt;--no-verify&lt;/code&gt;. That's why the same check runs in CI. The PR won't merge if there's env drift. No exceptions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4: Kill Nginx with Traefik
&lt;/h2&gt;

&lt;p&gt;This was the game-changer.&lt;/p&gt;

&lt;p&gt;Every developer had a custom nginx config to route API calls between services locally. &lt;code&gt;/api/payments&lt;/code&gt; -&amp;gt; port 3001, &lt;code&gt;/api/users&lt;/code&gt; -&amp;gt; port 3002, and so on. When a new service was added, everyone had to update their nginx config manually. Nobody's config was the same.&lt;/p&gt;

&lt;p&gt;We replaced all of it with &lt;strong&gt;Traefik v3&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Traefik is a reverse proxy that auto-discovers services. We use a file-based dynamic provider that watches a config directory for changes — hot reload, no restart needed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# docker-compose.yml&lt;/span&gt;
&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;traefik&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;traefik:v3.0&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;9090:9090"&lt;/span&gt;    &lt;span class="c1"&gt;# API Gateway&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;8080:8080"&lt;/span&gt;    &lt;span class="c1"&gt;# Dashboard&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./traefik/traefik.yml:/etc/traefik/traefik.yml&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./traefik/dynamic:/etc/traefik/dynamic&lt;/span&gt;  &lt;span class="c1"&gt;# Hot-reload configs&lt;/span&gt;
    &lt;span class="na"&gt;networks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;app-network&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No more per-developer nginx configs. One shared Traefik config in the repo. Add a new service? Add 5 lines to &lt;code&gt;services.yml&lt;/code&gt;. Traefik picks it up automatically via hot reload. Everyone gets the same routing.&lt;/p&gt;

&lt;p&gt;The dashboard at &lt;code&gt;localhost:8080&lt;/code&gt; gives you a visual map of every route, middleware, and service — something nginx never offered out of the box.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 5: One Command to Rule Them All
&lt;/h2&gt;

&lt;p&gt;With the env schema, Traefik, and local service mocking in place, we built the orchestration layer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bootstrap for new developers&lt;/strong&gt; — a single script that handles everything from zero:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# New developer runs this on day one&lt;/span&gt;
./bootstrap.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This 10-step wizard:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Checks prerequisites (git, Docker, Node.js, VS Code)&lt;/li&gt;
&lt;li&gt;Collects git identity&lt;/li&gt;
&lt;li&gt;Configures workspace directory&lt;/li&gt;
&lt;li&gt;Clones all 15 repos in parallel (4 concurrent)&lt;/li&gt;
&lt;li&gt;Sets up git config in each repo&lt;/li&gt;
&lt;li&gt;Configures npm registry for private packages&lt;/li&gt;
&lt;li&gt;Runs &lt;code&gt;npm install&lt;/code&gt; in parallel (3 concurrent)&lt;/li&gt;
&lt;li&gt;Generates all &lt;code&gt;.env&lt;/code&gt; files from the shared schema&lt;/li&gt;
&lt;li&gt;Provisions infrastructure (Docker containers, databases, migrations)&lt;/li&gt;
&lt;li&gt;Installs the VS Code extension + generates workspace file&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;For existing developers&lt;/strong&gt; — the daily startup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;--- Infrastructure Check ---

  [OK] PostgreSQL is responding on port 5432
  [OK] Redis/Valkey is responding on port 6379
  [OK] ElasticMQ (SQS) is responding on port 9324
  [OK] Traefik (API Gateway) is responding on port 9090

Select services to start (SPACE=toggle, A=all, N=none, ENTER=confirm):
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The infrastructure check does TCP port scanning with 2-second timeouts. If something's down, it offers to auto-start it via Docker. Then you select which services you need.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Smart terminal detection&lt;/strong&gt; — the startup script auto-detects your terminal and adapts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;tmux&lt;/strong&gt;: Grid layout with split panes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;iTerm2&lt;/strong&gt;: Native AppleScript-driven split panes (up to 8 per tab)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terminal.app&lt;/strong&gt;: Opens tabs per service&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fallback&lt;/strong&gt;: Color-coded concurrent output in a single terminal&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each service gets a color-coded label. Health monitoring polls every service in real-time — green when healthy, yellow when starting, red when unhealthy.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Team Took It Further
&lt;/h2&gt;

&lt;p&gt;I built the core over a weekend and handed it to my tech lead. "Check and deploy," I said.&lt;/p&gt;

&lt;p&gt;What they shipped blew me away. They didn't just deploy it — they built a &lt;strong&gt;VS Code extension&lt;/strong&gt; on top:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A welcome page&lt;/strong&gt; with a 5-step onboarding flow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run Preflight Checks -&amp;gt; Start Your First Service -&amp;gt; Manage Branches -&amp;gt; Explore Utilities -&amp;gt; Keyboard Shortcuts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A Services Dashboard&lt;/strong&gt; (&lt;code&gt;Cmd+Alt+S&lt;/code&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Init All Envs, Start All (Dev), Start All (Build), Stop All&lt;/li&gt;
&lt;li&gt;Real-time status: &lt;code&gt;0/15 running | 0/15 healthy | 0 missing env&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click a service to see logs, restart, or open its Swagger docs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A Preflight Diagnostics panel&lt;/strong&gt; (&lt;code&gt;Cmd+Alt+P&lt;/code&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The dependency graph visualization — 237 checks passing across all services&lt;/li&gt;
&lt;li&gt;Shows which services depend on which, what infrastructure they need&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A Branch Manager&lt;/strong&gt; (&lt;code&gt;Cmd+Alt+B&lt;/code&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;View and switch branches across all 15 repos from one UI&lt;/li&gt;
&lt;li&gt;No more cd-ing into each repo to check what branch you're on&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A Web Portal&lt;/strong&gt; (Vue 3 + Vite):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Swagger UI aggregator for all service APIs&lt;/li&gt;
&lt;li&gt;ElasticMQ queue inspector&lt;/li&gt;
&lt;li&gt;Real-time service status monitoring&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now anyone — including our product managers — can run all 15 services with millions of lines of code in under 5 minutes. They can test features end-to-end on their local machine. They ask AI to check if a design is practical. They run the code and see for themselves.&lt;/p&gt;

&lt;p&gt;A new developer's first day? Clone, click, code. Not clone, cry, configure.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Avoid This at Your Startup (Before It's Too Late)
&lt;/h2&gt;

&lt;p&gt;If you're at 3-5 microservices, here's what to do now before it becomes a 15-service nightmare:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Start with a shared env schema from day one.&lt;/strong&gt; Use Zod (or Joi, or JSON Schema). Even with 2 services, standardize your variable names. &lt;code&gt;DB_HOST&lt;/code&gt; everywhere, not &lt;code&gt;DATABASE_HOST&lt;/code&gt; in some and &lt;code&gt;POSTGRES_HOST&lt;/code&gt; in others. Compose shared blocks with &lt;code&gt;.merge()&lt;/code&gt; so naming changes propagate automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Pin your runtimes.&lt;/strong&gt; &lt;code&gt;.nvmrc&lt;/code&gt; + &lt;code&gt;engines&lt;/code&gt; in &lt;code&gt;package.json&lt;/code&gt;. Enforce in CI. It takes 5 minutes and saves weeks of debugging.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Mock external services locally.&lt;/strong&gt; Use ElasticMQ instead of real SQS, MinIO instead of real S3. Your env schema should auto-switch endpoints based on &lt;code&gt;NODE_ENV=dev-local&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Use Traefik instead of nginx from the start.&lt;/strong&gt; File-based dynamic provider + hot reload beats editing nginx.conf every time a service changes. Your future self will thank you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Add env drift detection to CI.&lt;/strong&gt; A regex scanner that checks &lt;code&gt;process.env&lt;/code&gt; references against your schema catches problems before they spread. Run it in pre-commit hooks AND CI — belt and suspenders.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Invest in the "first 5 minutes" experience.&lt;/strong&gt; If a new developer can't run your entire stack in 5 minutes, you have a problem. It will only get worse. Build a bootstrap script. Make it idempotent. Make it parallel.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Before and After
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Before&lt;/th&gt;
&lt;th&gt;After&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Onboarding&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1-2 weeks&lt;/td&gt;
&lt;td&gt;5 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Env setup&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Ask on Slack, copy-paste&lt;/td&gt;
&lt;td&gt;Auto-generated from schema&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Env validation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Crash at runtime&lt;/td&gt;
&lt;td&gt;Fail fast on startup with clear errors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Routing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Manual nginx per developer&lt;/td&gt;
&lt;td&gt;Traefik with hot-reload config&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Integration testing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Against shared dev DB&lt;/td&gt;
&lt;td&gt;Full local stack, end-to-end&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Starting services&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Manual, per-service, per-developer&lt;/td&gt;
&lt;td&gt;One command, interactive selection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Node version&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Whatever was installed&lt;/td&gt;
&lt;td&gt;Pinned in &lt;code&gt;.nvmrc&lt;/code&gt;, enforced in CI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;New service added&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Update everyone's nginx, share new .env&lt;/td&gt;
&lt;td&gt;Add 5 lines to Traefik config, schema auto-generates .env&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Drift prevention&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;None (hope-based)&lt;/td&gt;
&lt;td&gt;Pre-commit + CI drift checks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Who can run the stack&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Senior devs only&lt;/td&gt;
&lt;td&gt;Anyone, including PMs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;The tools matter less than the principle: &lt;strong&gt;your local development environment is a product.&lt;/strong&gt; Treat it like one. Your developers are the users. If the onboarding experience is painful, every day after that is a little painful too.&lt;/p&gt;

&lt;p&gt;We used NestJS, TypeScript, Zod, Traefik, ElasticMQ, Docker, and VS Code. You might use different tools. The pattern is the same: centralize config, validate on startup, auto-generate defaults, prevent drift, make it one click.&lt;/p&gt;

&lt;p&gt;Build it once. Fix it for everyone. Forever.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm Arun, CTO at a fintech startup. We're a team of 15 engineers in India building payment infrastructure for the UK. I write about the messy reality of scaling engineering teams and systems. Find me on &lt;a href="https://x.com/mickyarun" rel="noopener noreferrer"&gt;X @mickyarun&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>microservices</category>
      <category>devops</category>
      <category>typescript</category>
      <category>startup</category>
    </item>
  </channel>
</rss>
