The folder`s organization are according to the MVC (Model-View-Controller) model, which separates in three main layers. In the project architecture, it was separated into:
1 - Service, which contains all the data manipulation logic.
2 - Views: Contains the files that are responsible for the user interface.
3 - Controllers:Manage the user requests, activating the necessary services and providing the appropriate responses.
1./Controllers Contains the files that process HTTP requests and interact with services.Example: “proceduresController” interacts with “proceduresService”.
/Services Contains the logic, such as database searches, and
Indirectly interacts with the database by calling “Models”.
Example: “proceduresService” contains the logic for registering, searching, and modifying procedures in software processes, interacts with the database through Models, and creates functions for inserting, searching and modifying data.
/Views Contains the user interface templates (HTML, CSS and JS).
Example: activity.js contains Javascript functions that make the page “activity”dynamic and collect and processes data to send to the back-end.
/routes Defines application routes and directs requests to controllers.
Example: routesActivity.js maps to activityController.js.
server.js file Configures the Express server, loads the routes and starts the application.