Node/React MVC architecture : questions and doubts


I have some architectural questions and doubts after executing the MVC excercise (expense tracker).

(1) I see that 1 projectfolder hosts 1 ‘application set’: the React frontend view server is just a subfolder. Would it not be better -in a real live scenario- that the view react application is just a project on its own and which does nothing else then calling api’s from other backend domains/servers (domain driven design). It feels that this loose coupling between a consuming react app and delivering producer domain REST servers gets all mixed-up when you start to cluster both frontend and backend together into 1 project. Or is this just for educational purpose?

(2) Under the ‘controller’ concept I personally envisioned certain controlling code that runs on behalve of the usecase orchestrator (being the frontend react application) that validates and correlates data coming from different REST api servers from mulitple domains (each hosting different domain resources). But here in this example it feels that the controller is moved to the backend project. I even see that the view FORM handling (validating fields) is mentioned as part of the backend (so within the REST api ??)

(3) I thought that REST endpoints should be resource and noun oriented, but I see in the example a lot of strange api’s: some of them have verbs ( /api/expense/create) and others have strange ‘list’ URI qualifiers ('/api/expense/list/${selectDate}`). In this last api I even see that a date is passed as a URI qualifier why I would think that the date should be given as a normal query parameter to the GET ‘expense’ resource URI.

(4) I was dissapointed in discovering that the MODEL folder is just an empty concept in this example: only the pool is created over there and there is also an SQL file with some helper SQL scripts. I would have expected that the data(base) access-functions (SQL) would be residing within this model folder/concept. But surprisingly enough I found the datalayer functions… within the controller folder/concept ??.

I hope some of the experienced fullstack developers can given their thoughts on my observations and share their opinion.

This would be well appreciated.

Thank you,
Johan (Belgium)