~/talk

Architecting Multi-Tenant Solutions with Next.js and the App Router

Talkat CityJS London 2025 · 2025-04-23..04-25· [react, frontend-architecture]
slides:none on file

A production Next.js multi-tenant storefront runs for two years using the App Router, middleware that does a middleware lookup table from incoming domain/custom domain to tenant ID, and route masking via next.config rewrites or middleware. Pages use ISR with a short 1 minute TTL so cached pages regenerate in background, avoiding slow first responses but requiring tenant-scoped cache keys to prevent cross-tenant leaks. Repo and a starter kit exist, observability and per-tenant metrics drive decisions rather than premature optimization.

AI-written summary · about

  1. 0:00Introduction and background
  2. 2:00Multi-tenant architecture overview
  3. 5:53Challenges in multi-tenant apps
  4. 8:43Middleware for tenant identification
  5. 10:46Routing and caching in Next.js
  6. 13:20Danger zone of tenant data leakage
  7. 15:31Dynamic routing for tenant isolation
  8. 16:58Custom domains and URL rewrites
  9. 18:24Starter kits and resources
  10. 19:28Key takeaways and best practices
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.