# vishweshsoni/translatehindi architecture

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

- Interactive diagram: https://gitdiagram.com/vishweshsoni/translatehindi
- Repository: https://github.com/vishweshsoni/translatehindi

## Overview

##### Main Components Identification

a) Presentation Layer:
- 'screens' directory components:
- TranslateTaskApp (main app container)
- TermsAndConditionScreen
- Widgets (BottomSheetWidget, VoiceInputDialog)

b) Business Logic Layer:
- In the middle
- Cubit pattern (state management):
- TAndCCubit
- TAndCState

c) Data Layer:
- At the bottom
- Include:
- Repositories (TCRepository)
- Models (TermsAndCondition)
- Local Storage (PreferenceHelper)

##### Platform-Specific Components

- Android platform support
- iOS platform support
- Web support
- Desktop support (Windows, Linux, MacOS)

- Rectangles: Main components
- Rounded rectangles: Screens and UI elements
- Hexagons: Platform-specific builds

- Blue: UI components
- Green: Business logic
- Orange: Data layer
- Gray: Platform-specific code

##### Architectural Patterns to Highlight

Following patterns:
- BLoC/Cubit pattern implementation
- Repository pattern
- Asset management (models/terms_and_condition.json)

##### Key Relationships to Emphasize

- Cubit state management flow
- Repository data access patterns
- Platform-specific implementation bridges

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Presentation
        TTA["TranslateTaskApp"]
        TCS["TermsAndConditionScreen"]
        BSW["BottomSheetWidget"]
        VID["VoiceInputDialog"]
    end

    subgraph "Business Logic"
        TCCU["TAndCCubit"]
        TCST["TAndCState"]
    end

    subgraph "Data Layer"
        TCR["TCRepository"]
        TCM["TermsAndCondition Model"]
        PH["PreferenceHelper"]
        TCD["Terms and Condition Data"]
    end

    subgraph "Platform Support"
        AND["Android"]
        IOS["iOS"]
        WEB["Web"]
        WIN["Windows"]
        LIN["Linux"]
        MAC["MacOS"]
    end

    %% Relationships
    TTA --> TCS
    TCS --> BSW
    TCS --> VID
    TCS --> TCCU
    TCCU --> TCST
    TCCU --> TCR
    TCR --> TCM
    TCR --> PH
    TCR --> TCD

    %% Platform connections
    TTA --> AND
    TTA --> IOS
    TTA --> WEB
    TTA --> WIN
    TTA --> LIN
    TTA --> MAC

    %% Styling
    classDef presentation fill:#a8d1f0
    classDef logic fill:#90EE90
    classDef data fill:#FFB366
    classDef platform fill:#D3D3D3

    class TTA,TCS,BSW,VID presentation
    class TCCU,TCST logic
    class TCR,TCM,PH,TCD data
    class AND,IOS,WEB,WIN,LIN,MAC platform

    %% Click events
    click TTA "https://github.com/vishweshsoni/translateHindi/blob/feat/init/lib/screens/translate_task_app.dart"
    click TCS "https://github.com/vishweshsoni/translateHindi/blob/feat/init/lib/screens/terms_and_condition_scren.dart"
    click BSW "https://github.com/vishweshsoni/translateHindi/blob/feat/init/lib/screens/widgets/bottom_sheet_widget.dart"
    click VID "https://github.com/vishweshsoni/translateHindi/blob/feat/init/lib/screens/widgets/voice_input_dialog.dart"
    click TCCU "https://github.com/vishweshsoni/translateHindi/blob/feat/init/lib/cubit/t_and_c_cubit.dart"
    click TCST "https://github.com/vishweshsoni/translateHindi/blob/feat/init/lib/cubit/t_and_c_state.dart"
    click TCR "https://github.com/vishweshsoni/translateHindi/blob/feat/init/lib/repositories/t_c_repository.dart"
    click TCM "https://github.com/vishweshsoni/translateHindi/blob/feat/init/lib/models/terms_and_condition.dart"
    click PH "https://github.com/vishweshsoni/translateHindi/blob/feat/init/lib/utils/preference_helper.dart"
    click TCD "https://github.com/vishweshsoni/translateHindi/blob/feat/init/assets/models/terms_and_condition.json"
    click AND "https://github.com/vishweshsoni/translateHindi/tree/feat/init/android/app/src/main/"
    click IOS "https://github.com/vishweshsoni/translateHindi/tree/feat/init/ios/Runner/"
    click WEB "https://github.com/vishweshsoni/translateHindi/tree/feat/init/web/"
    click WIN "https://github.com/vishweshsoni/translateHindi/tree/feat/init/windows/runner/"
    click LIN "https://github.com/vishweshsoni/translateHindi/tree/feat/init/linux/"
    click MAC "https://github.com/vishweshsoni/translateHindi/tree/feat/init/macos/Runner/"
```
