T
TanStackβ€’3mo ago
wise-white

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
wise-whiteβ€’3mo ago
wow is there anything you would have wished for in start/router to make this easier?
ambitious-aqua
ambitious-aquaβ€’3mo ago
Yes,the Nextjs.rewrite function
wise-white
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
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
wise-whiteβ€’3mo ago
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
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
ambitious-aquaβ€’3mo ago
will take a look

Did you find this page helpful?