I’m in the process of designing a database-per-tenant application. The user story is following:
- The user registers on a welcome page
- My app creates a separate database/authentication environment
- The user has their own user.app.com subdomain where they can add
their own resources and users. Basically, their own dashboard.
How to achieve that?
- An ‘admin’ app that would contain a landing page and a registration
service that would spin up entirely separate instances of the
‘product app’ - An all-in-one app that would contain the ‘admin’ and ‘product’ parts
and would have a connection to the admin and multiple product
instance databases
I don’t know how to tackle this. I like the first idea as it would mean one deployment and less hassle with updating/maintenance. Either way, how could I handle everything programatically? I tried experimenting with Supabase but I couldn’t find a way to create a new environment (project) and retrieve the connection strings/secrets other than manually.
New contributor