docs/architecture/overview.mdDescribe 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.
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
The UI block groups all Flutter screens and widgets. It is solely responsible for rendering and handling user interactions.
The Application block is the entry point for application logic. Controllers:
The Domain groups all business logic of the application. It is intentionally represented as a single block, but structured into conceptual sub-components:
Content Represents the learning content (words, sentences).
Exercises Represents the concrete exercises presented to the user. Exercises are stateful runtime objects, created before the session starts and destroyed at its end.
The UI only knows exercises through ExercisePrompt, which is a projection of an Exercise.
Sessions Manages the organisation of exercises into learning sessions. It’s the starting point of the domain.
SRS Implements spaced repetition logic and progression state.
The Domain is independent of all technology (UI, DB, Flutter, SQLite).
The Persistence block is responsible for storing and reconstructing Domain data.
SQL, mapping (toMap / fromMap), and persistence details are confined to this block.
The Utils block groups pure utility functions (dates, conversions, helpers). It is transversal and does not belong to the main dependency hierarchy.
StatsScreen and HomeScreen.