Data Pipeline

M
Written By Melih SünbülLast updated 5 months ago

Every piece of data in a Lex App application passes through a pipeline: it enters the system, gets validated, and is organized for consumption. The building blocks in this section control how that flow works.

flowchart LR
    A["Data arrives
    (API, CSV, UI)"] --> B["Serializer
    validates fields"]
    B --> C["Lifecycle Hook
    processes on save"]
    C --> D["Model Structure
    organizes in UI"]
    E["Initial Data
    (JSON seed files)"] --> C

Building Blocks

Initial Data Upload

Seed your database from structured JSON files on server start. Define create, update, and delete actions with foreign key references — the framework loads them automatically when all referenced models are empty.

Serializers

Custom Django REST Framework serializers that validate incoming data at the API layer. Define field-level rules, cross-field constraints, and multiple views of the same model.

Lifecycle Hooks

React to model events — creation, update, deletion — with explicit django-lifecycle decorators. Process uploaded files, trigger side effects, and enforce validation rules.

Model Structure

Control how models appear in the frontend sidebar. Group models into categories, customize display names, and hide internal models from end users.

Was this helpful?

Your feedback shapes what we write next.