null.multi-domain.learnjs.eu.org
π TanStack Start Multi-Tenant Template
Just converted Vercel's Next.js platforms example to TanStack Start! Features custom subdomain routing, Redis storage, and admin interface for managing tenants.
π Live Demo: https://multi-domain.learnjs.eu.org π Repo: https://github.com/xiaoyu2er/tanstack-platforms
null.multi-domain.learnjs.eu.org
Subdomain page for null.multi-domain.learnjs.eu.org
GitHub
GitHub - xiaoyu2er/tanstack-platforms: A full-stack TanStack start ...
A full-stack TanStack start app with multi-tenancy deployed on vercel. - xiaoyu2er/tanstack-platforms
7 Replies
wise-whiteβ’3mo ago
wow
is there anything you would have wished for in start/router to make this easier?
ambitious-aquaβ’3mo ago
YesοΌthe Nextjs.rewrite function
wise-whiteβ’3mo ago
i knew it π
we still need to figure out how to build this in a typesafe way
and also how to handle the reverse direction, when it comes to link building
probably not an issue when you do subdomains only
but if you rewrite paths, links are affected
ambitious-aquaβ’3mo ago
right now, i use loader, so i can know it's the domain or subdomain, and i can conditionally render different components.
this is not very elegant, especially for route related configs like meta,
do need a framework level support
wise-whiteβ’3mo ago
so we have this thread here https://github.com/TanStack/router/discussions/3188
GitHub
RFC - URL Rewriting Β· TanStack router Β· Discussion #3188
Flexible rewrites similar to NextJS' NextResponse.rewrite which helps many SaaS developers offer multi tenant and dynamic platforms. The goal is to provide developers with a powerful tool to dy...
wise-whiteβ’3mo ago
would love to get your feedback in there
and of course, if you are interested in implementing, any contribution is welcome
ambitious-aquaβ’3mo ago
will take a look