# jonataslaw/getx architecture

> Architecture diagram of the GitHub repository jonataslaw/getx, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jonataslaw/getx
- Repository: https://github.com/jonataslaw/getx

## Overview

##### Project type and purpose
- This is an open‐source Dart/Flutter library called “get” (GetX Ecosystem).
- It provides a suite of modular features—state management, route management, dependency injection, HTTP/WebSocket client, utilities, animations—for building Flutter apps with minimal boilerplate.
- The repository includes two example Flutter apps (“example” and “example_nav2”) that demonstrate usage patterns.

##### File structure
- Top‐level directories
- .github (CI, issue & PR templates)
- documentation (multi‐language docs for dependency, route & state management)
- example & example_nav2 (demo apps showcasing GetX and Navigator 2.0)
- lib (the core library, divided into independent modules)
- test (unit/widget tests organized per module)
- config files (pubspec.yaml, analysis_options.yaml, CHANGELOG.md, LICENSE)
- “lib” substructure (each folder is a self‐contained feature module)
- get_core – bootstrapping, common interfaces, smart management
- get_state_manager – simple & reactive state management
- get_navigation – navigation API, routes, transitions, observers, middleware
- get_connect – REST/WebSocket client, interceptors, authentication
- get_instance – dependency injection & lifecycle management
- get_utils – extensions, platform detection, responsive helpers, logging
- get_animations – animation-ready widgets & extensions
- get_common – shared utilities like reset, logging helpers
- get_rx – underlying reactive primitives (Rx types, streams, workers)

##### README for additional insights
- The “Three pillars” are state management, route management, dependency management.
- Each pillar is implemented in a separate module that sits on top of get_core.
- Utilities (internationalization, theming, middleware, advanced APIs) augment the core pillars.
- Examples show how apps interact with these pillars through GetMaterialApp, Get.put/Get.find, Obx, Get.to(), GetConnect, etc.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Example Apps
    subgraph "Example Apps" 
        App1["Example App 1"]:::examples
        App2["Example App 2\n(Navigator 2.0)"]:::examples
    end

    %% UI Layer
    UI["Flutter UI\n(Widgets & GetMaterialApp)"]:::ui

    %% Get Library Modules
    subgraph "Get Library"
        Core["Core Module"]:::core
        SM["State Management Module"]:::module
        DI["Dependency Injection Module"]:::module
        R["Routing Module"]:::module
        HC["HTTP/WebSocket Client Module"]:::module
        U["Utilities Module\n(general)"]:::module
        CU["Common Utilities Module"]:::module
        A["Animations Module"]:::module
        RX["Reactive Primitives Module"]:::module
    end

    %% External Services
    External["External Services\n(REST APIs, WebSockets)"]:::external

    %% Relationships
    App1 -->|uses| UI
    App2 -->|uses| UI

    UI -->|calls GetMaterialApp| Core

    Core --> SM
    Core --> DI
    Core --> R
    Core --> HC
    Core --> U
    Core --> CU
    Core --> A
    Core --> RX

    SM -.->|reactive updates| UI
    DI -->|injects into| SM
    DI -->|injects into| R
    DI -->|injects into| HC
    R -->|navigates with| UI
    A -->|animates UI via Flutter| UI
    RX -->|provides Rx types| SM
    U -->|supports| Core
    CU -->|supports| all

    HC -->|RESTcalls| External
    HC <-->|"WebSocket"| External

    %% Click events
    click Core "https://github.com/jonataslaw/getx/blob/master/lib/get_core/get_core.dart"
    click SM "https://github.com/jonataslaw/getx/blob/master/lib/get_state_manager/get_state_manager.dart"
    click DI "https://github.com/jonataslaw/getx/blob/master/lib/get_instance/get_instance.dart"
    click R "https://github.com/jonataslaw/getx/blob/master/lib/get_navigation/get_navigation.dart"
    click HC "https://github.com/jonataslaw/getx/blob/master/lib/get_connect/connect.dart"
    click U "https://github.com/jonataslaw/getx/blob/master/lib/get_utils/get_utils.dart"
    click CU "https://github.com/jonataslaw/getx/blob/master/lib/get_common/get_reset.dart"
    click A "https://github.com/jonataslaw/getx/blob/master/lib/get_animations/animations.dart"
    click RX "https://github.com/jonataslaw/getx/blob/master/lib/get_rx/get_rx.dart"
    click App1 "https://github.com/jonataslaw/getx/blob/master/example/lib/main.dart"
    click App2 "https://github.com/jonataslaw/getx/blob/master/example_nav2/lib/main.dart"

    %% Styles
    classDef core fill:#1f78b4,stroke:#333,stroke-width:2px,color:#fff
    classDef module fill:#6baed6,stroke:#333,stroke-width:1px,color:#fff
    classDef ui fill:#33a02c,stroke:#333,stroke-width:1px,color:#fff
    classDef external fill:#ff7f00,stroke:#333,stroke-width:1px,color:#fff
    classDef examples fill:#bdbdbd,stroke:#333,stroke-width:1px,color:#000
```
