psitta

Documentation Index

docs/architecture/overview.md

Purpose

Describe the overall application architecture and the dependency rules between the main building blocks. This diagram provides a macroscopic view of the project; the internal details of each block are covered in the following diagrams.


Diagram

flowchart TD
    %% UI
    UI["UI<br/>Screens / Widgets"]

    %% Application
    APP["Application<br/>Controllers"]

    %% Domain (with internal structure)
    subgraph DOM["Domain"]
        DOM_SESS["<u>Sessions</u>"]
        DOM_EXO["<u>Exercises</u>"]
        DOM_CONTENT["<u>Content</u>"]
        DOM_PROMPT["ExercisePrompt"]
    end

    %% Persistence
    subgraph PERS["Persistence"]
        REPO["Repositories"]
        DB[(SQLite DB)]
        REPO --> DB
    end

    %% Utils (transversal, no explicit dependencies)
    UTILS["Utils<br/>Pure helpers"]

    %% Main dependencies
    UI --> APP
    APP --> DOM
    APP --> PERS


Reading the Diagram

UI

The UI block groups all Flutter screens and widgets. It is solely responsible for rendering and handling user interactions.

Application / Controllers

The Application block is the entry point for application logic. Controllers:

Domain

The Domain groups all business logic of the application. It is intentionally represented as a single block, but structured into conceptual sub-components:

The Domain is independent of all technology (UI, DB, Flutter, SQLite).

Persistence

The Persistence block is responsible for storing and reconstructing Domain data.

SQL, mapping (toMap / fromMap), and persistence details are confined to this block.

Utils

The Utils block groups pure utility functions (dates, conversions, helpers). It is transversal and does not belong to the main dependency hierarchy.


Dependency Rules


Architecture Notes

Notes on the Chapter Concept