Create a new environment on CTA

  softwareengineering

I’m in the process of designing a database-per-tenant application. The user story is following:

  1. The user registers on a welcome page
  2. My app creates a separate database/authentication environment
  3. 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?

  1. An ‘admin’ app that would contain a landing page and a registration
    service that would spin up entirely separate instances of the
    ‘product app’
  2. 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

Pramus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT