lapuerta
lapuerta
TTCTheo's Typesafe Cult
Created by lapuerta on 9/20/2023 in #questions
Using NextJS as backend for a mobile app
If you use next as your web frontend and backend and suddenly want to create a mobile app, I guess the options are to either use the next endpoints as the API for the mobile app or to create another API server in rails/fastapi/express/whatever. Let's say we decide to use NextJS as the backend for our mobile app aswell. This feels odd, but maybe it isn't lol. Like, architecturally it feels much cleaner to not have the web frontend (which is now just one of our frontends) coupled to the API layer. Because our other frontend is not coupled to the API layer, and from the API's perspective there shouldn't be any difference between these two frontends? What do you think? If you use NextJS as your frontend and backend , I guess you either have to do this or maintain two different APIs later (one for web, one for mobile). EDIT: Thought some more about, I feel like there is no way the pros outweigh the cons if your backend is somewhat complex. Will use Next for the front, but not for the back
5 replies