Skip to content

Latest commit

 

History

History
86 lines (71 loc) · 3.17 KB

Architecture.md

File metadata and controls

86 lines (71 loc) · 3.17 KB

The architecture used in this project is GetX Architecture, which organizes the codebase into three core layers:

How GetX Architecture Works

Each module in the project follows a consistent three-layer structure:

Bindings: Handles dependency injection. Each screen has a binding class that registers its controller before the view is loaded, ensuring everything is available when needed.

Controllers: The brain of each screen. Controllers manage state, business logic, and interactions with services. They extend GetxController and expose reactive variables that the view observes.

Views: Pure UI. Views observe the controller's state and rebuild only when relevant data changes. They contain no business logic.

Every module under lib/app/modules/ follows this pattern:

module_name/
├── bindings/    # Dependency injection
├── controllers/ # State & business logic
└── views/       # UI widgets

Key Rules

  • Views should never directly call services; always go through the controller.
  • Views should contain zero business logic; only render what the controller exposes.
  • Controllers should not depend on other controllers.
  • Controllers may be reused across views if they share the same functionality.
  • Services are globally accessible and shared across all controllers.

Architecture Diagram

GetX Architecture

Since services are global, a multi-screen app shares them while each screen gets its own controller and view:

Multi-screen structure

Project Structure

lib/
├── app/
│   ├── models/
│   ├── modules/
│   │   ├── about/
│   │   ├── detailRoute/
│   │   ├── home/
│   │   ├── logs/
│   │   ├── manageTaskServer/
│   │   ├── manage_task_champion_creds/
│   │   ├── onboarding/
│   │   ├── permission/
│   │   ├── profile/
│   │   ├── reports/
│   │   ├── settings/
│   │   ├── splash/
│   │   └── taskc_details/
│   ├── routes/
│   ├── services/
│   ├── tour/
│   ├── utils/
│   │   ├── add_task_dialogue/
│   │   ├── app_settings/
│   │   ├── constants/
│   │   ├── debug_logger/
│   │   ├── gen/
│   │   ├── home_path/
│   │   ├── language/
│   │   ├── permissions/
│   │   ├── taskc/
│   │   ├── taskchampion/
│   │   ├── taskfunctions/
│   │   ├── taskserver/
│   │   └── themes/
│   └── v3/
│       ├── champion/
│       ├── db/
│       ├── models/
│       └── net/
├── rust_bridge/
└── main.dart

Resources