Framework
The framework is the runtime. When the product starts, create_splent_app builds one Flask application out of the product and its features, in the order the model gives. You do not run it by hand. Every product calls it.
What it does at boot
- Loads the configuration, in layers. Framework defaults, the product’s
config.py, each feature’s settings, then the environment, each one over the last. - Sets up what features rely on, such as the database, security headers, translations and the template engine.
- Loads the features in the model’s order. For each one it imports the package, registers its routes, models, hooks, services and commands, and applies its refinements to the features it extends.
- Sets up what depends on the features, such as sessions and CSRF protection, and serves.
Each feature migrates its own tables in the shared database, in the same order.
How it relates to the other layers
- Product line. The model decides the load order.
- Features. The framework provides the registries features fill: template hooks, the service locator, signals, assets, the admin panel.
- Product. It reads which features to load from the product’s
pyproject.toml. - Infrastructure. In development it runs under Flask’s server and reloads on changes. In production it runs under gunicorn inside the image.