# technophyle-0926/fitzone architecture

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

- Interactive diagram: https://gitdiagram.com/technophyle-0926/fitzone
- Repository: https://github.com/technophyle-0926/fitzone

## Overview

##### Main Architecture Components

a) Presentation Layer (UI)
- Views from the lib/View directory
- Screens: Splash, Onboarding, Dashboard, Exercise, Food, etc.

b) Controller Layer (Business Logic)
- This in the middle
- Controllers from lib/Controller directory
- ExerciseDetailsController, ExerciseListController, FoodDetailController, FoodListController

c) Model Layer (Data)
- This at the bottom
- Models from lib/Model directory
- ExerciseModel, FoodModel, ImageModel, etc.

##### Component Relationships

a) User Interface Flow
- Start from SplashView → OnboardingView → DashboardView
- Branch out to Exercise and Food related views

b) Data Flow
- Controllers ↔ Models (two-way binding)
- Views → Controllers (user actions)
- Controllers → Views (state updates)

##### Platform-Specific Elements

- Native Platform Support (Android, iOS, Web, Desktop)
- Asset Management (show connection to the extensive assets directory)
- Platform-specific configurations

##### Architectural Patterns
MVC pattern implementation:
- Model (lib/Model)
- View (lib/View)
- Controller (lib/Controller)

##### Key Features Section
- Exercise tracking functionality
- Food/nutrition management
- Multi-language support
- Onboarding flow

##### Technical Details
- Flutter framework version
- Key dependencies
- Asset categories
- Supported platforms

##### Data Flow Patterns
Illustrate:
- State management flow
- User interaction handling
- Data persistence (if any)
- Asset loading mechanisms

This structure reflects a typical Flutter mobile application with MVC architecture, emphasizing the fitness and health tracking features of the application while maintaining a clear separation of concerns between different layers of the application.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Presentation Layer"
        SplashView["Splash View"]
        OnboardingView["Onboarding View"]
        DashboardView["Dashboard View"]
        ExerciseView["Exercise View"]
        FoodView["Food View"]
        LanguageView["Language View"]
        TermsView["Terms of Use View"]
    end

    subgraph "Controller Layer"
        ExerciseDetailsCtrl["Exercise Details Controller"]
        ExerciseListCtrl["Exercise List Controller"]
        FoodDetailCtrl["Food Detail Controller"]
        FoodListCtrl["Food List Controller"]
    end

    subgraph "Model Layer"
        ExerciseDetailsModel["Exercise Details Model"]
        ExerciseListModel["Exercise List Model"]
        FoodDetailsModel["Food Details Model"]
        FoodListModel["Food List Model"]
        ImageModel["Image Model"]
    end

    subgraph "Platform Support"
        Android["Android"]
        iOS["iOS"]
        Web["Web"]
        Linux["Linux"]
        Windows["Windows"]
        MacOS["MacOS"]
    end

    subgraph "Assets"
        ExerciseAssets["Exercise Assets"]
        FoodAssets["Food Assets"]
        LanguageAssets["Language Flags"]
        HomeAssets["Home Assets"]
        OnboardingAssets["Onboarding Assets"]
    end

    %% Flow connections
    SplashView --> OnboardingView
    OnboardingView --> DashboardView
    DashboardView --> ExerciseView
    DashboardView --> FoodView
    DashboardView --> LanguageView
    DashboardView --> TermsView

    %% Controller connections
    ExerciseView -.-> ExerciseDetailsCtrl
    ExerciseView -.-> ExerciseListCtrl
    FoodView -.-> FoodDetailCtrl
    FoodView -.-> FoodListCtrl

    %% Model connections
    ExerciseDetailsCtrl -.-> ExerciseDetailsModel
    ExerciseListCtrl -.-> ExerciseListModel
    FoodDetailCtrl -.-> FoodDetailsModel
    FoodListCtrl -.-> FoodListModel

    %% Asset connections
    ExerciseView --> ExerciseAssets
    FoodView --> FoodAssets
    LanguageView --> LanguageAssets
    DashboardView --> HomeAssets
    OnboardingView --> OnboardingAssets

    %% Click events
    click SplashView "https://github.com/Technophyle-0926/fitzone/blob/main/lib/View/splash_view.dart"
    click OnboardingView "https://github.com/Technophyle-0926/fitzone/blob/main/lib/View/onboarding_view.dart"
    click DashboardView "https://github.com/Technophyle-0926/fitzone/blob/main/lib/View/dashboard_view.dart"
    click ExerciseView "https://github.com/Technophyle-0926/fitzone/blob/main/lib/View/exercise_view.dart"
    click FoodView "https://github.com/Technophyle-0926/fitzone/blob/main/lib/View/food_view.dart"
    click LanguageView "https://github.com/Technophyle-0926/fitzone/blob/main/lib/View/language_view.dart"
    click TermsView "https://github.com/Technophyle-0926/fitzone/blob/main/lib/View/terms_of_use_view.dart"
    
    click ExerciseDetailsCtrl "https://github.com/Technophyle-0926/fitzone/blob/main/lib/Controller/exercise_details_controller.dart"
    click ExerciseListCtrl "https://github.com/Technophyle-0926/fitzone/blob/main/lib/Controller/exercise_list_controller.dart"
    click FoodDetailCtrl "https://github.com/Technophyle-0926/fitzone/blob/main/lib/Controller/food_detail_controller.dart"
    click FoodListCtrl "https://github.com/Technophyle-0926/fitzone/blob/main/lib/Controller/food_list_controller.dart"
    
    click ExerciseDetailsModel "https://github.com/Technophyle-0926/fitzone/blob/main/lib/Model/exercise_details_model.dart"
    click ExerciseListModel "https://github.com/Technophyle-0926/fitzone/blob/main/lib/Model/exercise_list_model.dart"
    click FoodDetailsModel "https://github.com/Technophyle-0926/fitzone/blob/main/lib/Model/food_details_model.dart"
    click FoodListModel "https://github.com/Technophyle-0926/fitzone/blob/main/lib/Model/food_list_model.dart"
    click ImageModel "https://github.com/Technophyle-0926/fitzone/blob/main/lib/Model/image_model.dart"
    
    click Android "https://github.com/Technophyle-0926/fitzone/tree/main/android/app/src/main"
    click iOS "https://github.com/Technophyle-0926/fitzone/tree/main/ios/Runner"
    click Web "https://github.com/Technophyle-0926/fitzone/tree/main/web"
    click Linux "https://github.com/Technophyle-0926/fitzone/tree/main/linux/runner"
    click Windows "https://github.com/Technophyle-0926/fitzone/tree/main/windows/runner"
    click MacOS "https://github.com/Technophyle-0926/fitzone/tree/main/macos/Runner"
    
    click ExerciseAssets "https://github.com/Technophyle-0926/fitzone/tree/main/assets/Featured Exercise 1"
    click FoodAssets "https://github.com/Technophyle-0926/fitzone/tree/main/assets/Featured Food 1"
    click LanguageAssets "https://github.com/Technophyle-0926/fitzone/tree/main/assets/Flags"
    click HomeAssets "https://github.com/Technophyle-0926/fitzone/tree/main/assets/Home 1"
    click OnboardingAssets "https://github.com/Technophyle-0926/fitzone/tree/main/assets/Onboarding 1"

    %% Styling
    classDef view fill:#2196F3,stroke:#1565C0,color:white
    classDef controller fill:#4CAF50,stroke:#2E7D32,color:white
    classDef model fill:#FF9800,stroke:#EF6C00,color:white
    classDef platform fill:#9C27B0,stroke:#6A1B9A,color:white
    classDef asset fill:#757575,stroke:#424242,color:white

    class SplashView,OnboardingView,DashboardView,ExerciseView,FoodView,LanguageView,TermsView view
    class ExerciseDetailsCtrl,ExerciseListCtrl,FoodDetailCtrl,FoodListCtrl controller
    class ExerciseDetailsModel,ExerciseListModel,FoodDetailsModel,FoodListModel,ImageModel model
    class Android,iOS,Web,Linux,Windows,MacOS platform
    class ExerciseAssets,FoodAssets,LanguageAssets,HomeAssets,OnboardingAssets asset
```
