ALL TAGS

Tag: architecture

Architecture

I Built Two Stripe Integrations in the Same Codebase. They Share Almost Zero Billing Code.

Why per-session payments and prepaid credit systems demand completely different architectures — even when they use the same Stripe account, the same API keys, and the same developer.

February 9, 2026 9 min read
Read Story →
Runtime

We Run Cron Jobs Inside the Bun Server Process (And You Should Too)

How we replaced system cron and external job runners with an in-process scheduler in Bun — featuring drift correction, job deduplication, error isolation, and why fewer moving parts means fewer 3 AM pages.

February 7, 2026 18 min read
Read Story →
Architecture

Stop Deducting Credits Immediately — Your Billing System Is a Ticking Time Bomb

Why naive credit deduction causes race conditions, phantom charges, and support nightmares — and how the hold-confirm-release pattern with automatic TTL expiration eliminates an entire category of billing bugs.

February 6, 2026 10 min read
Read Story →
Architecture

40 Languages, 400KB Bundle — Why I Refuse to Ship Translations in JavaScript

How dynamic translation loading with client-side caching serves 40 locales without bloating the SPA bundle, keeping the React app under 400KB while supporting instant language switching.

February 4, 2026 10 min read
Read Story →
Architecture

Your SSE Connections Are Lying to You — Here's What Happens When Users Reconnect

Most Server-Sent Events implementations have a silent reliability hole. The event replay pattern guarantees reconnecting clients never miss a billing update, payment approval, or session state change.

January 31, 2026 11 min read
Read Story →
Architecture

I Made Billing Invisible. Now My Developers Ship Paid Features Without Writing a Single Line of Payment Code.

How Vibe's billingGuard middleware intercepts paid API calls, pushes approval requests via SSE, auto-renders payment modals, and settles transactions — without feature developers touching payment logic.

January 30, 2026 9 min read
Read Story →
Architecture

Our Mentoring Platform Was Bleeding $17 Per Overrun Session. Then I Built a Timer That Kills Zoom Calls.

How I built an in-memory billing engine that broadcasts millisecond-accurate charges via Server-Sent Events, escalates balance warnings, and automatically terminates Zoom meetings when credits run out.

January 29, 2026 9 min read
Read Story →
Architecture

HMAC-Signed Vibe-to-Vibe Calls: How We Stopped Micro-Apps from Impersonating Each Other

Inside the HMAC-signed request protocol that secures inter-app communication on the Vibe platform — where every micro-app runs in its own Cloudflare Worker sandbox and no one trusts anyone.

January 27, 2026 20 min read
Read Story →
Architecture

Layered Authorization in Elysia.js: Why Your Middleware Is Doing Too Much

How we built composable authorization layers using Elysia's derive() and scoped middleware — replacing a monolithic auth check with elegant derive chains that narrow permissions at every step.

January 25, 2026 18 min read
Read Story →
Architecture

Your SaaS Handles Money With a Balance Column. That's Why Your Numbers Don't Add Up at 2 AM.

How I built NostroLedger — a double-entry accounting system inside PostgreSQL that tracks every cent flowing through a real-time mentoring platform, and why 700-year-old bookkeeping principles will save your startup.

January 24, 2026 9 min read
Read Story →
Architecture

Every User Gets Their Own Database. The Billing Architecture That Shouldn't Work — But Outperforms Everything.

How Vibe gives every user their own bank.sqlite for credits, holds, and transactions — the hold/confirm/release pattern, 5-minute TTL self-healing, and why database-per-user scales better than you think.

January 22, 2026 11 min read
Read Story →
Architecture

Our Entire SaaS Is One 13,870-Line File. We Tried Splitting It. We Put It Back.

The case for keeping a micro-SaaS as a single Elysia.js monolith — where the seams are, why we reverted the extraction, and why premature decomposition is the root of all evil.

January 20, 2026 9 min read
Read Story →
Architecture

We Use Subdomains as Security Boundaries. No Kubernetes. No Containers. Just Directories.

Inside Vibe's multi-tenancy architecture where every user's micro-app gets its own subdomain, filesystem, derived secret key, and SQLite database — all on a single server process.

January 19, 2026 8 min read
Read Story →
Runtime

We Built a 340-Line Static Site Generator That Made Next.js Irrelevant. It Renders 480 Pages in 650ms.

How mentoring.oakoliver.com generates 40 locales × 12 routes at server startup using React 19, hydrates with React Query, and why we'll never go back to a framework for this.

January 17, 2026 9 min read
Read Story →