How to set up subdomain-based multi-tenancy with Next.js, Supabase (DB/Auth), and next-intl? #84461
Unanswered
BertVanHecke
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I’m trying to build a multi-tenant platform similar to how Sentry works, where the root domain (e.g. https://sentry.io/en) serves the marketing site, and each tenant has its own localised subdomain (e.g. https://acme.sentry.io/en).
My stack is:
I’ve experimented locally and can get subdomains to resolve, but I’m not confident that the approach I took is secure or production-ready.
Has anyone successfully implemented this setup? Are there recommended patterns, examples, or best practices for combining custom subdomains, Supabase Auth/DB, and next-intl in a Next.js app?
My current folder structure looks like this:
For my middleware i have:
and
Thanks guys!
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions