# aradhya-joshi/cosmetique-asper architecture

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

- Interactive diagram: https://gitdiagram.com/aradhya-joshi/cosmetique-asper
- Repository: https://github.com/aradhya-joshi/cosmetique-asper

## Overview

##### Main Components
- Flutter Frontend (UI & Business Logic): Represent the entire Flutter codebase that lives in the “lib” folder. This folder contains multiple Dart files such as Home.dart, login.dart, splash_screen.dart, and others which make up the various screens (pages) and UI components.
- Native Platform Wrappers:
- Android: This is represented by the “android” folder. It contains Gradle scripts, AndroidManifest.xml files, native code (in Kotlin), and resource directories (drawables, mipmaps, etc.). Its role is to provide the Android-specific build configuration and platform integrations.
- iOS: The “ios” folder includes Xcode project files, storyboards, and the AppDelegate. This folder encapsulates iOS-specific configurations and integrations.
- Assets & Configuration:
- The “assets” folder (if used by the app for images, fonts, etc.).
- Configuration files like pubspec.yaml (for dependency management in Flutter), analysis_options.yaml, and .gitignore. These support the build and development environments.
- Testing:
- The “test” directory contains unit and widget tests (example: widget_test.dart).

##### Relationships and Interactions
- The Flutter portion (UI/business logic) in “lib” acts as the central part of the application, where the UI is built and logic is executed.
- The assets and configuration files serve as support elements ensuring the app’s resources and project settings are integrated across platforms.
- Although there isn’t an explicit backend in this file structure, if network or API calls are used within the Flutter code, they would be represented as interactions (for example, an “API Service” component if applicable).

##### Architectural Patterns and Design Principles
- Cross-Platform Architecture: Emphasize that the core of the application is built with Flutter, which shares code between Android and iOS.
- Separation of Concerns: The native layers (Android and iOS) deal with platform-specific configurations and integrations, and the Flutter layer handles UI and business logic.
- Modular Design in Flutter: Although the “lib” folder isn’t heavily segmented into layers (like MVC or MVVM), each Dart file represents a separate component/page, hinting at a modular approach to constructing the UI.

##### Relevant Technologies and Frameworks
- Flutter Framework: For cross-platform UI development.
- Dart Programming Language: All application logic is in Dart.
- Android (Kotlin for MainActivity): Underlies the Android configuration.
- iOS (Swift/Objective-C): For iOS configuration and integration (as seen in AppDelegate.swift and Storyboards).
- Gradle & Xcode Project Management: To handle platform-specific builds.
- Testing Frameworks: Flutter’s built-in testing tools used in the “test” folder.

## Diagram (Mermaid)

```mermaid
flowchart TD
    A["Flutter UI & Business Logic (lib)"]:::flutter
    subgraph "Native Layers"
        B["Android Native Layer"]:::android
        C["iOS Native Layer"]:::ios
    end
    D["Assets & Configurations"]:::assets
    E["Testing"]:::testing

    A -->|"compiles_to"| B
    A -->|"compiles_to"| C
    A -->|"integrates"| D
    A -->|"validated_by"| E

    click A "https://github.com/aradhya-joshi/cosmetique-asper/tree/main/lib/"
    click B "https://github.com/aradhya-joshi/cosmetique-asper/blob/main/android/app/src/main/kotlin/com/example/asper_cosmetique/MainActivity.kt"
    click C "https://github.com/aradhya-joshi/cosmetique-asper/tree/main/ios/Runner"
    click D "https://github.com/aradhya-joshi/cosmetique-asper/tree/main/assets/"
    click E "https://github.com/aradhya-joshi/cosmetique-asper/tree/main/test/"

    classDef flutter fill:#FFCC00,stroke:#333,stroke-width:2px,color:#000;
    classDef android fill:#A4C639,stroke:#333,stroke-width:2px,color:#000;
    classDef ios fill:#007AFF,stroke:#333,stroke-width:2px,color:#fff;
    classDef assets fill:#B3E5FC,stroke:#333,stroke-width:2px,color:#000;
    classDef testing fill:#C5E1A5,stroke:#333,stroke-width:2px,color:#000;
```
