# shaunm1724/geniebox architecture

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

- Interactive diagram: https://gitdiagram.com/shaunm1724/geniebox
- Repository: https://github.com/shaunm1724/geniebox

## Overview

##### Project type and purpose
- This is a cross‑platform Flutter client application (“geniebox”) targeting mobile (iOS, Android), desktop (Windows, macOS, Linux) and web.
- Its purpose is to present multiple “features” (home, email reply, recipe creator, story/poem, weather), each implemented in its own module, and to fetch or generate data via external services (e.g., a Gemini AI service, a weather API).

##### File structure
- Top‑level folders:
– android, ios, linux, macos, windows, web: native embedding projects and build files for each platform.
– lib: main Dart code—subdivided into core (shared services, constants, themes) and features (UI + state management per feature).
– test: widget tests
- “lib/core” holds application constants, theme definitions, and service abstractions (gemini_service.dart, weather_service.dart).
- “lib/features” follows a feature‑driven, presentation‑layer approach: each feature has its pages, providers (state management), widgets, and—where needed—data models.
- pubspec.yaml / pubspec.lock list dependencies.
- No separate backend or database—data comes from external APIs.

##### Extract additional insights from README
- Assumes standard Flutter build and run flow.

##### Detail
- Every major feature module (email_reply, recipe, story_poem, weather) as sub‑components under UI and State Management.
- Shared core services being injected or referenced by multiple providers.
- Don’t abstract away the platform folders—show how they tie into the Flutter engine.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Platform Embedding Layer
    subgraph "Platform Embedding Layer"
        direction TB
        Android["Android"]:::native
        iOS["iOS"]:::native
        macOS["macOS"]:::native
        Linux["Linux"]:::native
        Windows["Windows"]:::native
        Web["Web"]:::native
    end

    %% Flutter Engine & Dart VM
    subgraph "Flutter Engine & Dart VM"
        direction TB
        MainEntrypoint["lib/main.dart"]:::blue
        AppBootstrap["lib/app.dart"]:::blue
    end

    %% Application Layers
    subgraph "Application Layers"
        direction TB

        subgraph "UI Layer" 
            direction TB
            HomePage["HomePage"]:::blue
            EmailReplyPage["EmailReplyPage"]:::blue
            RecipePage["RecipeCreatorPage"]:::blue
            StoryPage["StoryPoemPage"]:::blue
            WeatherPage["WeatherPage"]:::blue
        end

        subgraph "State Management Layer"
            direction TB
            HomeProvider["HomeProvider"]:::blue
            EmailReplyProvider["EmailReplyProvider"]:::blue
            RecipeProvider["RecipeProvider"]:::blue
            StoryProvider["StoryPoemProvider"]:::blue
            WeatherProvider["WeatherProvider"]:::blue
            ThemeProvider["ThemeProvider"]:::blue
        end

        subgraph "Service Layer"
            direction TB
            GeminiService["GeminiService"]:::blue
            WeatherService["WeatherService"]:::blue
        end

        subgraph "Core Utilities"
            direction TB
            AppConstants["AppConstants"]:::blue
            AppTheme["AppTheme"]:::blue
        end

        subgraph "Assets"
            direction TB
            FlutterAssets["assets/icon"]:::blue
            WebIcons["web/icons"]:::blue
            AndroidRes["android/app/src/main/res"]:::blue
            iOSAssets["ios/Runner/Assets.xcassets"]:::blue
            macOSAssets["macos/Runner/Assets.xcassets"]:::blue
        end
    end

    %% External Services
    GeminiAI["Gemini AI Service"]:::orange
    WeatherAPI["Weather API"]:::orange

    %% Connections
    Android <--> MainEntrypoint
    iOS <--> MainEntrypoint
    macOS <--> MainEntrypoint
    Linux <--> MainEntrypoint
    Windows <--> MainEntrypoint
    Web <--> MainEntrypoint

    MainEntrypoint --> AppBootstrap

    AppBootstrap --> HomePage
    AppBootstrap --> EmailReplyPage
    AppBootstrap --> RecipePage
    AppBootstrap --> StoryPage
    AppBootstrap --> WeatherPage

    HomePage --> HomeProvider
    EmailReplyPage --> EmailReplyProvider
    RecipePage --> RecipeProvider
    StoryPage --> StoryProvider
    WeatherPage --> WeatherProvider

    HomeProvider --> GeminiService
    EmailReplyProvider --> GeminiService
    RecipeProvider --> GeminiService
    StoryProvider --> GeminiService
    WeatherProvider --> WeatherService

    GeminiService --> GeminiAI
    WeatherService --> WeatherAPI

    AppBootstrap --> AppConstants
    AppBootstrap --> AppTheme
    AppBootstrap --> ThemeProvider

    HomePage --> FlutterAssets
    EmailReplyPage --> FlutterAssets
    RecipePage --> FlutterAssets
    StoryPage --> FlutterAssets
    WeatherPage --> FlutterAssets

    WebIcons --> Web
    AndroidRes --> Android
    iOSAssets --> iOS
    macOSAssets --> macOS

    %% Click events
    click Android "https://github.com/shaunm1724/geniebox/blob/main/android/app/src/main/kotlin/com/example/geniebox/MainActivity.kt"
    click iOS "https://github.com/shaunm1724/geniebox/blob/main/ios/Runner/AppDelegate.swift"
    click macOS "https://github.com/shaunm1724/geniebox/blob/main/macos/Runner/AppDelegate.swift"
    click Linux "https://github.com/shaunm1724/geniebox/blob/main/linux/runner/main.cc"
    click Windows "https://github.com/shaunm1724/geniebox/blob/main/windows/runner/main.cpp"
    click Web "https://github.com/shaunm1724/geniebox/blob/main/web/index.html"
    click MainEntrypoint "https://github.com/shaunm1724/geniebox/blob/main/lib/main.dart"
    click AppBootstrap "https://github.com/shaunm1724/geniebox/blob/main/lib/app.dart"
    click GeminiService "https://github.com/shaunm1724/geniebox/blob/main/lib/core/services/gemini_service.dart"
    click WeatherService "https://github.com/shaunm1724/geniebox/blob/main/lib/core/services/weather_service.dart"
    click AppConstants "https://github.com/shaunm1724/geniebox/blob/main/lib/core/constants/app_constants.dart"
    click AppTheme "https://github.com/shaunm1724/geniebox/blob/main/lib/core/theme/app_theme.dart"
    click ThemeProvider "https://github.com/shaunm1724/geniebox/blob/main/lib/core/theme/theme_provider.dart"
    click HomePage "https://github.com/shaunm1724/geniebox/blob/main/lib/features/home/presentation/pages/home_page.dart"
    click EmailReplyPage "https://github.com/shaunm1724/geniebox/blob/main/lib/features/email_reply/presentation/pages/email_reply_page.dart"
    click RecipePage "https://github.com/shaunm1724/geniebox/blob/main/lib/features/recipe/presentation/pages/recipe_creator_page.dart"
    click StoryPage "https://github.com/shaunm1724/geniebox/blob/main/lib/features/story_poem/presentation/pages/story_poem_page.dart"
    click WeatherPage "https://github.com/shaunm1724/geniebox/blob/main/lib/features/weather/presentation/pages/weather_page.dart"
    click HomeProvider "https://github.com/shaunm1724/geniebox/blob/main/lib/features/home/presentation/widgets/feature_tile.dart"
    click EmailReplyProvider "https://github.com/shaunm1724/geniebox/blob/main/lib/features/email_reply/presentation/providers/email_reply_provider.dart"
    click RecipeProvider "https://github.com/shaunm1724/geniebox/blob/main/lib/features/recipe/presentation/providers/recipe_provider.dart"
    click StoryProvider "https://github.com/shaunm1724/geniebox/blob/main/lib/features/story_poem/presentation/providers/story_poem_provider.dart"
    click WeatherProvider "https://github.com/shaunm1724/geniebox/blob/main/lib/features/weather/presentation/providers/weather_provider.dart"
    click FlutterAssets "https://github.com/shaunm1724/geniebox/tree/main/assets/icon"
    click WebIcons "https://github.com/shaunm1724/geniebox/tree/main/web/icons"
    click AndroidRes "https://github.com/shaunm1724/geniebox/tree/main/android/app/src/main/res"
    click iOSAssets "https://github.com/shaunm1724/geniebox/blob/main/ios/Runner/Assets.xcassets"
    click macOSAssets "https://github.com/shaunm1724/geniebox/blob/main/macos/Runner/Assets.xcassets"

    %% Styles
    classDef native fill:#d5f5e3,stroke:#27ae60;
    classDef blue fill:#d6eaf8,stroke:#2980b9;
    classDef orange fill:#fad7a0,stroke:#d35400;
```
