Feedback for my infrastructure needed!

I'm trying to understand best practices for creating one infrastructure for my startup. Would like some feedback! I want to have one single backend for all my business logic and have the possibility to have multiple frontends for different apps like so:
5 Replies
GBianchi
GBianchi11mo ago
Can anyone comment on this infrastructure? Is this to scale a large company with multiple (more than 8 apps) with the same backend?
Kyle
Kyle11mo ago
I don't see any inherent issues with it I mean you can kind of "kick out" the shared utils part of the whole infrastructure conversation since it won't actually affect any sort of requests or responses. What matters most is the main backend and clients relationship
GBianchi
GBianchi11mo ago
Yes! thank you @Kyle . The shared utils doesn't matter too much here, just wanted to ellaborate how I'm doing it. In order to do this, I had to enable CORS in my trpc route. Are you familiar with that? I am concerned a bit about security implications. Both with CORS, and also with the fact that I have one single Backend that has all of my business logic. Does the fact that my backend with all of my business logic has exposes apis to all users imply that there could be vulnerability issues with it?
Kyle
Kyle11mo ago
I am not sure about CORS with TRPC and how it all works, but I don't see any issue with your backend's idea as long as you do CORS correctly and implement correct security measures to ensure that you don't allow foreign requests. I don't have much experience with anything of those sorts so I'm not the best ask, unfortunately.
GBianchi
GBianchi11mo ago
Thank you! I'm guessing I cannot get features like ISR or SSR using this structure? On my interface webapps :/
Want results from more Discord servers?
Add your server
More Posts