# oapmartins/todo_list_provider architecture

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

- Interactive diagram: https://gitdiagram.com/oapmartins/todo_list_provider
- Repository: https://github.com/oapmartins/todo_list_provider

## Overview

##### Project type and purpose
- This is a cross-platform Flutter “Todo List” client application (Android, iOS, Web).
- It uses local SQLite persistence, the Provider pattern for DI/state management, and is structured in feature modules (splash, auth, home).

##### File structure
- Top-level platform shells:
- android/ (Gradle, native Android manifest, Kotlin MainActivity)
- ios/ (Xcode project, AppDelegate.swift, Info.plist)
- lib/: main Dart code
- app_module.dart & app_widget.dart: dependency-injection container & root widget
- core/: shared services (auth provider), database (SQLite factories, migrations), navigation, UI themes, notifiers, common widgets
- modules/: feature modules
– splash (splash_page.dart)
– auth (login/register controllers & pages)
– home (home_page.dart, drawer widget)
- repositories/: repository interface + implementation for user data
- services/: service interface + implementation encapsulating business rules
- firebase_options.dart: Firebase configuration

##### README
- Contains only the default Flutter placeholder—no architecture details provided.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Platform Shells
    subgraph "Platform Shells"
        Android["Android Shell"]:::platform
        iOS["iOS Shell"]:::platform
        Web["Web Shell"]:::platform
    end

    %% Flutter Engine & Plugins
    Engine["Flutter Engine\n& Plugins\n(sqflite, firebase_core)"]:::engine

    %% DI Root and App Widget
    AppModule["App Module\n(app_module.dart)"]:::di
    AppWidget["App Widget\n(app_widget.dart)"]:::di

    %% Presentation Layer
    subgraph "Presentation Layer" 
        SplashPage["Splash Page"]:::presentation
        AuthModule["Auth Module"]:::presentation
        LoginPage["Login Page"]:::presentation
        RegisterPage["Register Page"]:::presentation
        HomeModule["Home Module"]:::presentation
        HomePage["Home Page"]:::presentation
        HomeDrawer["Home Drawer"]:::presentation
    end

    %% Logic / State Layer
    subgraph "State/Logic Layer"
        LoginController["Login Controller"]:::logic
        RegisterController["Register Controller"]:::logic
        AuthProvider["Auth Provider"]:::logic
        Navigator["Navigator"]:::logic
        DefaultChangeNotifier["Default Change Notifier"]:::logic
        DefaultListenerNotifier["Default Listener Notifier"]:::logic
    end

    %% Service Layer
    subgraph "Service Layer"
        UserService["User Service Interface"]:::service
        UserServiceImpl["User Service Impl"]:::service
    end

    %% Data Layer
    subgraph "Data Layer"
        UserRepo["User Repository Interface"]:::data
        UserRepoImpl["User Repo Impl"]:::data
        SQLiteFactory["SQLite Connection Factory"]:::data
        SQLiteAdm["SQLite Admin Connection"]:::data
        MigrationFactory["Migration Factory"]:::data
        Migration["Migration"]:::data
        MigrationV1["Migration V1"]:::data
    end

    %% Database
    DB["SQLite Database"]:::db

    %% External Services
    Firebase["Firebase"]:::cloud

    %% Connections
    Android --> Engine
    iOS --> Engine
    Web --> Engine

    Engine --> AppWidget
    AppWidget --> AppModule

    %% App bootstrap DI
    AppModule --> LoginController
    AppModule --> RegisterController
    AppModule --> UserServiceImpl
    AppModule --> UserRepoImpl
    AppModule --> SQLiteFactory
    AppModule --> SQLiteAdm
    AppModule --> MigrationFactory
    AppModule --> AuthProvider
    AppModule --> Navigator

    %% UI to Logic
    SplashPage -->|uses| AuthProvider
    LoginPage -->|uses| LoginController
    RegisterPage -->|uses| RegisterController
    HomePage -->|uses| AuthProvider
    HomeDrawer -->|uses| AuthProvider

    %% Logic to Service
    LoginController -->|calls| UserService
    RegisterController -->|calls| UserService
    UserService -->|implemented by| UserServiceImpl

    %% Service to Data
    UserServiceImpl -->|calls| UserRepo
    UserRepo -->|implemented by| UserRepoImpl

    %% Data to DB
    UserRepoImpl -->|opens| SQLiteFactory
    SQLiteFactory -->|admin connection| SQLiteAdm
    SQLiteFactory -->|migrations| MigrationFactory
    MigrationFactory --> Migration
    MigrationFactory --> MigrationV1
    SQLiteFactory --> DB
    UserRepoImpl --> DB

    %% Optional Firebase
    UserServiceImpl -->|optional| Firebase
    Firebase -->|via firebase_core| Engine

    %% Click Events
    click Android "https://github.com/oapmartins/todo_list_provider/blob/main/android/app/src/main/kotlin/com/example/todo_list_provider/MainActivity.kt"
    click iOS "https://github.com/oapmartins/todo_list_provider/blob/main/ios/Runner/AppDelegate.swift"
    click Web "https://github.com/oapmartins/todo_list_provider/blob/main/web/index.html"
    click AppModule "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/app_module.dart"
    click AppWidget "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/app_widget.dart"
    click SplashPage "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/modules/splash/splash_page.dart"
    click AuthModule "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/modules/auth/auth_module.dart"
    click LoginPage "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/modules/auth/login/login_page.dart"
    click LoginController "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/modules/auth/login/login_controller.dart"
    click RegisterPage "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/modules/auth/register/register_page.dart"
    click RegisterController "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/modules/auth/register/register_controller.dart"
    click HomeModule "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/modules/home/home_module.dart"
    click HomePage "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/modules/home/home_page.dart"
    click HomeDrawer "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/modules/home/widgets/home_drawer.dart"
    click AuthProvider "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/core/auth/auth_provider_app.dart"
    click Navigator "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/core/navigator/todo_list_navigator.dart"
    click DefaultChangeNotifier "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/core/notifier/default_change_notifier.dart"
    click DefaultListenerNotifier "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/core/notifier/default_listener_notifier.dart"
    click SQLiteFactory "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/core/dabase/sqlite_connection_factory.dart"
    click SQLiteAdm "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/core/dabase/sqlite_adm_connection.dart"
    click MigrationFactory "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/core/dabase/sqlite_migration_factory.dart"
    click Migration "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/core/dabase/migrations/migration.dart"
    click MigrationV1 "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/core/dabase/migrations/migration_v1.dart"
    click UserRepo "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/repositories/user_repository.dart"
    click UserRepoImpl "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/repositories/user_repository_impl.dart"
    click UserService "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/services/user_service.dart"
    click UserServiceImpl "https://github.com/oapmartins/todo_list_provider/blob/main/lib/app/services/user_service_impl.dart"
    click Firebase "https://github.com/oapmartins/todo_list_provider/blob/main/lib/firebase_options.dart"

    %% Styles
    classDef platform fill:#f0f0f0,stroke:#333,stroke-width:1px
    classDef engine fill:#e0ffff,stroke:#333,stroke-width:1px
    classDef di fill:#ffe4b5,stroke:#333,stroke-width:1px
    classDef presentation fill:#add8e6,stroke:#333,stroke-width:1px
    classDef logic fill:#90ee90,stroke:#333,stroke-width:1px
    classDef service fill:#ffa500,stroke:#333,stroke-width:1px
    classDef data fill:#ffdead,stroke:#333,stroke-width:1px
    classDef db fill:#d3d3d3,stroke:#333,stroke-width:1px
    classDef cloud fill:#dda0dd,stroke:#333,stroke-width:1px
```
