psitta

github.com/Antoine-Lagache/psitta

Flutter Dart License: MIT Status

Psitta is a cross-platform Flutter application built around a custom Spaced Repetition System (SRS) inspired by the SM-2 algorithm. The goal is not just to ship a language learning app — but to engineer a rigorous, modular, and extensible study engine with clearly defined architectural boundaries and a formally documented memory model.

This project serves as both a personal deep-dive into Dart/Flutter and a demonstration of clean software architecture applied to a non-trivial domain.


Highlights


Architecture

The application follows a four-layer architecture. Each layer has a single, well-defined responsibility and strict dependency rules.

┌──────────────────────────────────────┐
│                  UI                  │  Flutter screens — presentation only
├──────────────────────────────────────┤
│         Application / Controllers    │  Session lifecycle, navigation, aggregation
├──────────────────────────────────────┤
│               Domain                 │  Pure business logic — no Flutter, no SQLite
├──────────────────────────────────────┤
│             Persistence              │  Repositories, SQL queries, domain mapping
└──────────────────────────────────────┘

UI

Flutter screens: Home, Sessions, Statistics, Settings. Contains presentation logic only — no direct access to Domain objects or database code.

Application / Controllers

Orchestrates application workflows: session lifecycle, navigation coordination, and statistics aggregation. Controllers are long-lived and shared across screens.

Domain

Pure business logic, fully framework-independent:

This layer has zero dependencies on Flutter or SQLite and can be tested in isolation.

Persistence

Data access through the repository pattern. Responsible for SQL queries, database ↔ domain mapping, and storage optimizations. All storage concerns are strictly confined to this layer.

Full architectural documentation is available in docs/architecture/.


Spaced Repetition Model

The SRS model is formally documented and covers modeling assumptions, scheduling hypotheses, mathematical formulation, and system invariants.

The implementation is progressively aligned with this formal specification.


Current Status

The project is under active development. Here is a transparent breakdown of progress:

Component Status
Layered architecture ✅ Defined and documented
SRS model (formal spec) ✅ Complete
Domain layer — class & method design ✅ Complete
Domain layer — implementation ✅ Complete
Persistence layer 🔄 35% complete
Application / Controllers ⏳ Not started
UI ⏳ Not started

The current focus is completing the Domain layer implementation and ensuring full conformance with the formal SRS specification. The codebase is being incrementally refactored to strictly conform to the defined architecture.


Getting Started

⚠️ This project is currently a work in progress. Core architectural pieces are present, but several features are still being built or stabilized.

Prerequisites: Flutter SDK 3.x, Dart 3.x

git clone https://github.com/Antoine-Lagache/psitta.git
cd psitta
flutter pub get
flutter run

Domain logic and SRS unit tests can be run independently once the domain layer implementation is complete:

flutter test

Roadmap


License

This project is licensed under the MIT License. See the LICENSE file for details.