Get AI summaries of any video or article — Sign up free
Breaking down my current tech stack thumbnail

Breaking down my current tech stack

Theo - t3․gg·
6 min read

Based on Theo - t3․gg's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Convex has replaced most of the SQL + tRPC + React Query data/API flow, with tRPC retained mainly for gaps outside Convex’s capabilities.

Briefing

The core takeaway is that a modern TypeScript web stack is no longer a fixed “T3 stack” recipe—it’s a modular set of choices optimized for where static vs dynamic rendering happens, how much logic runs on the platform, and how aggressively teams want to avoid dashboard-driven configuration. After years built on the T3 stack, the current setup shifts away from SQL + tRPC-centric data access toward a Convex-first approach, while also rethinking the surrounding layers (auth, payments, analytics, security, and hosting) to reduce operational friction and keep code as the source of truth.

A major pivot is the database/API layer. Instead of PlanetScale + Prisma/Drizzle, then tRPC endpoints, plus separate live-update tooling and React Query, the stack now routes most data and API behavior through Convex. That means using Convex’s built-in useQuery/useMutation patterns and leaning on Convex’s optimistic update path for a smoother client experience. When something falls outside Convex’s model, tRPC still appears as a fallback, but it’s increasingly rare.

The “O layer” (auth) is handled differently depending on whether the goal is speed or enterprise readiness. For most projects, Clerk is the default because it bundles the practical pieces—sign-in, subscription-related flows, and user-facing UI components—so teams can get back to building. Work OS is positioned for enterprise sales where SAML/Octa-style integrations matter and where an admin portal becomes a requirement. A third option, Better Auth, is treated as a promising open-source-oriented path that can attach to an existing database, but without Convex-like hosting it shifts integration work back onto the developer.

Hosting and rendering choices also drive the stack’s shape. React remains the client foundation largely because the ecosystem—libraries, bundlers, tooling, and AI coding agents—still aligns around it. For the framework layer, the decision is framed less as “which init command” and more as “which router and rendering strategy.” Next.js is recommended when static pages and SEO matter (including patterns like a static marketing homepage plus a dynamic app), while Vite is favored for simpler apps where a static landing page isn’t critical. TanStack Start is watched as an emerging option, and React Router remains the practical routing layer in the Vite world.

On infrastructure, the stack stays on Vercel for preview environments and “fluid compute,” which the creator credits with cutting costs dramatically for long-running, low-compute workloads like AI inference. Cloudflare is acknowledged as strong for certain compute-wait patterns, but the integration friction—especially around Node compatibility and deployment complexity—pushes the choice back toward Vercel for full-stack apps.

Security and observability round out the picture. Bot protection is treated as distinct from DDoS protection, with the stack using Bot ID on Vercel and Arcjet as another programmable security layer option (rate limiting, bot detection, email validation, and token buckets). Analytics is split by purpose: PostHog for product analytics (feature flags, session replay) and Plausible for web analytics when sign-in isn’t available. Payments are anchored on Stripe, but the implementation philosophy is to keep payment state out of the application DB—using KV storage for subscription status and syncing via webhooks—while also evaluating newer abstractions like Autumn and Polar to reduce webhook and state-management pain.

Overall, the stack’s evolution is less about chasing new tools and more about enforcing modularity: swap components as needs change, keep behaviors in code, and minimize reliance on external dashboards that can drift from the repo. The result is a setup that’s “weird” compared with the original T3 approach, but designed to work smoothly with modern development workflows and AI-assisted coding.

Cornell Notes

The stack has shifted from a classic T3-style “SQL + Prisma/Drizzle + tRPC + React Query” flow to a Convex-first model where data access and API behavior live inside Convex. That change reduces glue code and leverages Convex’s optimistic updates and query/mutation primitives, with tRPC kept mainly as a fallback. Framework choices are driven by rendering needs: Next.js for static/SEO-friendly pages and mixed static+dynamic setups, Vite for simpler apps, and TanStack Start watched as it matures. Auth and payments follow a similar philosophy: Clerk for fast default auth/subscriptions, Work OS for enterprise SSO requirements, and Stripe as the payment backbone while keeping payment state out of the main application DB. The overarching goal is modularity and “code as the source of truth,” avoiding dashboard-driven configuration where possible.

What changed most in the data/API layer, and why does it matter for day-to-day development?

The creator moved away from PlanetScale (accessed via Prisma or Drizzle) plus tRPC endpoints and React Query, and instead routes most data/API behavior through Convex. They still use tRPC only when something isn’t in Convex’s layer. The practical benefit is that Convex provides useQuery/useMutation patterns and an optimistic update path that improves perceived responsiveness without building as much custom plumbing. It also centralizes behavior in code/config that lives in the repo (Convex folder), reducing the need to manage separate endpoint definitions and client cache coordination.

How does the stack decide between Next.js, Vite, and TanStack Start?

The decision is framed around rendering and routing strategy rather than tooling preference. If static pages and SEO matter—like a marketing homepage that should remain an HTML file—Next.js is recommended. If static pages aren’t needed (e.g., sandbox/side projects), Vite is favored because it’s small and simple. TanStack Start is treated as an emerging option, but the routing layer still maps to React Router in the Vite ecosystem. The creator also describes a common pattern: keep a static homepage separate from a dynamic app (sometimes on different domains/subpaths), or use Next.js to handle both in one project.

Why is the auth layer split between Clerk and Work OS, and where does Better Auth fit?

Clerk is the default when the goal is to get auth working quickly with the niceties teams need—organization management, subscriptions/payments handling, and user-facing UI components—so developers can focus on the app. Work OS is recommended when selling to enterprises where SAML/Octa-style integrations and admin portal workflows are required. Better Auth (Better Off in the transcript) is positioned as a promising open-source-oriented approach that attaches to an existing database and works across many frameworks, but because it lacks a hosted platform, integration work becomes the developer’s responsibility—especially when pairing it with hosted platforms like Convex.

What’s the hosting logic behind staying on Vercel instead of Cloudflare?

Vercel is chosen for preview environments and fluid compute for serverless workloads that wait on external responses (like AI inference). The creator argues Cloudflare’s model can be cost-effective for long-duration, low-compute requests, but integration friction is high for full-stack apps—especially around Node compatibility and deployment complexity (including environment variable behavior and asset/API routing conflicts). They also cite a major cost reduction after fluid compute, claiming T3 chat bills dropped by about 90%, making Vercel the practical default.

How does the stack approach payments without polluting the main application database?

Stripe remains the payment backbone, but payment state is intentionally kept out of Convex’s application DB. Subscription status and related payment state live in a KV store, updated via Stripe webhooks and lazily checked/filled when needed by user requests. The creator emphasizes reading Stripe’s recommendations to avoid webhook edge cases and warns that payment state management is easy to get wrong. They also evaluate abstractions like Autumn and Polar to reduce webhook/state complexity, but still treat Stripe as the underlying system.

What’s the distinction between bot protection and DDoS protection, and which tools match each need?

DDoS protection is about blocking surges of fake traffic before application code runs; bot protection verifies whether a requester is human once code is hit to prevent automated abuse of expensive endpoints. The creator notes that Vercel’s firewall is better for DOS protection, while bot protection is handled via Bot ID on Vercel (and Arcjet as another programmable option). For T3 chat, bot checks are applied selectively—especially around expensive operations like message generation—rather than on every endpoint.

Review Questions

  1. Which parts of the original T3 stack are still used as fallbacks, and which parts were replaced by Convex?
  2. What rendering requirement would push you toward Next.js instead of Vite in this stack philosophy?
  3. How does the stack keep payment-related data from becoming application data, and what mechanism keeps it synchronized?

Key Points

  1. 1

    Convex has replaced most of the SQL + tRPC + React Query data/API flow, with tRPC retained mainly for gaps outside Convex’s capabilities.

  2. 2

    Framework selection is driven by static/SEO needs: Next.js for static pages and mixed static+dynamic apps; Vite for simpler apps without heavy SEO requirements.

  3. 3

    Auth defaults to Clerk for fast implementation, while Work OS targets enterprise SSO/admin portal requirements; Better Auth is promising but shifts integration work onto the developer due to lack of a hosted platform.

  4. 4

    Vercel is favored over Cloudflare for full-stack DX (preview environments, fluid compute) despite Cloudflare’s potential cost advantages for long-running, low-compute requests.

  5. 5

    Payments stay anchored on Stripe, but subscription/payment state is stored in KV and synced via webhooks to avoid mixing payment concerns into the main application DB.

  6. 6

    Bot protection is applied to expensive endpoints (like message generation) and treated separately from DDoS protection; Bot ID and Arcjet are positioned as practical solutions.

  7. 7

    The stack’s guiding principle is modularity and “code as the source of truth,” minimizing dashboard-driven configuration that can drift from the repo.

Highlights

Convex-first data access replaces PlanetScale + Prisma/Drizzle + tRPC + React Query for most use cases, largely because Convex’s optimistic updates and query/mutation model reduce glue code.
Next.js is recommended when static HTML pages and SEO matter; Vite is recommended when you don’t need a statically rendered homepage.
Vercel’s fluid compute is credited with a major cost drop for long-running AI inference workloads, making it the practical default despite Cloudflare’s strengths.
Clerk is positioned as the fastest auth path for most apps, while Work OS targets enterprise buyers needing SAML/Octa-style integrations.
Bot ID is framed as a simpler integration than older capture-style solutions, with route-level protection handled through configuration and a verification step.

Topics

  • Tech Stack Breakdown
  • Convex Data Layer
  • Next.js vs Vite
  • Auth and Payments
  • Security and Analytics

Mentioned