# kamranhccp/flutter-chatie-messenger architecture

> Architecture diagram of the GitHub repository kamranhccp/flutter-chatie-messenger, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kamranhccp/flutter-chatie-messenger
- Repository: https://github.com/kamranhccp/flutter-chatie-messenger

## Overview

##### Project type and purpose
- Chatiee is a full-stack, cross-platform messaging app built in Flutter.
- Its primary purpose is to provide real-time chat (1:1 and group), user profiles, multimedia sharing, and online presence.
- Although backend code isn’t in the repo, README indicates planned Firebase integration (Authentication, Realtime Database, Cloud Storage, Cloud Functions).

##### File structure
- Top-level “android”, “ios”, and “web” directories contain platform-specific launch code and configuration.
- “lib” is the core Flutter code:
- lib/main.dart — app entry point
- lib/model — data model classes (ContactModel, MessageModel, etc.)
- lib/views — UI screens organized by feature (main chat view, contacts view, verification flow, walkthrough)
- lib/dummy_files — placeholder data services (to be replaced by real backend calls)
- “assets” holds static resources (avatars, country flags, illustrations).
- Configuration: pubspec.yaml, Android Gradle files, iOS Xcode project files.

##### README for additional insights
- Features list confirms real-time messaging and multimedia sharing.
- Mentions Firebase services (Realtime Database, Auth, Cloud Storage, Cloud Functions).
- Indicates UI repurposing, dark mode, theming (future work).

##### Detailed element checklist
- Labels:
- Widgets/views (ChatView, ContactsView, EnterOtpView, etc.)
- Services (AuthService, ChatService, StorageService)
- Models (ContactModel, MessageModel)
- Authentication flow
- Message send/receive flow
- Media upload flow
- Related components in “Client App” boundary
- Firebase services in a “Backend” cloud boundary

##### Detail but keep clarity
- Core interactions (login, fetch contacts, open chat, send message, receive updates).
- Placeholders (current dummy files) transitioning to real Firebase services.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Tier
    subgraph "Client Tier (Flutter App)"
        direction TB
        Main["App Entry Point\n(main.dart)"]:::client
        subgraph "UI - Presentation Layer"
            direction TB
            WV["WalkthroughView"]:::client
            ENV["EnterNumberView"]:::client
            EOV["EnterOTPView"]:::client
            EPDV["EnterProfileDetailsView"]:::client
            BNB["BottomNavBar"]:::client
            CV["ChatView"]:::client
            CoV["ContactsView"]:::client
            MV["MessageView"]:::client
            MSV["MoreSettingsView"]:::client
        end
        subgraph "Business Logic Layer"
            direction TB
            BLoC["State Management\n(BLoC/Provider)"]:::client
        end
        subgraph "Data Layer"
            direction TB
            subgraph "Dummy Data Services"
                direction TB
                DC["DummyContactsService"]:::client
                DM["DummyMessagesService"]:::client
                DMI["DummyIndividualMessagesService"]:::client
            end
            AuthSvc["AuthenticationService"]:::client
            ChatSvc["ChatService"]:::client
            StorageSvc["StorageService"]:::client
            subgraph "Models"
                direction TB
                CM["ContactModel"]:::client
                MM["MessageModel"]:::client
                IPM["IndividualPersonMessageModel"]:::client
            end
        end
    end

    %% Platform Hosts
    subgraph "Platform Hosts"
        direction TB
        Android["AndroidHost"]:::platform
        iOS["iOSHost"]:::platform
        subgraph "WebHost"
            direction TB
            IDX["index.html"]:::platform
            MAN["manifest.json"]:::platform
        end
    end

    %% Backend (Firebase)
    subgraph "Backend (Firebase)"
        direction TB
        FA["Authentication"]:::backend
        FRDB["Realtime Database"]:::database
        FStorage["Cloud Storage"]:::database
        FCFunctions["Cloud Functions"]:::backend
        FCM["Cloud Messaging"]:::backend
    end

    %% Static Assets
    Assets["Assets\n(avatars, flags, illustrations)"]:::platform

    %% Relationships
    Main --> WV
    Main --> ENV
    Main --> BNB
    WV --> AuthSvc
    ENV --> AuthSvc
    AuthSvc --> FA
    FA --> AuthSvc
    AuthSvc --> FRDB
    BNB --> ChatSvc
    ChatSvc --> FRDB
    FRDB --> ChatSvc
    ChatSvc --> FCFunctions
    FCFunctions --> FCM
    BNB --> StorageSvc
    StorageSvc --> FStorage
    FStorage --> FRDB
    FRDB --> CV
    FRDB --> CoV
    FRDB --> MV
    Android --> Main
    iOS --> Main
    IDX --> Main
    MAN --> Main
    Assets --> StorageSvc

    %% Click Events
    click Main "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/lib/main.dart"
    click WV "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/lib/views/walkthrough_view.dart"
    click ENV "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/lib/views/verification/enter_number_view.dart"
    click EOV "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/lib/views/verification/enter_otp.dart"
    click EPDV "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/lib/views/verification/enter_profile_details.dart"
    click BNB "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/lib/views/main_screens/bottom_nav_bar.dart"
    click CV "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/lib/views/main_screens/chat_view.dart"
    click CoV "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/lib/views/main_screens/contacts_view.dart"
    click MV "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/lib/views/main_screens/message_view.dart"
    click MSV "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/lib/views/main_screens/more_settings.dart"
    click DC "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/lib/dummy_files/dummy_contacts.dart"
    click DM "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/lib/dummy_files/dummy_messages.dart"
    click DMI "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/lib/dummy_files/dummy_messages_individual_person.dart"
    click Dummy "https://github.com/kamranhccp/flutter-chatie-messenger/tree/main/lib/dummy_files"
    click CM "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/lib/model/contact_model.dart"
    click MM "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/lib/model/message_model.dart"
    click IPM "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/lib/model/message_individual_person.dart"
    click Android "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/android/app/src/main/kotlin/com/example/chatiee/MainActivity.kt"
    click iOS "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/ios/Runner/AppDelegate.swift"
    click IDX "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/web/index.html"
    click MAN "https://github.com/kamranhccp/flutter-chatie-messenger/blob/main/web/manifest.json"
    click Assets "https://github.com/kamranhccp/flutter-chatie-messenger/tree/main/assets"

    %% Styles
    classDef client fill:#B3D4FC,stroke:#0366d6,color:#0366d6
    classDef backend fill:#D4F8DB,stroke:#34a853,color:#34a853
    classDef database fill:#FFE1A8,stroke:#FF8C00,color:#FF8C00
    classDef platform fill:#E5E5E5,stroke:#A9A9A9,color:#333333
```
