WHY-I COURSE GUIDE

Why I Moved Away from SQL

A chapter-by-chapter readback of the free course by Theo Browne (Theo - t3․gg) on Theo - t3․gg.

Length1:37:14
Chapters20
Modules6
Plain Markdown with clickable timestamps — drops into Obsidian, Notion or GitHub as-is.

This is not a generic database comparison — it is Theo's personal, four-year arc from coining the T3 stack to rewiring T3 Chat (a trillion-tokens-a-month product) around Convex. Its unique value is the founder-level detail: pricing, cache hit rates, lock-in analysis and where Convex genuinely fails.

Who it's for
Read this guide if
  • You use or are evaluating Convex and want an honest, unsponsored assessment from a production user
  • You maintain a TypeScript full-stack app and question whether SQL + an ORM is still the right primitive
  • You've tried AI app builders like Bolt or Lovable and hit walls around auth and file uploads
  • You care about vendor lock-in frameworks — self-hosting, exit cost, and data portability
Skip ahead if
  • Your stack is not TypeScript (Theo is explicit: Convex is only for TypeScript developers)
  • You need multiple backends or data teams querying the same application database
  • You want a tutorial-style setup guide rather than a first-person architecture war story
In brief
  • Runs 5834 seconds (~97 minutes), broken into 20 chapters across 6 chronological modules.
  • Tools covered: Convex, TRPC, React Query, Drizzle, PlanetScale, Redis, Dexie, Astro, Vercel.
  • Level: intermediate to advanced — assumes comfort with TypeScript, React and backend architecture.
  • Grounded in a real production migration: T3 Chat rewrote its entire data layer around Convex.
  • Includes a cost breakdown: ~$600/month for Convex vs. $800/month each for Vercel and PlanetScale.

The walkthrough

Each chapter below is our original written explanation of what happens at that moment in the video — a paraphrase, not a transcript. Click any timestamp to jump the player.

From Skeptic to T3 Stack

Theo traces how his discomfort with backend boilerplate during ping.gg led to the useBackend proposal, then to TRPC and the T3 stack. His three non-negotiables — modularity, full-stack type safety, single source of truth — are the lens through which he later judges Convex.

0:00

Introduction

Theo introduces the video's subject: Convex, now his database, backend and sync engine of choice for T3 Chat and nearly every new project. He admits he initially wrote it off as a product for toy apps after visiting their office in 2021. He is careful to disclose that while Convex has sponsored the channel, this particular video is deliberately unsponsored so the assessment stays unbiased. Along the way he drops scale context, noting his React codebase contains 593,962 lines of code. The chapter frames the central question: what changed between 2021 dismissal and full adoption?

7:36

The useBackend Proposal

In July 2021, while building ping.gg on React, Vite and React Query, Theo wrote a proposal for simpler backend code. His 'useBackend' idea: write backend functions inline in React components, and at compile time split them into generated endpoints, swap in a useQuery call, and auto-generate server-rendering props. He argued this would buy type safety, composability and performance without boilerplate. He even floated the idea on a Twitter Space with Tanner Lindsley, creator of React Query, back when he had roughly 200 followers — long before he was a content creator.

11:05

TRPC vs. Blitz

Following the Twitter Space, Tanner pointed Theo toward two projects similar to his proposal: Blitz and TRPC. TRPC's setup was rough at the time, so he tried Blitz first — a Rails-inspired all-in-one framework forking Next.js covering auth, database and pipelines. Theo disliked its rigidity: it was impossible to adopt incrementally, the opposite of the modular LAMP/MEAN/MERN tradition he loved. TRPC won him over instead: write a backend function, call it from the frontend with types instantly in sync. He describes how it struck others as 'Firebase but TypeScript'.

16:15

The T3 Stack and Its Principles

Rewriting a project for Jacob Evans — collapsing roughly 8,000 lines of Firebase code into about 500 lines with Tailwind, Next.js, TypeScript and TRPC — cemented Theo's conviction and led to coining the 'T3 stack' in November 2021 (T3 = the letters after T in Theo, not Tailwind/TypeScript/TRPC). His first video, posted November 30, 2021, now has 285,000 plays. He lays out his principles: Linux-style modularity, full-stack type safety, and single source of truth — each piece of data described in exactly one place.

First Impressions of Convex and the Sponsorship Reset

Theo's early verdict on Convex — 'Blitz as a closed-source startup' — begins to crack when Tanner Lindsley, whom he deeply respects, vouches for the team. Interwoven is the business context: the Vercel sponsorship breakup that nearly cost him his editor, and the new ad model that let him take a chance on Convex.

18:33

Skepticism, Then Tanner's Endorsement

Invited to a Convex office talk, Theo heard an employee named Tom admit the SDK's design was inspired by TRPC — yet his takeaway was still negative: Convex sounded like Blitz as a closed-source startup, with lock-in and no open-source contribution. The turning point came around June 2024 when Tanner Lindsley, after visiting the Convex office, told him: 'Those guys are special, they really know what they are doing.' Coming from a developer Theo describes as exceptionally thorough — someone who abandons ideas rather than ship substandard ones — that praise forced a re-evaluation.

23:45

The Sponsorship Model Rebuild

Theo explains the business backdrop: he lost money on YouTube for his first three years, and his old model — taking sponsorship only from products he already used, with no clear ad boundaries — damaged his reputation. He and Vercel mutually ended their deal in September 2024, and ending it nearly forced him to fire his full-time editor and channel manager. The new model, a clearly delimited one-to-two-minute ad per video from brands like Infinite Red and Frontend Masters, proved far more profitable. Companies can pay only for ad airtime, never for discussion inside regular content.

Convex as Infra-as-Just-Code

Through direct consulting with the team, Theo discovers Convex is fully open source, with CEO Jamie personally keeping it deployable. The structural insight — everything lives in code, one Convex folder, zero dashboards — reframes it as the only true infra-as-code platform, and uniquely suited to AI.

30:42

Open Source and Heavy Unpaid Consulting

Theo reveals that his sponsorships involve substantial unpaid consulting — onboarding help, homepage copy, YouTube marketing advice — and Convex was the most receptive brand he has worked with. He also dismantles his own 'closed-source' assumption: Convex is fully open sourced, and CEO Jamie spends weekends deploying it on Railway for fun. Theo's policy is that sponsors pay for airtime but he writes his own content and won't take a deal he can't honestly recommend. A concrete example: he convinced Convex to change their homepage copy from 'the missing half of your React app' to emphasizing it handles everything below React.

32:03

The Turning Point: True Infra-as-Code

The structural breakthrough for Theo was how Convex apps are organized: schema, auth config, file uploads and queries all live in one Convex folder, and data access requires explicit query files rather than raw database strings. This made him see Convex as the only genuine infra-as-code platform — no dashboard time, fully portable code with zero configuration. He contrasts this with competitors that bolt infra-as-code onto config files in the style of Terraform. Everything, he notes, is just TypeScript: no XML-style config, no CLI ceremony.

36:14

React for Your Backend

Theo offers his spiciest framing: Convex is 'React for your backend' — an alternative set of primitives, not a superset like TypeScript. The distinction matters: React hits your APIs, while Convex is the APIs; and unlike React, Convex cannot be adopted incrementally. He connects this to AI tooling: AI builders like Bolt and V0 excel at UI scaffolding because React centralizes concerns, but they fail to set up auth over 75% of the time and file uploads mean picking among roughly 15 services. Since LLMs write code well but handle dashboards and IAM configuration badly, a platform that is only code is exactly what AI needs.

Chef and the Live Demos

Theo demos Chef, an AI app builder built on Convex and partially powered by open-sourced Bolt, and shows the moment that converted him: editing the database and watching the UI update instantly with no refresh. He then crystallizes the analogy — Convex did for his backend what React did to the jQuery era.

40:22

Chef, the Convex AI App Builder

In March 2025, Theo messaged Jamie about building an AI app builder on Convex and learned four companies were already doing so. The result was Chef, partially powered by open-sourced Bolt, which builds apps from scratch on Convex. Unlike flashier tools, Chef's output isn't pretty but actually works — Theo demos a Slack clone from the default prompt with channels, a message panel, working auth and real-time messages appearing across chats. He ties this back to the earlier point: Convex being pure TypeScript means AI can generate auth, uploads and data access in one coherent system.

42:02

The 'Holy Shit' Moment

Theo describes his conversion moment: editing data directly in the embedded Convex dashboard database tab and watching the UI update instantly, with no desync and no refresh. He repeats the demo in his actual T3 Chat dev environment, a Next.js plus Convex app, renaming thread data from 'oranges' to 'grapes' to 'apples' and seeing changes propagate immediately. He argues this removes enormous mental overhead around keeping client state synced, and that to non-developers this is simply how data changes should always behave. This live consistency is what convinced him Convex understood something his previous stacks never did.

45:46

Convex Is to Backend What React Is to Frontend

Theo draws his central analogy: React eliminated the jQuery-era pain of manually checking whether elements existed before updating them; Convex eliminates the backend pain of keeping clients and data in sync. He insists Convex is not a Firebase-style all-in-one with a weak SDK hitting the database directly — it is a different set of better primitives. Just as React replaced getElementById with components, Convex replaces database migrations and IAM roles with TypeScript. As a former server-components advocate, he finds the philosophy familiar: the app becomes a pipe from data to UX rather than state stuffed into every step.

Rewriting T3 Chat on Convex

Theo explains why every existing sync engine failed him — none can stream tokenized LLM output through a database at a trillion tokens per month — and how reframing token display as an optimistic update unlocked the design. The result: he rewrote all of T3 Chat on Convex, with over 98% of queries hitting cache.

49:25

Why Every Sync Engine Failed

Theo wanted local-first performance for T3 Chat and built his own sync engine, learning that Dexie is good but IndexedDB underneath is, in his words, 'utter garbage'. He was among the first companies to try deploying Zero, and examined TinyBase and Legend State — nothing worked in reality. His conclusion: 'local-first' means something different to everyone, so no single solution can serve all cases; Figma and Linear both do local-first plus sync but could never share primitives. Notably, Convex declined to support local-first, calling it a chaotic rabbit hole — which he calls the right decision.

51:06

The Token Streaming Problem

Theo's ideal design: LLM tokens generated server-side stream through the database to the chat UI in one pipe. But sync engines resend full documents rather than deltas, so this only works if each token is stored as its own row. T3 Chat processes a minimum of a trillion tokens per month, making trillions of rows infeasible. He bluntly says sync engine companies claiming to handle streaming tokenized data 'are lying to you and you should run'. When he raised this with Convex, Jamie honestly acknowledged the limitation and pointed to a year-old article about planned solutions — honesty that itself shaped Theo's next realization.

54:01

The Optimistic Update Insight and Redis Layer

The realization: showing tokens as they arrive is just an optimistic update. What actually matters is the completed message landing in the database — treat the live stream as optimistic (show it if available, wait otherwise) and the problem collapses. For implementation, Theo wraps this layer with Redis pub/sub to make chat streams resumable, one of T3 Chat's features he's proudest of. Importantly, the streaming itself doesn't run through Convex: Convex stores threads and messages and assigns a restoration ID, while the stream lives outside it — a deliberate choice of the right primitive for each job.

57:01

Going All In: The Rewrite and the Cache

Theo realized his DIY sync engine was holding the team back — he was the only person who understood it, so nobody else could safely change the data layer. He rewrote all of T3 Chat around Convex, with the Convex team collaborating through a shared Slack channel and reviewing the codebase. He estimates he confidently claimed Convex was broken at least ten times — caching, auth — and was wrong every single time. The payoff: Convex's cache layer is 'incredible', with 98% or more of T3 Chat's queries hitting cache and never touching the database. He is now 'all in' for every TypeScript project.

59:20

Where Convex Isn't the Fit

Theo gives the honest boundary conditions. If your data is only consumed by a TypeScript backend and client, it's hard to justify anything other than Convex. But it stops being the right choice when a separate Go backend team insists on owning everything, when a Rust CLI or other non-TypeScript apps need the database (which usually don't need a database at all), or when multiple teams and applications share one database — since Convex schema definitions live inside the app's codebase, as in T3 Chat's single project. For analytics, he recommends streaming data out to ClickHouse, Axiom or PostHog instead.

Inside the Runtime: Transactions and Type Safety

Examining the demo code, Theo shows why Convex's custom Rust runtime and compiled transactions matter: naive TypeScript comes out atomic and fast, and generated code makes field renames break client types instantly. This end-to-end type safety is the same reason he originally went all in on TRPC.

1:11:04

Type Safety You Can Hover

Theo demos the developer experience: hovering a useQuery result reveals exact types — authorName as string, avatarURL as string or null, IDs and creationTime — and command-clicking jumps straight to the backend function, the 'tRPC magic'. When he renames a field from name to title, the error count in UI code jumps from 2 to 5 without saving or even a running server, because codegen generates pointers to his type definitions rather than copies. Errors surface where they manifest, in the consumer, which helps humans see what breaks and helps AI avoid changing the wrong thing.

1:12:03

A Custom Rust Runtime

Convex functions don't run on Node.js; they run on a minimal custom runtime built in Rust, believed to be V8-based. One subtle benefit: calling new Date multiple times within a single request — say, sending four messages — yields a consistent value for the whole request. More importantly, the runtime doesn't block on each database await; it flattens everything into one transaction. Theo recommends reading Convex's open-source backend on GitHub, which he describes as an ideal sync engine, data layer, ORM toolkit and compiler rolled into one. The backend's Rust core also explains why it runs on PlanetScale.

1:13:57

Atomic Mutations, No Cache Invalidation

Convex compiles queries into both transactions and cache keys: any change to rows affecting a cache key — like adding a message — invalidates it and pushes updates automatically, even for direct dashboard edits. Mutations are atomic: a 20-step mutation failing at step 20 fully rolls back with no partial commits; conceptually, TypeScript acts as a compiler step generating the transaction. In the demo, sending a message uses useMutation with no onSuccess invalidation needed, validators via v.id() ensure invalid IDs never reach handlers, and inserting multiple rows is just a for loop because it's plain TypeScript.

Moment by moment

TimeWhy it matters
7:36The 2021 useBackend proposal — the proto-idea behind both TRPC adoption and Convex's design lineage
19:32Tanner Lindsley's unexpected endorsement: 'Those guys are special'
32:03The turning point: realizing Convex is the only true infra-as-code platform
42:02The 'holy shit' moment: dashboard edits instantly updating the live UI
57:01Going all in: rewriting T3 Chat, with 98%+ cache hit rates as the payoff

Do this next

  1. Clone the Convex backend repository on GitHub and read how the Rust runtime compiles TypeScript into transactions — Theo calls it the ideal sync engine and ORM toolkit.
  2. Try Chef or replicate the demo structure: build a small Slack-like clone with one Convex folder holding schema, queries and auth, then edit rows in the dashboard to watch the UI sync live.
  3. Audit your own app against Theo's lock-in framework: can you self-host, can you stop paying the vendor, and how much code would you throw away to leave? Apply it to your current database and hosting choices.

Common questions

Why did Theo move away from SQL?

He realized he had been shoehorning SQL into his apps for years. Convex isn't an ORM or a thin layer over SQL — it's a different set of TypeScript primitives where database migrations and IAM roles are replaced by code. After rewriting all of T3 Chat on Convex, he now uses it for everything he builds in TypeScript and considers SQL the wrong default for application databases.

Is this video sponsored by Convex?

No. Theo states twice that while Convex has sponsored his channel, this video is deliberately unsponsored. He explains his policy: sponsors pay only for delimited ad airtime, never for discussion inside regular content, and he won't take a sponsor he can't honestly recommend. He also notes Convex didn't request careful framing and welcomes criticism.

Is Convex just another Firebase?

Theo argues it's fundamentally different. Firebase clients hit the database directly and define permissions client-side — a pattern the hacker 'Eva' exploited to compromise hundreds of companies. In Convex, all data access goes through defined server-side queries and mutations; clients cannot query the database arbitrarily. Firebase-style security objections are correct for Firebase but wrong for Convex.

Can Convex scale?

Theo points to production evidence: T3 Chat processes a minimum of a trillion tokens per month, and 98% or more of its queries hit Convex's cache without reading the database. Convex is now built on PlanetScale after Theo pushed for the partnership, and PlanetScale's CEO Sam Lambert was so impressed by the Convex founders — who scaled Dropbox and found performance issues in S3 — that he wished he could hire them.

How does vendor lock-in with Convex work?

Theo distinguishes two lock-in types: provider-specific code (like Gel's own query language) and platforms that provide things you'd otherwise write yourself (like Vercel's middleware). Convex is a bit of both, but mitigates it: it can be self-hosted 'surprisingly easily', data syncs out trivially, and queries can be rewritten in SQL. His three-question framework: can you self-host, can you stop paying, and how much work gets thrown away.

What does Convex cost compared to Theo's previous stack?

He gives concrete numbers: moving off Vercel saves about $800 per month (plus another ~$500 soon), and moving off PlanetScale saves another ~$800. His total Convex cost is around $600 per month for database, sync engine and application layer — which he compares to his Anthropic bill of at least $30,000 per month. His Anthropic bill dwarfs it by 50x.

What are Theo's annoyances with Convex?

He names a few in the demo: the useQuery hook uses a magic 'skip' string argument he dislikes (he prefers a config object like React Query adopted), and it returns data or undefined and throws on error rather than a {data, loading, error} shape. He even prefers Convex's own hooks to its React Query bindings. Despite these, very little code is needed, and no cache invalidation is ever required.

Why can't sync engines handle LLM streaming?

Sync engines resend the full updated document rather than deltas, so streaming tokens through them would require storing each token as a row — infeasible at T3 Chat's scale of a trillion-plus tokens per month. Theo's solution: treat the live token stream as an optimistic update outside Convex (wrapped in Redis pub/sub for resumability), while only completed messages land in the database.

Spot a mistake?

Every summary on this page is hand-checked against the video, but a 97-minute conversation can hide details. If you spot an error in a timestamp, quote or claim, tell us and we'll verify it against the source.

More course guides