# sevitha27/nestopia architecture

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

- Interactive diagram: https://gitdiagram.com/sevitha27/nestopia
- Repository: https://github.com/sevitha27/nestopia

## Overview

##### Project type and purpose
- Nestopia is a cross-platform mobile application built in Flutter (Dart). Its primary goal is to provide a property-rental or booking UI, pulling data (e.g., listings, user profiles, chat) from a backend (Firebase or similar). There is no server-side code in this repo; the app relies on external services.

##### File structure
- Top-level Flutter project with Android and iOS native shells.
- android/ & ios/: platform-specific project files for building and signing.
- assets/: static fonts and images.
- lib/: all Dart source code, split into:
– core/: shared exports and utilities (date/time helpers, constants, image references, size utils).
– presentation/: Flutter screens and their widgets (UI layer).
– routes/: app_routes.dart defines named routes and navigation.
– widgets/: reusable UI components not tied to a single screen.
– main.dart: application entry point.
- firebase_options.dart: initialized Firebase configuration.
- pubspec.yaml: dependencies (likely includes firebase_core, firebase_auth, cloud_firestore, etc.).

##### README for additional insights
- Emphasizes initialRoute set to AppNavigation (app_navigation_screen).
- Describes the folder breakdown—exactly mapping to lib/core, presentation, routes, theme, widgets.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Platform Embedder"
        AndroidShell["Android Shell"]:::infra
        iOSShell["iOS Shell"]:::infra
    end
    AndroidShell --> FlutterEngine
    iOSShell --> FlutterEngine

    FlutterEngine["Flutter Engine"]:::engine

    subgraph "Flutter App (lib/)"
        subgraph "Presentation Layer"
            Presentation["Presentation Layer"]:::ui
            Widgets["Widgets"]:::ui
        end
        subgraph "Routing Layer"
            Routes["Route Manager"]:::routing
            NavScreen["AppNavigationScreen"]:::routing
        end
        subgraph "Business-Logic/Services Layer"
            Utils["Core Utils"]:::utils
            FirebaseOpts["Firebase Options"]:::utils
        end
        subgraph "Theming Layer"
            ThemeLayer["Theme"]:::theme
        end
        subgraph "Assets"
            Assets["Assets (fonts/images)"]:::assets
        end
    end

    FlutterEngine --> Presentation
    FlutterEngine --> Widgets
    Presentation --> Routes
    Presentation --> Utils
    Presentation --> ThemeLayer
    Routes --> NavScreen
    Utils --> FirebaseOpts
    Presentation --> Assets

    subgraph "External Services"
        Auth["Firebase Auth"]:::service
        Firestore["Firebase Firestore"]:::service
        Storage["Firebase Storage"]:::service
    end
    Utils --> Auth
    Utils --> Firestore
    Utils --> Storage

    Pubspec["pubspec.yaml"]:::config
    Pubspec --> Utils

    %% Click Events
    click FlutterEngine "https://github.com/sevitha27/nestopia/tree/main/lib/"
    click Presentation "https://github.com/sevitha27/nestopia/tree/main/lib/presentation/"
    click Widgets "https://github.com/sevitha27/nestopia/tree/main/lib/widgets/"
    click Utils "https://github.com/sevitha27/nestopia/tree/main/lib/core/utils/"
    click FirebaseOpts "https://github.com/sevitha27/nestopia/blob/main/lib/firebase_options.dart"
    click Routes "https://github.com/sevitha27/nestopia/blob/main/lib/routes/app_routes.dart"
    click NavScreen "https://github.com/sevitha27/nestopia/blob/main/lib/presentation/app_navigation_screen/app_navigation_screen.dart"
    click ThemeLayer "https://github.com/sevitha27/nestopia/tree/main/lib/theme/"
    click AndroidShell "https://github.com/sevitha27/nestopia/tree/main/android/"
    click iOSShell "https://github.com/sevitha27/nestopia/tree/main/ios/"
    click Pubspec "https://github.com/sevitha27/nestopia/blob/main/pubspec.yaml"

    classDef ui fill:#ADD8E6,stroke:#000;
    classDef utils fill:#90EE90,stroke:#000;
    classDef routing fill:#FFA500,stroke:#000;
    classDef theme fill:#F0E68C,stroke:#000;
    classDef assets fill:#D3D3D3,stroke:#000;
    classDef engine fill:#87CEFA,stroke:#000;
    classDef infra fill:#DCDCDC,stroke:#000;
    classDef service fill:#A9A9A9,stroke:#000;
    classDef config fill:#FFB6C1,stroke:#000;
```
