# akhilesh002/mindmap_assignment architecture

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

- Interactive diagram: https://gitdiagram.com/akhilesh002/mindmap_assignment
- Repository: https://github.com/akhilesh002/mindmap_assignment

## Overview

##### Project Type and Purpose
- This is a cross-platform mobile application built with Flutter, targeting both Android and iOS.
- Its core purpose is to allow a user to log in (offline, using Hive as a local database), view a dashboard, send money, and see transaction history.
- No external APIs are used; all data persists locally and is cleared on logout.

##### File Structure Analysis
- android/ and ios/ directories contain platform-specific boilerplate for native embedding.
- lib/ holds the Dart source, subdivided by feature under ui/features. Each feature has its own screen (UI) and controller (business logic).
- lib/util contains shared utilities.
- pubspec.yaml declares dependencies (Hive for local storage, probably GetX or Provider for state management).
- test/ holds widget tests.

##### Key Architectural Patterns
- Feature-based modular layout: each feature folder encapsulates its screen(s), controller, models, and widgets.
- MVC/MVVM-style separation:
- Screens (View)
- Controllers (ViewModel/Controller)
- Models (Data layer)
- Local persistence layer via Hive (no remote service layer presently).

##### Main Components
A. Presentation Layer
– Flutter Engine
– Widgets & Screens (SplashScreen, LoginScreen, DashboardScreen, SendMoneyScreen, TransactionsScreen)
B. Business Logic Layer
– Controllers (splash_controller, login_controller, dashboard_controller, send_money_controller, transactions_controller)
C. Data Layer
– Models (transaction_model.dart & generated adapters)
D. Platform Layer
– Android platform integration (MainActivity.kt, Gradle config)
– iOS platform integration (AppDelegate.swift, Xcode project)
E. Asset Layer

##### Relationships & Data Flow
2. Flutter engine loads SplashScreen → splash_controller checks Hive for persisted session
3. If not logged in → navigate to LoginScreen → login_controller validates static credentials → on success, write session to Hive
4. Navigate to DashboardScreen → dashboard_controller reads summary data from Hive
5. Send Money: send_money_controller writes a new transaction record to Hive
6. TransactionsScreen: transactions_controller queries Hive, maps data to transaction_model, displays list

##### Important Architectural Notes
- All data flows occur within the device (no network calls).
- Controllers serve as the single source of truth for each feature.
- Hive adapters (transaction_model.g.dart) handle serialization/deserialization.
- Feature folders enforce clear boundaries, making the app easily extensible for future remote APIs.

– Component names and roles
– Feature boundaries (dashboard, login, send money, transactions)
– Platform integration points (Android/iOS hosts)

## Diagram (Mermaid)

```mermaid
graph TD
    %% User entry
    User["User"]:::external
    Main["Flutter Engine\n(lib/main.dart)"]:::presentation
    click Main "https://github.com/akhilesh002/mindmap_assignment/blob/master/lib/main.dart"

    subgraph "Presentation Layer"
        direction TB
        SplashScreen["SplashScreen"]:::presentation
        click SplashScreen "https://github.com/akhilesh002/mindmap_assignment/blob/master/lib/ui/features/splash/screen/splash_screen.dart"
        LoginScreen["LoginScreen"]:::presentation
        click LoginScreen "https://github.com/akhilesh002/mindmap_assignment/blob/master/lib/ui/features/login/login_screen.dart"
        DashboardScreen["DashboardScreen"]:::presentation
        click DashboardScreen "https://github.com/akhilesh002/mindmap_assignment/blob/master/lib/ui/features/dashboard/dashboard_screen.dart"
        SendMoneyScreen["SendMoneyScreen"]:::presentation
        click SendMoneyScreen "https://github.com/akhilesh002/mindmap_assignment/blob/master/lib/ui/features/send_money/send_money_screen.dart"
        ResultBottomSheet["ResultBottomSheet"]:::presentation
        click ResultBottomSheet "https://github.com/akhilesh002/mindmap_assignment/blob/master/lib/ui/features/send_money/widgets/result_bottom_sheet.dart"
        TransactionsScreen["TransactionsScreen"]:::presentation
        click TransactionsScreen "https://github.com/akhilesh002/mindmap_assignment/blob/master/lib/ui/features/transactions/transactions_screen.dart"
    end

    subgraph "Business Logic Layer"
        direction TB
        SplashController["SplashController"]:::business
        click SplashController "https://github.com/akhilesh002/mindmap_assignment/blob/master/lib/ui/features/splash/controller/splash_controller.dart"
        LoginController["LoginController"]:::business
        click LoginController "https://github.com/akhilesh002/mindmap_assignment/blob/master/lib/ui/features/login/login_controller.dart"
        DashboardController["DashboardController"]:::business
        click DashboardController "https://github.com/akhilesh002/mindmap_assignment/blob/master/lib/ui/features/dashboard/dashboard_controller.dart"
        SendMoneyController["SendMoneyController"]:::business
        click SendMoneyController "https://github.com/akhilesh002/mindmap_assignment/blob/master/lib/ui/features/send_money/send_money_controller.dart"
        TransactionsController["TransactionsController"]:::business
        click TransactionsController "https://github.com/akhilesh002/mindmap_assignment/blob/master/lib/ui/features/transactions/transactions_controller.dart"
    end

    subgraph "Data Layer"
        direction TB
        HiveDB["Hive Boxes\n(Local DB)"]:::data
        TransactionModel["TransactionModel"]:::data
        click TransactionModel "https://github.com/akhilesh002/mindmap_assignment/blob/master/lib/ui/features/transactions/models/transaction_model.dart"
        HiveAdapter["TransactionModel Adapter"]:::data
        click HiveAdapter "https://github.com/akhilesh002/mindmap_assignment/blob/master/lib/ui/features/transactions/models/transaction_model.g.dart"
    end

    subgraph "Utility"
        Util["Util Functions\n(lib/util/util.dart)"]:::util
        click Util "https://github.com/akhilesh002/mindmap_assignment/blob/master/lib/util/util.dart"
    end

    subgraph "Platform Layer"
        direction TB
        AndroidActivity["Android MainActivity"]:::platform
        click AndroidActivity "https://github.com/akhilesh002/mindmap_assignment/blob/master/android/app/src/main/kotlin/com/akhilesh002/mindmap_assignment/MainActivity.kt"
        AndroidBuild["Android build.gradle"]:::platform
        click AndroidBuild "https://github.com/akhilesh002/mindmap_assignment/blob/master/android/app/build.gradle"
        iOSAppDelegate["iOS AppDelegate"]:::platform
        click iOSAppDelegate "https://github.com/akhilesh002/mindmap_assignment/blob/master/ios/Runner/AppDelegate.swift"
    end

    subgraph "Asset & Config"
        Assets["Static Assets\n(assets/gif)"]:::asset
        click Assets "https://github.com/akhilesh002/mindmap_assignment/tree/master/assets/gif"
        Pubspec["pubspec.yaml"]:::asset
        click Pubspec "https://github.com/akhilesh002/mindmap_assignment/blob/master/pubspec.yaml"
    end

    %% Relationships
    User -->|"launches"| Main
    Main -->|"loads"| SplashScreen
    SplashScreen -->|"uses"| SplashController
    SplashController -->|"reads/writes"| HiveDB
    SplashController -->|"navigates to"| LoginScreen
    LoginScreen -->|"uses"| LoginController
    LoginController -->|"writes session"| HiveDB
    LoginController -->|"on success"| DashboardScreen
    DashboardScreen -->|"uses"| DashboardController
    DashboardController -->|"reads summary"| HiveDB
    DashboardScreen -->|"navigates to"| SendMoneyScreen
    SendMoneyScreen -->|"uses"| SendMoneyController
    SendMoneyController -->|"writes txn"| HiveDB
    SendMoneyController -->|"displays"| ResultBottomSheet
    DashboardScreen -->|"navigates to"| TransactionsScreen
    TransactionsScreen -->|"uses"| TransactionsController
    TransactionsController -->|"queries"| HiveDB
    TransactionsController -->|"maps to"| TransactionModel
    TransactionModel -->|"adapter"| HiveAdapter
    LoginController -->|"clears"| HiveDB
    LoginController -->|"redirects"| LoginScreen

    %% Controllers depend on util
    SplashController -->|"util"| Util
    LoginController -->|"util"| Util
    DashboardController -->|"util"| Util
    SendMoneyController -->|"util"| Util
    TransactionsController -->|"util"| Util

    %% Platform integration
    Main -->|"hosted on"| AndroidActivity
    Main -->|"hosted on"| iOSAppDelegate
    AndroidActivity -->|"configured by"| AndroidBuild
    iOSAppDelegate -->|"via Xcode"| Pubspec

    %% Asset usage
    SplashScreen -->|"loads"| Assets
    Pubspec -->|"declares"| HiveDB

    classDef presentation fill:#D0E8FF,stroke:#003366,color:#003366;
    classDef business fill:#DFF2D8,stroke:#336600,color:#336600;
    classDef data fill:#FFE7A1,stroke:#CC9900,color:#665500;
    classDef platform fill:#E0E0E0,stroke:#666666,color:#333333;
    classDef asset fill:#F2D7D5,stroke:#CC4444,color:#993333;
    classDef util fill:#F9E79F,stroke:#B7950B,color:#7D6608;
    classDef external fill:#FFFFFF,stroke:#888888,color:#888888,stroke-dasharray: 5 5;
```
