The IRIS coarse-grained architecture can be understood by looking at the docker-compose.yml file. The main elements are:
This section explains how the code is organized within the major namespaces. They reflect the layered architecture of the IRIS backend:
The IRIS backend is a Flask application.
This is the public API of the app. It contains all the endpoints: REST, GraphQL, Flask templates (pages and modals).
The requests payloads are converted to business objects from models and passed down to calls into the business layer.
Enforcing the permissions, i.e. checking a user is allowed to perform an action, is done in this layer.
Forbidden imports in this layer:
from app.datamgmt, as everything should go through the business layer firstfrom sqlalchemyThis is where processing happens. The methods should exclusively manipulate business objects from the models namespace.
Forbidden imports in this layer:
from app import db, as the business layer should not take case of persistence details but rather delegate to the
datamgmt layerThis layer handles persistence. It should be the only layer with knowledge of the database engine.
Forbidden imports in this layer:
from app.business, as the business layer should call the persistence layer (not the other way around)The description of all objects handled by IRIS business layer and persisted through datamgt.
This namespace takes care of the database migration.