I have a scenario where I would like to use NextJS to build an application that would be deployed on a mikrotik router board.
In this case I need to have both backend and frontend served via the Router Board.
I understand, the awesomeness of NextJS and how APIs and FrontEnd code can be shipped from same code base similar to how PHP works.
My question now is it possible for me to generate all codes(Backend and FrontEnd) built via NextJS and deploy all of it locally on any OS of my choice without going through Vercel.
My primary concern is that I do not want any sensitive code being made visible to the user from their Client Browsers. Sensitive codes should only be served from the NextJS Backend Server.
Is this possible?
Thanks in anticipation for your inputs.