A production-ready, hostname-based multi-tenant application built with TanStack Start and React. Demonstrates full-stack architecture for SaaS platforms serving multiple tenants from a single codebase.
- Hostname-based Tenant Resolution – Automatically identify tenants from request hostname
- Server-Side Rendering (SSR) – Tenant configuration loaded during request lifecycle
- Type-Safe – Full TypeScript support with router context typing
- Scalable Architecture – Tenant data injected into router context before hydration
- TanStack Start – Full-stack framework with server functions
- TanStack Router – Type-safe routing with context
- React – UI component framework
- TypeScript – Type safety & developer experience
- Vite – Lightning-fast build tool
Request → Hostname Resolution → Tenant Lookup → Router Context → SSR → Hydrated App
Each tenant receives isolated:
- Branding & metadata
- Logo & favicon
- Configuration
pnpm install
pnpm devVisit tenant-1.com.localhost:3000 and tenant-2.com.localhost:3000 to see different tenant branding.
See TUTORIAL.md for complete implementation guide.
✓ Full-Stack Development (Server + Client)
✓ Multi-Tenant Architecture
✓ Server Functions & SSR
✓ Type-Safe Router Context
✓ Express-like Request Handling

