Describe the problem
First of all, great job on SvelteKit! It encourages me to build more. More advanced, too. I am looking to build a SaaS solution. Users sign up, they will be provided with dedicated subdomain where their app will live. Nothing uncommon.
However, I want to provide customer with option to select a template for their 'portfolio'. I am not sure how to approach this problem.
Describe the proposed solution
a) Create a separate SvelteKit app for each portfolio and use some middleware-app-something to point particular sub-domain or custom-domain towards proper theme/app.
b) Use one monolyth SvelteKit app that will contain all of the themes under one hood. E.g.:
/src/routes/theme1/index.svelte
/src/routes/theme2/index.svelte
...and so on
Inject some kind of middleware to rewrite routes? I'm just brainstorming here. I guess that's something next.js is doing here:
https://github.com/vercel/examples/tree/main/edge-functions/hostname-rewrites
Alternatives considered
Alternativelly there's option to write custom adpter? My biggest issue is to determine which option would be the best approach to address this issue.
Importance
would make my life easier
Additional Information
No response
Describe the problem
First of all, great job on SvelteKit! It encourages me to build more. More advanced, too. I am looking to build a SaaS solution. Users sign up, they will be provided with dedicated subdomain where their app will live. Nothing uncommon.
However, I want to provide customer with option to select a template for their 'portfolio'. I am not sure how to approach this problem.
Describe the proposed solution
a) Create a separate SvelteKit app for each portfolio and use some middleware-app-something to point particular sub-domain or custom-domain towards proper theme/app.
b) Use one monolyth SvelteKit app that will contain all of the themes under one hood. E.g.:
Inject some kind of middleware to rewrite routes? I'm just brainstorming here. I guess that's something next.js is doing here:
https://github.com/vercel/examples/tree/main/edge-functions/hostname-rewrites
Alternatives considered
Alternativelly there's option to write custom adpter? My biggest issue is to determine which option would be the best approach to address this issue.
Importance
would make my life easier
Additional Information
No response