RemixFast App is made up of external data store, data layer that interacts with data store, route with methods to provide data (loaders) and methods to take actions on that data, and views to visualize the data. From a high point of view, you can think of app is made up of following layers
In most cases, data store is a database that is used to save your application data. Most common method is to use Prisma Schema design data model and migration functionality to keep your data model and database in sync, resulting in a single source of truth.
If you already have a database, RemixFast can introspect it (reverse engineer) and generate Prisma Schema.
Model layer, also referred as data layer, acts as a interface to get you data from data store and to create, update and delete data from data store. It can also have other methods to aggregate data and perform other operations on data store. Keeping model layer separately from your route allows you to localize data store specific functionality in a separate layer, making it easier to test and make changes. If you ever need to change underlying store or functionality used to access that store (Prisma), you will only have to make changes in one place!
Route layer acts as Controller and View, basically VC from MVC architecture. In RemixFast apps, route layer acts as a thin layer for view, majority of view code can be found in
app\views with route layer providing data to the main view. Main function of route layer is to secure access to data, load data as per view inputs (via loader) and perform actions on data. Route layer delegates data operations to the model layer! Route layer includes code (loader and action) to interpret users actions, ensure user has appropriate rights to perform requested action, validate data, harmonize and prepare data, and return results of operations back to view.
RemixFast provides full RBAC implementation and has integrated security throughout application and checks are performed at various stages and both on client and server side (based on configuration). All route loaders and actions have security checks as first operation. Client side actions also have integrated security checks that can be configured so that only users with proper rights have access to operations. RemixFast also provides Admin UI to create custom roles and assign roles to users.
Model definition drives the rest of the application. Model is shared between client and server and has code to perform validation, both when submitting data on client and when taking action on server. This ensure that there is one common place where you preform data validation, with code being shared between client and server. Model also provides helper methods to convert FormData to typed model object as well as methods to convert array of model items from FormData to typed model array, this is used primarily for Editable Table UI.
RemixFast also has Client-Server Workflow functionality that can be used to automate business processes. Workflow are normally made up of series of steps with actions used as trigger to move to next step. In RemixFast, workflow actions can also be used as rights!