Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Model view controller

Brian Evans edited this page May 27, 2021 · 1 revision

Model view controller

The separation and encapsulation of logic.

Model

This logic is split into two parts: async functions that interface with the database or an external API (/interface), and synchronous helper functions(/helpers).

View

The view is the React JSX which renders markup in the users browser. This is stored in the /pages and /components directories.

Controller

The controller allows interaction with the model through API endpoints. This is stored in the /pages/api directory. This manages if the user is logged in, if the request is valid etc.

Clone this wiki locally