# sudipeb/weather_app architecture

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

- Interactive diagram: https://gitdiagram.com/sudipeb/weather_app
- Repository: https://github.com/sudipeb/weather_app

## Overview

##### Project type and purpose
- This is a Flutter-based, cross-platform mobile (Android/iOS), desktop (Windows/Linux/macOS), and web application named “weather_app.”
- Its goal is to display weather information (current conditions, forecasts, alerts) by fetching data from a remote weather API.

##### File structure
- Top‐level “android,” “ios,” “linux,” “macos,” “windows,” and “web” folders: platform-specific runners and configurations under Flutter’s standard multi-platform template.
- The heart of the app lives in `lib/`:
- `lib/presentation/`: UI screens and widgets (home page, onboarding flows, notifications, settings)
- `lib/widgets/`: reusable Dart widgets (nav bar, weather card, drawer list)
- `lib/service/`: API calls (e.g., `fetch_places.dart`)
- `lib/data/`: data sources & JSON models (`models/*.dart`, generated via Freezed & json_serializable)
- `lib/domain/`: pure Dart entities that decouple UI & storage types (forecast_entity, weather_current_entity, etc.)
- `lib/constants/`: application-wide constants for APIs, styling, etc.
- Config files: `pubspec.yaml` (dependencies), `native_splash.yaml`, `analysis_options.yaml`.

##### Elements
- Rectangles for code modules (Presentation, Service, Data, Domain)

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Platform Runners"
        Android["Android Runner"]:::runner
        iOS["iOS Runner"]:::runner
        Linux["Linux Runner"]:::runner
        macOS["macOS Runner"]:::runner
        Windows["Windows Runner"]:::runner
        Web["Web Runner"]:::runner
    end

    Flutter["Flutter Engine & Dart VM"]:::engine

    subgraph "Presentation Layer"
        Home["Home Page"]:::frontend
        Onboarding["Onboarding Screens"]:::frontend
        Notifications["Notifications Screen"]:::frontend
        Settings["Settings Screen"]:::frontend
        Widgets["Reusable Widgets"]:::frontend
    end

    Service["Service Layer"]:::service

    subgraph "Data Layer"
        DataBarrel["Data Barrel Export"]:::data
        Models["Models Directory"]:::data
    end

    subgraph "Domain Layer"
        DomainEntities["Domain Entities"]:::domain
    end

    Assets["Assets Store"]:::assets
    External["External Weather API"]:::external

    Android --> Flutter
    iOS --> Flutter
    Linux --> Flutter
    macOS --> Flutter
    Windows --> Flutter
    Web --> Flutter

    Flutter --> Home
    Flutter --> Onboarding
    Flutter --> Notifications
    Flutter --> Settings
    Flutter --> Widgets

    Home --> Service
    Onboarding --> Service
    Notifications --> Service
    Settings --> Service
    Widgets --> Service

    Service --> External
    Service --> DataBarrel

    DataBarrel --> Models
    Models --> DomainEntities
    DomainEntities --> Home
    DomainEntities --> Onboarding
    DomainEntities --> Notifications
    DomainEntities --> Settings
    DomainEntities --> Widgets

    Home --> Assets
    Onboarding --> Assets
    Notifications --> Assets
    Settings --> Assets
    Widgets --> Assets

    click Android "https://github.com/sudipeb/weather_app/blob/main/android/app/src/main/kotlin/com/sudip/weatherapp/weather_app/MainActivity.kt"
    click iOS "https://github.com/sudipeb/weather_app/blob/main/ios/Runner/AppDelegate.swift"
    click Linux "https://github.com/sudipeb/weather_app/blob/main/linux/runner/main.cc"
    click macOS "https://github.com/sudipeb/weather_app/blob/main/macos/Runner/Runner/AppDelegate.swift"
    click Windows "https://github.com/sudipeb/weather_app/blob/main/windows/runner/main.cpp"
    click Web "https://github.com/sudipeb/weather_app/blob/main/web/index.html"
    click Flutter "https://github.com/sudipeb/weather_app/blob/main/lib/main.dart"
    click Home "https://github.com/sudipeb/weather_app/blob/main/lib/presentation/home/home_page.dart"
    click Onboarding "https://github.com/sudipeb/weather_app/blob/main/lib/presentation/onboarding/onboarding_screen.dart"
    click Notifications "https://github.com/sudipeb/weather_app/blob/main/lib/presentation/notifications/notification.dart"
    click Settings "https://github.com/sudipeb/weather_app/blob/main/lib/presentation/settings.dart"
    click Widgets "https://github.com/sudipeb/weather_app/tree/main/lib/widgets/"
    click Service "https://github.com/sudipeb/weather_app/blob/main/lib/service/fetch_places.dart"
    click DataBarrel "https://github.com/sudipeb/weather_app/blob/main/lib/data/data.dart"
    click Models "https://github.com/sudipeb/weather_app/tree/main/lib/data/models/"
    click DomainEntities "https://github.com/sudipeb/weather_app/tree/main/lib/domain/entity/"
    click Assets "https://github.com/sudipeb/weather_app/tree/main/assets/"

    classDef runner fill:#D0E1F9,stroke:#0366d6,color:#0366d6;
    classDef engine fill:#F0F0F0,stroke:#999999,color:#333333;
    classDef frontend fill:#C1E1C1,stroke:#2d6a4f,color:#1b4332;
    classDef service fill:#F9D5E5,stroke:#b5179e,color:#7209b7;
    classDef data fill:#E2D4F7,stroke:#7b2cbf,color:#5a189a;
    classDef domain fill:#DFF7E4,stroke:#2f8f4e,color:#2d6a4f;
    classDef assets fill:#F7E2D4,stroke:#a58fac,color:#6a4c93;
    classDef external fill:#F0F8FF,stroke:#00008b,color:#000080;
```
