# sabbircse499/peart_store architecture

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

- Interactive diagram: https://gitdiagram.com/sabbircse499/peart_store
- Repository: https://github.com/sabbircse499/peart_store

## Overview

##### Main Components Identification

a) Client Layer (Mobile Applications)
- Multiple platform support (iOS, Android, Web, Desktop)
- Flutter as the cross-platform framework

b) Presentation Layer
- Views (/lib/view/)
- Home Module
- Authentication Module
- Splash Screen

c) Business Logic Layer
- ViewModels (/lib/viewmodel/)
- Admin Controller
- Route Management

d) Asset Management
- Lottie Animations
- Static Resources

##### Component Relationships

a) User Interface Flow:
**Splash Screen → Authentication → Home Dashboard**
- ↓
- Multiple Features
- (Items, Vendors, Orders)

b) MVVM Architecture Pattern:
**View → ViewModel → Model (Data Layer)**

##### Specific Elements

- User Authentication (login.dart)
- Store Management (managestore.dart)
- Item Management (item.dart, itemdes.dart)
- Vendor Management (Vendor.dart)
- Order Processing (item_order.dart)
- Search Functionality (search_item.dart)

##### Architecture Patterns

Architectural elements:
- MVVM Pattern Implementation
- Route Management System
- Platform-specific Implementations
- Asset Management System

##### Technical Details

Annotations for:
- Flutter Framework
- Platform Support (iOS, Android, Web, Windows, Linux, macOS)
- Lottie Animation Integration
- State Management Solution

##### Platform-specific Implementation Layer

- Component types
- Architectural patterns

Keep the abstraction level high enough to show the overall architecture while including enough detail to understand the application's structure and data flow.

Remember to emphasize the cross-platform nature of the application and how the Flutter framework enables code sharing across platforms while maintaining platform-specific implementations where necessary.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Legend"
        UI[UI Component]:::ui
        BL[Business Logic]:::business
        DT[Data Layer]:::data
        EX[External Service]:::external
        PS[Platform Specific]:::platform
        
        style Legend fill:#f0f0f0,stroke:#333
    end

    subgraph "Client Layer"
        Android["Android"]:::platform
        iOS["iOS"]:::platform
        Web["Web"]:::platform
        Linux["Linux"]:::platform
        Windows["Windows"]:::platform
        MacOS["MacOS"]:::platform
    end

    subgraph "Presentation Layer"
        Views["Views Root"]:::ui
        Home["Home Module"]:::ui
        Auth["Authentication Module"]:::ui
        Splash["Splash Screen"]:::ui

        Auth --> Home
        Splash --> Auth
    end

    subgraph "Business Logic Layer"
        ViewModels["ViewModels"]:::business
        AdminCtrl["Admin Controller"]:::business
        RouteManager["Route Management"]:::business

        ViewModels --> AdminCtrl
        ViewModels --> RouteManager
    end

    subgraph "Feature Components"
        Login["Authentication"]:::ui
        StoreManage["Store Management"]:::ui
        ItemManage["Item Management"]:::ui
        VendorManage["Vendor Management"]:::ui
        OrderProcess["Order Processing"]:::ui
        Search["Search Functionality"]:::ui
        SideMenu["Side Menu"]:::ui

        Home --> StoreManage
        Home --> ItemManage
        Home --> VendorManage
        Home --> OrderProcess
        Home --> Search
        Home --> SideMenu
    end

    subgraph "Asset Management"
        Lottie["Lottie Animations"]:::external
    end

    Main["Main Application"]:::business

    Main --> Views
    Views --> ViewModels
    
    %% Click Events
    click Android "https://github.com/sabbircse499/peart_store/tree/master/android/"
    click iOS "https://github.com/sabbircse499/peart_store/tree/master/ios/"
    click Web "https://github.com/sabbircse499/peart_store/tree/master/web/"
    click Linux "https://github.com/sabbircse499/peart_store/tree/master/linux/"
    click Windows "https://github.com/sabbircse499/peart_store/tree/master/windows/"
    click MacOS "https://github.com/sabbircse499/peart_store/tree/master/macos/"
    click Views "https://github.com/sabbircse499/peart_store/tree/master/lib/view/"
    click Home "https://github.com/sabbircse499/peart_store/tree/master/lib/view/Home/"
    click Auth "https://github.com/sabbircse499/peart_store/tree/master/lib/view/auth/"
    click Splash "https://github.com/sabbircse499/peart_store/blob/master/lib/view/splash.dart"
    click ViewModels "https://github.com/sabbircse499/peart_store/tree/master/lib/viewmodel/"
    click AdminCtrl "https://github.com/sabbircse499/peart_store/blob/master/lib/viewmodel/admincontrolar.dart"
    click RouteManager "https://github.com/sabbircse499/peart_store/blob/master/lib/route.dart"
    click Lottie "https://github.com/sabbircse499/peart_store/tree/master/assets/lottie/"
    click Login "https://github.com/sabbircse499/peart_store/blob/master/lib/view/auth/login.dart"
    click StoreManage "https://github.com/sabbircse499/peart_store/blob/master/lib/view/Home/managestore.dart"
    click ItemManage "https://github.com/sabbircse499/peart_store/blob/master/lib/view/Home/item.dart"
    click VendorManage "https://github.com/sabbircse499/peart_store/blob/master/lib/view/Home/Vendor.dart"
    click OrderProcess "https://github.com/sabbircse499/peart_store/blob/master/lib/view/Home/item_order.dart"
    click Search "https://github.com/sabbircse499/peart_store/blob/master/lib/view/Home/search_item.dart"
    click SideMenu "https://github.com/sabbircse499/peart_store/blob/master/lib/view/Home/sidemenu.dart"
    click Main "https://github.com/sabbircse499/peart_store/blob/master/lib/main.dart"

    classDef ui fill:#3498db,stroke:#2980b9,color:white
    classDef business fill:#2ecc71,stroke:#27ae60,color:white
    classDef data fill:#f1c40f,stroke:#f39c12,color:black
    classDef external fill:#9b59b6,stroke:#8e44ad,color:white
    classDef platform fill:#95a5a6,stroke:#7f8c8d,color:white
```
