I am looking to build a multisite application using angular if possible. The idea is to allow users to generate a new site with their specified subdomain and point their domain to this subdomain. Exactly like WordPress's multisite and domain mapping features.
I have gone as far as building a WordPress theme from Angular 8 and used that to achieve my goal but it feels a bit clunky and I'm not a big fan of WordPress's user management system. I am also using firebase for authentication in two other apps so this would be an extension for those apps.
My question(s): Is this possible using angular?
Could I achieve the desired effect using wp-API and WordPress in headless mode?
Could I simply set up wildcard domains on my host and point all the domains to a single Angular app. Then use angular wildcard route and firebase to direct and load the correct data for that specific domain?
Or am I missing the mark completely..
Thanks in advance for any remarks
What I ended up doing was storing the possible domain names in the DB and used document.write(document.location)
with a DB query to serve the corresponding content. That way whenever someone comes to my SPA from example.com they would get the data that is stored under example.com in the DB. Example2.com gets different data. The end result was exactly what I was looking for and all I had to do was host the site somewhere where wildcard domains were allowed. Done!