Designing multi tenant app
Unanswered
Sphecid wasp posted this in #help-forum
Sphecid waspOP
I decided to try this multi tenant approach for upcoming project. The idea is to have one main site and multiple landings hosted in one app behind nginx. Intended folder structure is below. Most likely every page will be static/isr
With that I have few questions:
1. How should middleware file look like?
2. Is there something that can be improved in this design?
3. How much system resources it will consume or what specs of vps should I aim for?
4. Will it still work as fast as multiple individual apps would?
5. Will there be some unexpected difficulties with api and/or server actions?
6. If I want to specify global.css file for each site, will it work?
7. What about shared styles from app/styles folder? Will they work? And what url they will have when accessed from different domains?
With that I have few questions:
1. How should middleware file look like?
2. Is there something that can be improved in this design?
3. How much system resources it will consume or what specs of vps should I aim for?
4. Will it still work as fast as multiple individual apps would?
5. Will there be some unexpected difficulties with api and/or server actions?
6. If I want to specify global.css file for each site, will it work?
7. What about shared styles from app/styles folder? Will they work? And what url they will have when accessed from different domains?
styles/
|-variables.css
app/
|-main-domain.net/
|-|-global.css
|-|-layout.js
|-|-page.js
|-|-subroutes/
|-domain1.net/
|-|-global.css
|-|-layout.js
|-|-page.js
|-|-subroutes/
|-domain2.net/
|-|-global.css
|-|-layout.js
|-|-page.js
|-|-subroutes/ user enters nginx proxies and rewrites
domain1.net/abc?def=xyz -> localhost:3000/domain1.net/abc?def=xyz